Documentation ¶
Index ¶
- Constants
- type Hello
- type HelloHandler
- type HelloHandlerFunc
- type HelloOK
- type HelloParams
- type HelloURL
- func (o *HelloURL) Build() (*url.URL, error)
- func (o *HelloURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *HelloURL) Must(u *url.URL, err error) *url.URL
- func (o *HelloURL) SetBasePath(bp string)
- func (o *HelloURL) String() string
- func (o *HelloURL) StringFull(scheme, host string) string
- func (o *HelloURL) WithBasePath(bp string) *HelloURL
Constants ¶
const HelloOKCode int = 200
HelloOKCode is the HTTP code returned for type HelloOK
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hello ¶
type Hello struct { Context *middleware.Context Handler HelloHandler }
Hello swagger:route GET /hello Example hello
hello api
func NewHello ¶
func NewHello(ctx *middleware.Context, handler HelloHandler) *Hello
NewHello creates a new http.Handler for the hello operation
type HelloHandler ¶
type HelloHandler interface {
Handle(HelloParams, *models.Principal) middleware.Responder
}
HelloHandler interface for that can handle valid hello params
type HelloHandlerFunc ¶
type HelloHandlerFunc func(HelloParams, *models.Principal) middleware.Responder
HelloHandlerFunc turns a function with the right signature into a hello handler
func (HelloHandlerFunc) Handle ¶
func (fn HelloHandlerFunc) Handle(params HelloParams, principal *models.Principal) middleware.Responder
Handle executing the request and returning a response
type HelloOK ¶
HelloOK successful operation
swagger:response helloOK
func (*HelloOK) SetPayload ¶
SetPayload sets the payload to the hello o k response
func (*HelloOK) WithPayload ¶
WithPayload adds the payload to the hello o k response
func (*HelloOK) WriteResponse ¶
func (o *HelloOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type HelloParams ¶
HelloParams contains all the bound params for the hello operation typically these are obtained from a http.Request
swagger:parameters hello
func NewHelloParams ¶
func NewHelloParams() HelloParams
NewHelloParams creates a new HelloParams object no default values defined in spec.
func (*HelloParams) BindRequest ¶
func (o *HelloParams) 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 NewHelloParams() beforehand.
type HelloURL ¶
type HelloURL struct {
// contains filtered or unexported fields
}
HelloURL generates an URL for the hello operation
func (*HelloURL) SetBasePath ¶
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 (*HelloURL) StringFull ¶
StringFull returns the string representation of a complete url
func (*HelloURL) WithBasePath ¶
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