Documentation
¶
Index ¶
- Constants
- type GetDistrict
- type GetDistrictHandler
- type GetDistrictHandlerFunc
- type GetDistrictNotFound
- type GetDistrictOK
- type GetDistrictParams
- type GetDistrictURL
- func (o *GetDistrictURL) Build() (*url.URL, error)
- func (o *GetDistrictURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *GetDistrictURL) Must(u *url.URL, err error) *url.URL
- func (o *GetDistrictURL) SetBasePath(bp string)
- func (o *GetDistrictURL) String() string
- func (o *GetDistrictURL) StringFull(scheme, host string) string
- func (o *GetDistrictURL) WithBasePath(bp string) *GetDistrictURL
- type GetDistricts
- type GetDistrictsHandler
- type GetDistrictsHandlerFunc
- type GetDistrictsOK
- type GetDistrictsParams
- type GetDistrictsURL
- func (o *GetDistrictsURL) Build() (*url.URL, error)
- func (o *GetDistrictsURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *GetDistrictsURL) Must(u *url.URL, err error) *url.URL
- func (o *GetDistrictsURL) SetBasePath(bp string)
- func (o *GetDistrictsURL) String() string
- func (o *GetDistrictsURL) StringFull(scheme, host string) string
- func (o *GetDistrictsURL) WithBasePath(bp string) *GetDistrictsURL
Constants ¶
const GetDistrictNotFoundCode int = 404
GetDistrictNotFoundCode is the HTTP code returned for type GetDistrictNotFound
const GetDistrictOKCode int = 200
GetDistrictOKCode is the HTTP code returned for type GetDistrictOK
const GetDistrictsOKCode int = 200
GetDistrictsOKCode is the HTTP code returned for type GetDistrictsOK
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetDistrict ¶
type GetDistrict struct {
Context *middleware.Context
Handler GetDistrictHandler
}
GetDistrict swagger:route GET /districts/{id} Districts getDistrict
Returns a specific district
func NewGetDistrict ¶
func NewGetDistrict(ctx *middleware.Context, handler GetDistrictHandler) *GetDistrict
NewGetDistrict creates a new http.Handler for the get district operation
func (*GetDistrict) ServeHTTP ¶
func (o *GetDistrict) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type GetDistrictHandler ¶
type GetDistrictHandler interface {
Handle(GetDistrictParams, interface{}) middleware.Responder
}
GetDistrictHandler interface for that can handle valid get district params
type GetDistrictHandlerFunc ¶
type GetDistrictHandlerFunc func(GetDistrictParams, interface{}) middleware.Responder
GetDistrictHandlerFunc turns a function with the right signature into a get district handler
func (GetDistrictHandlerFunc) Handle ¶
func (fn GetDistrictHandlerFunc) Handle(params GetDistrictParams, principal interface{}) middleware.Responder
Handle executing the request and returning a response
type GetDistrictNotFound ¶
GetDistrictNotFound Entity Not Found
swagger:response getDistrictNotFound
func NewGetDistrictNotFound ¶
func NewGetDistrictNotFound() *GetDistrictNotFound
NewGetDistrictNotFound creates GetDistrictNotFound with default headers values
func (*GetDistrictNotFound) SetPayload ¶
func (o *GetDistrictNotFound) SetPayload(payload *models.NotFound)
SetPayload sets the payload to the get district not found response
func (*GetDistrictNotFound) WithPayload ¶
func (o *GetDistrictNotFound) WithPayload(payload *models.NotFound) *GetDistrictNotFound
WithPayload adds the payload to the get district not found response
func (*GetDistrictNotFound) WriteResponse ¶
func (o *GetDistrictNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type GetDistrictOK ¶
type GetDistrictOK struct {
/*
In: Body
*/
Payload *models.DistrictResponse `json:"body,omitempty"`
}
GetDistrictOK OK Response
swagger:response getDistrictOK
func NewGetDistrictOK ¶
func NewGetDistrictOK() *GetDistrictOK
NewGetDistrictOK creates GetDistrictOK with default headers values
func (*GetDistrictOK) SetPayload ¶
func (o *GetDistrictOK) SetPayload(payload *models.DistrictResponse)
SetPayload sets the payload to the get district o k response
func (*GetDistrictOK) WithPayload ¶
func (o *GetDistrictOK) WithPayload(payload *models.DistrictResponse) *GetDistrictOK
WithPayload adds the payload to the get district o k response
func (*GetDistrictOK) WriteResponse ¶
func (o *GetDistrictOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type GetDistrictParams ¶
type GetDistrictParams struct {
// HTTP Request Object
HTTPRequest *http.Request `json:"-"`
/*
Required: true
In: path
*/
ID string
}
GetDistrictParams contains all the bound params for the get district operation typically these are obtained from a http.Request
swagger:parameters getDistrict
func NewGetDistrictParams ¶
func NewGetDistrictParams() GetDistrictParams
NewGetDistrictParams creates a new GetDistrictParams object
There are no default values defined in the spec.
func (*GetDistrictParams) BindRequest ¶
func (o *GetDistrictParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error
BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.
To ensure default values, the struct must have been initialized with NewGetDistrictParams() beforehand.
type GetDistrictURL ¶
type GetDistrictURL struct {
ID string
// contains filtered or unexported fields
}
GetDistrictURL generates an URL for the get district operation
func (*GetDistrictURL) Build ¶
func (o *GetDistrictURL) Build() (*url.URL, error)
Build a url path and query string
func (*GetDistrictURL) BuildFull ¶
func (o *GetDistrictURL) BuildFull(scheme, host string) (*url.URL, error)
BuildFull builds a full url with scheme, host, path and query string
func (*GetDistrictURL) Must ¶
Must is a helper function to panic when the url builder returns an error
func (*GetDistrictURL) SetBasePath ¶
func (o *GetDistrictURL) SetBasePath(bp string)
SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string
func (*GetDistrictURL) String ¶
func (o *GetDistrictURL) String() string
String returns the string representation of the path with query string
func (*GetDistrictURL) StringFull ¶
func (o *GetDistrictURL) StringFull(scheme, host string) string
StringFull returns the string representation of a complete url
func (*GetDistrictURL) WithBasePath ¶
func (o *GetDistrictURL) WithBasePath(bp string) *GetDistrictURL
WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string
type GetDistricts ¶
type GetDistricts struct {
Context *middleware.Context
Handler GetDistrictsHandler
}
GetDistricts swagger:route GET /districts Districts getDistricts
Returns a list of districts
func NewGetDistricts ¶
func NewGetDistricts(ctx *middleware.Context, handler GetDistrictsHandler) *GetDistricts
NewGetDistricts creates a new http.Handler for the get districts operation
func (*GetDistricts) ServeHTTP ¶
func (o *GetDistricts) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type GetDistrictsHandler ¶
type GetDistrictsHandler interface {
Handle(GetDistrictsParams, interface{}) middleware.Responder
}
GetDistrictsHandler interface for that can handle valid get districts params
type GetDistrictsHandlerFunc ¶
type GetDistrictsHandlerFunc func(GetDistrictsParams, interface{}) middleware.Responder
GetDistrictsHandlerFunc turns a function with the right signature into a get districts handler
func (GetDistrictsHandlerFunc) Handle ¶
func (fn GetDistrictsHandlerFunc) Handle(params GetDistrictsParams, principal interface{}) middleware.Responder
Handle executing the request and returning a response
type GetDistrictsOK ¶
type GetDistrictsOK struct {
/*
In: Body
*/
Payload *models.DistrictsResponse `json:"body,omitempty"`
}
GetDistrictsOK OK Response
swagger:response getDistrictsOK
func NewGetDistrictsOK ¶
func NewGetDistrictsOK() *GetDistrictsOK
NewGetDistrictsOK creates GetDistrictsOK with default headers values
func (*GetDistrictsOK) SetPayload ¶
func (o *GetDistrictsOK) SetPayload(payload *models.DistrictsResponse)
SetPayload sets the payload to the get districts o k response
func (*GetDistrictsOK) WithPayload ¶
func (o *GetDistrictsOK) WithPayload(payload *models.DistrictsResponse) *GetDistrictsOK
WithPayload adds the payload to the get districts o k response
func (*GetDistrictsOK) WriteResponse ¶
func (o *GetDistrictsOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type GetDistrictsParams ¶
type GetDistrictsParams struct {
// HTTP Request Object
HTTPRequest *http.Request `json:"-"`
/*
In: query
*/
Count *string
}
GetDistrictsParams contains all the bound params for the get districts operation typically these are obtained from a http.Request
swagger:parameters getDistricts
func NewGetDistrictsParams ¶
func NewGetDistrictsParams() GetDistrictsParams
NewGetDistrictsParams creates a new GetDistrictsParams object
There are no default values defined in the spec.
func (*GetDistrictsParams) BindRequest ¶
func (o *GetDistrictsParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error
BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.
To ensure default values, the struct must have been initialized with NewGetDistrictsParams() beforehand.
type GetDistrictsURL ¶
type GetDistrictsURL struct {
Count *string
// contains filtered or unexported fields
}
GetDistrictsURL generates an URL for the get districts operation
func (*GetDistrictsURL) Build ¶
func (o *GetDistrictsURL) Build() (*url.URL, error)
Build a url path and query string
func (*GetDistrictsURL) BuildFull ¶
func (o *GetDistrictsURL) BuildFull(scheme, host string) (*url.URL, error)
BuildFull builds a full url with scheme, host, path and query string
func (*GetDistrictsURL) Must ¶
Must is a helper function to panic when the url builder returns an error
func (*GetDistrictsURL) SetBasePath ¶
func (o *GetDistrictsURL) SetBasePath(bp string)
SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string
func (*GetDistrictsURL) String ¶
func (o *GetDistrictsURL) String() string
String returns the string representation of the path with query string
func (*GetDistrictsURL) StringFull ¶
func (o *GetDistrictsURL) StringFull(scheme, host string) string
StringFull returns the string representation of a complete url
func (*GetDistrictsURL) WithBasePath ¶
func (o *GetDistrictsURL) WithBasePath(bp string) *GetDistrictsURL
WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string