your_service

package
v0.0.0-...-75dfc8a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2018 License: CC0-1.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
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

func (*Echo) ServeHTTP

func (o *Echo) ServeHTTP(rw http.ResponseWriter, r *http.Request)

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 NewEchoOK

func NewEchoOK() *EchoOK

NewEchoOK creates EchoOK with default headers values

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) Build

func (o *EchoURL) Build() (*url.URL, error)

Build a url path and query string

func (*EchoURL) BuildFull

func (o *EchoURL) BuildFull(scheme, host string) (*url.URL, error)

BuildFull builds a full url with scheme, host, path and query string

func (*EchoURL) Must

func (o *EchoURL) Must(u *url.URL, err error) *url.URL

Must is a helper function to panic when the url builder returns an error

func (*EchoURL) SetBasePath

func (o *EchoURL) 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 (*EchoURL) String

func (o *EchoURL) String() string

String returns the string representation of the path with query string

func (*EchoURL) StringFull

func (o *EchoURL) StringFull(scheme, host string) string

StringFull returns the string representation of a complete url

func (*EchoURL) WithBasePath

func (o *EchoURL) WithBasePath(bp string) *EchoURL

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL