Documentation ¶
Overview ¶
@SubApi Order management API [/orders]
Index ¶
- func InitRouter() *web.Router
- type APIError
- type Context
- func (c *Context) GetArrayOfInterfaces(rw web.ResponseWriter, req *web.Request)
- func (c *Context) GetInterface(rw web.ResponseWriter, req *web.Request)
- func (c *Context) GetSimpleAliased(rw web.ResponseWriter, req *web.Request)
- func (c *Context) GetSimpleArrayByString(rw web.ResponseWriter, req *web.Request)
- func (c *Context) GetStringByInt(rw web.ResponseWriter, req *web.Request)
- func (c *Context) GetStruct2ByInt(rw web.ResponseWriter, req *web.Request)
- func (c *Context) GetStruct3(rw web.ResponseWriter, req *web.Request)
- func (c *Context) GetStructArrayByString(rw web.ResponseWriter, req *web.Request)
- func (c *Context) GetStructByInt(rw web.ResponseWriter, req *web.Request)
- func (c *Context) WriteResponse(response interface{})
- type InterfaceType
- type SimpleAlias
- type SimpleStructure
- type SimpleStructureWithAnnotations
- type StructureWithEmbededPointer
- type StructureWithEmbededStructure
- type StructureWithSlice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitRouter ¶
Types ¶
type Context ¶
type Context struct {
// contains filtered or unexported fields
}
func (*Context) GetArrayOfInterfaces ¶
func (c *Context) GetArrayOfInterfaces(rw web.ResponseWriter, req *web.Request)
@Title GetArrayOfInterfaces @Description get array of interfaces @Accept json @Success 200 {array} InterfaceType @Failure 400 {object} APIError "We need ID!!" @Failure 404 {object} APIError "Can not find ID" @Router /testapi/get-array-of-interfaces [get]
func (*Context) GetInterface ¶
func (c *Context) GetInterface(rw web.ResponseWriter, req *web.Request)
@Title GetInterface @Description get interface @Accept json @Success 200 {object} InterfaceType @Failure 400 {object} APIError "We need ID!!" @Failure 404 {object} APIError "Can not find ID" @Router /testapi/get-interface [get]
func (*Context) GetSimpleAliased ¶
func (c *Context) GetSimpleAliased(rw web.ResponseWriter, req *web.Request)
@Title GetSimpleAliased @Description get simple aliases @Accept json @Success 200 {object} SimpleAlias @Failure 400 {object} APIError "We need ID!!" @Failure 404 {object} APIError "Can not find ID" @Router /testapi/get-simple-aliased [get]
func (*Context) GetSimpleArrayByString ¶
func (c *Context) GetSimpleArrayByString(rw web.ResponseWriter, req *web.Request)
@Title GetSimpleArrayByString @Description get simple array by ID @Accept json @Param some_id path string true "Some ID" @Param offset query int true "Offset" @Param limit query int true "Offset" @Success 200 {array} string @Failure 400 {object} APIError "We need ID!!" @Failure 404 {object} APIError "Can not find ID" @Router /testapi/get-simple-array-by-string/{some_id} [get]
func (*Context) GetStringByInt ¶
func (c *Context) GetStringByInt(rw web.ResponseWriter, req *web.Request)
@Title GetStringByInt @Description get string by ID @Accept json @Param some_id path int true "Some ID" @Success 200 {object} string @Failure 400 {object} APIError "We need ID!!" @Failure 404 {object} APIError "Can not find ID" @Router /testapi/get-string-by-int/{some_id} [get]
func (*Context) GetStruct2ByInt ¶
func (c *Context) GetStruct2ByInt(rw web.ResponseWriter, req *web.Request)
@Title GetStruct2ByInt @Description get struct2 by ID @Accept json @Param some_id path int true "Some ID" @Param offset query int true "Offset" @Param limit query int true "Offset" @Success 200 {object} StructureWithEmbededPointer @Failure 400 {object} APIError "We need ID!!" @Failure 404 {object} APIError "Can not find ID" @Router /testapi/get-struct2-by-int/{some_id} [get]
func (*Context) GetStruct3 ¶
func (c *Context) GetStruct3(rw web.ResponseWriter, req *web.Request)
@Title GetStruct3 @Description get struct3 @Accept json @Success 200 {object} StructureWithSlice @Failure 400 {object} APIError "We need ID!!" @Failure 404 {object} APIError "Can not find ID" @Router /testapi/get-struct3 [get]
func (*Context) GetStructArrayByString ¶
func (c *Context) GetStructArrayByString(rw web.ResponseWriter, req *web.Request)
@Title GetStructArrayByString @Description get struct array by ID @Accept json @Param some_id path string true "Some ID" @Param offset query int true "Offset" @Param limit query int true "Offset" @Success 200 {array} SimpleStructureWithAnnotations @Failure 400 {object} APIError "We need ID!!" @Failure 404 {object} APIError "Can not find ID" @Router /testapi/get-struct-array-by-string/{some_id} [get]
func (*Context) GetStructByInt ¶
func (c *Context) GetStructByInt(rw web.ResponseWriter, req *web.Request)
@Title GetStructByInt @Description get struct by ID @Accept json @Param some_id path int true "Some ID" @Param offset query int true "Offset" @Param limit query int true "Offset" @Success 200 {object} StructureWithEmbededStructure @Failure 400 {object} APIError "We need ID!!" @Failure 404 {object} APIError "Can not find ID" @Router /testapi/get-struct-by-int/{some_id} [get]
func (*Context) WriteResponse ¶
func (c *Context) WriteResponse(response interface{})
type InterfaceType ¶
type InterfaceType interface{}
type SimpleAlias ¶
type SimpleAlias string
type SimpleStructure ¶
type StructureWithEmbededPointer ¶
type StructureWithEmbededPointer struct {
*StructureWithSlice
}
type StructureWithEmbededStructure ¶
type StructureWithEmbededStructure struct {
StructureWithSlice
}
type StructureWithSlice ¶
Directories ¶
Path | Synopsis |
---|---|
@APIVersion 1.0.0 @APITitle Swagger Example API @APIDescription Swagger Example API @Contact varyous@gmail.com @TermsOfServiceUrl http://yvasiyarov.com/ @License BSD @LicenseUrl http://yvasiyarov.com/
|
@APIVersion 1.0.0 @APITitle Swagger Example API @APIDescription Swagger Example API @Contact varyous@gmail.com @TermsOfServiceUrl http://yvasiyarov.com/ @License BSD @LicenseUrl http://yvasiyarov.com/ |