2019-06-24 17:36:42 -08:00
|
|
|
// GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
|
|
|
|
// This file was generated by swaggo/swag at
|
2019-06-24 22:41:21 -08:00
|
|
|
// 2019-06-24 20:15:37.524606 -0800 AKDT m=+13.872100491
|
2019-06-24 17:36:42 -08:00
|
|
|
|
|
|
|
package docs
|
|
|
|
|
|
|
|
import (
|
|
|
|
"bytes"
|
|
|
|
|
|
|
|
"github.com/alecthomas/template"
|
|
|
|
"github.com/swaggo/swag"
|
|
|
|
)
|
|
|
|
|
|
|
|
var doc = `{
|
|
|
|
"swagger": "2.0",
|
|
|
|
"info": {
|
|
|
|
"description": "This is a sample server celler server.",
|
|
|
|
"title": "SaaS Example API",
|
2019-06-24 22:41:21 -08:00
|
|
|
"termsOfService": "/terms",
|
2019-06-24 17:36:42 -08:00
|
|
|
"contact": {
|
|
|
|
"name": "API Support",
|
2019-06-24 22:41:21 -08:00
|
|
|
"url": "/support",
|
2019-06-24 17:36:42 -08:00
|
|
|
"email": "support@geeksinthewoods.com"
|
|
|
|
},
|
|
|
|
"license": {
|
|
|
|
"name": "Apache 2.0",
|
|
|
|
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
|
|
|
},
|
|
|
|
"version": "{{.Version}}"
|
|
|
|
},
|
|
|
|
"host": "{{.Host}}",
|
|
|
|
"basePath": "{{.BasePath}}",
|
2019-06-24 22:41:21 -08:00
|
|
|
"paths": {
|
|
|
|
"/accounts/{id}": {
|
|
|
|
"get": {
|
|
|
|
"description": "get string by ID",
|
|
|
|
"consumes": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"produces": [
|
|
|
|
"application/json"
|
|
|
|
],
|
|
|
|
"summary": "Read returns the specified account from the system.",
|
|
|
|
"operationId": "get-string-by-int",
|
|
|
|
"parameters": [
|
|
|
|
{
|
|
|
|
"type": "integer",
|
|
|
|
"description": "Account ID",
|
|
|
|
"name": "id",
|
|
|
|
"in": "path",
|
|
|
|
"required": true
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"responses": {
|
|
|
|
"200": {
|
|
|
|
"description": "OK",
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"$ref": "#/definitions/account.Account"
|
|
|
|
},
|
|
|
|
"headers": {
|
|
|
|
"Token": {
|
|
|
|
"type": "string",
|
|
|
|
"description": "qwerty"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"400": {
|
|
|
|
"description": "Bad Request",
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"$ref": "#/definitions/web.Error"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"403": {
|
|
|
|
"description": "Forbidden",
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"$ref": "#/definitions/web.Error"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"404": {
|
|
|
|
"description": "Not Found",
|
|
|
|
"schema": {
|
|
|
|
"type": "object",
|
|
|
|
"$ref": "#/definitions/web.Error"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"definitions": {
|
|
|
|
"account.Account": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"address1": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"address2": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"archived_at": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"billing_user_id": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"city": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"country": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"created_at": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"id": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"name": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"region": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"signup_user_id": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"status": {
|
|
|
|
"type": "AccountStatus"
|
|
|
|
},
|
|
|
|
"timezone": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"updated_at": {
|
|
|
|
"type": "string"
|
|
|
|
},
|
|
|
|
"zipcode": {
|
|
|
|
"type": "string"
|
|
|
|
}
|
|
|
|
}
|
2019-06-24 17:36:42 -08:00
|
|
|
},
|
2019-06-24 22:41:21 -08:00
|
|
|
"web.Error": {
|
|
|
|
"type": "object",
|
|
|
|
"properties": {
|
|
|
|
"err": {
|
|
|
|
"type": "error"
|
|
|
|
},
|
|
|
|
"fields": {
|
|
|
|
"type": "array",
|
|
|
|
"items": {
|
|
|
|
"type": "FieldError"
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"status": {
|
|
|
|
"type": "integer"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
"securityDefinitions": {
|
2019-06-24 17:36:42 -08:00
|
|
|
"OAuth2Password": {
|
|
|
|
"type": "oauth2",
|
|
|
|
"flow": "password",
|
2019-06-24 22:41:21 -08:00
|
|
|
"tokenUrl": "/v1/oauth/token"
|
2019-06-24 17:36:42 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}`
|
|
|
|
|
|
|
|
type swaggerInfo struct {
|
|
|
|
Version string
|
|
|
|
Host string
|
|
|
|
BasePath string
|
|
|
|
Title string
|
|
|
|
Description string
|
|
|
|
}
|
|
|
|
|
|
|
|
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
|
|
|
var SwaggerInfo swaggerInfo
|
|
|
|
|
|
|
|
type s struct{}
|
|
|
|
|
|
|
|
func (s *s) ReadDoc() string {
|
|
|
|
t, err := template.New("swagger_info").Parse(doc)
|
|
|
|
if err != nil {
|
|
|
|
return doc
|
|
|
|
}
|
|
|
|
|
|
|
|
var tpl bytes.Buffer
|
|
|
|
if err := t.Execute(&tpl, SwaggerInfo); err != nil {
|
|
|
|
return doc
|
|
|
|
}
|
|
|
|
|
|
|
|
return tpl.String()
|
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
swag.Register(swag.Name, &s{})
|
|
|
|
}
|