Documentation ¶
Index ¶
- Constants
- type Echo
- type EchoHandler
- type EchoHandlerFunc
- type EchoOK
- type EchoParams
- type EchoURL
- func (o *EchoURL) Build() (*url.URL, error)
- func (o *EchoURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *EchoURL) Must(u *url.URL, err error) *url.URL
- func (o *EchoURL) SetBasePath(bp string)
- func (o *EchoURL) String() string
- func (o *EchoURL) StringFull(scheme, host string) string
- func (o *EchoURL) WithBasePath(bp string) *EchoURL
Constants ¶
const EchoOKCode int = 200
EchoOKCode is the HTTP code returned for type EchoOK
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Echo ¶
type Echo struct { Context *middleware.Context Handler EchoHandler }
Echo swagger:route POST /v1/example/echo YourService echo
Echo echo API
func NewEcho ¶
func NewEcho(ctx *middleware.Context, handler EchoHandler) *Echo
NewEcho creates a new http.Handler for the echo operation
type EchoHandler ¶
type EchoHandler interface {
Handle(EchoParams) middleware.Responder
}
EchoHandler interface for that can handle valid echo params
type EchoHandlerFunc ¶
type EchoHandlerFunc func(EchoParams) middleware.Responder
EchoHandlerFunc turns a function with the right signature into a echo handler
func (EchoHandlerFunc) Handle ¶
func (fn EchoHandlerFunc) Handle(params EchoParams) middleware.Responder
Handle executing the request and returning a response
type EchoOK ¶
type EchoOK struct { /* In: Body */ Payload *models.ExampleStringMessage `json:"body,omitempty"` }
EchoOK echo o k
swagger:response echoOK
func (*EchoOK) SetPayload ¶
func (o *EchoOK) SetPayload(payload *models.ExampleStringMessage)
SetPayload sets the payload to the echo o k response
func (*EchoOK) WithPayload ¶
func (o *EchoOK) WithPayload(payload *models.ExampleStringMessage) *EchoOK
WithPayload adds the payload to the echo o k response
func (*EchoOK) WriteResponse ¶
func (o *EchoOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type EchoParams ¶
type EchoParams struct { // HTTP Request Object HTTPRequest *http.Request `json:"-"` /* Required: true In: body */ Body *models.ExampleStringMessage }
EchoParams contains all the bound params for the echo operation typically these are obtained from a http.Request
swagger:parameters Echo
func NewEchoParams ¶
func NewEchoParams() EchoParams
NewEchoParams creates a new EchoParams object with the default values initialized.
func (*EchoParams) BindRequest ¶
func (o *EchoParams) 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
type EchoURL ¶
type EchoURL struct {
// contains filtered or unexported fields
}
EchoURL generates an URL for the echo operation
func (*EchoURL) 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 (*EchoURL) StringFull ¶
StringFull returns the string representation of a complete url
func (*EchoURL) 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