wordchain

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const GetRandomBadRequestCode int = 400

GetRandomBadRequestCode is the HTTP code returned for type GetRandomBadRequest

View Source
const GetRandomOKCode int = 200

GetRandomOKCode is the HTTP code returned for type GetRandomOK

Variables

This section is empty.

Functions

This section is empty.

Types

type GetRandom

type GetRandom struct {
	Context *middleware.Context
	Handler GetRandomHandler
}
GetRandom swagger:route POST /v1/random wordchain getRandom

Get a wordchain

Generate a wordchain

func NewGetRandom

func NewGetRandom(ctx *middleware.Context, handler GetRandomHandler) *GetRandom

NewGetRandom creates a new http.Handler for the get random operation

func (*GetRandom) ServeHTTP

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

type GetRandomBadRequest

type GetRandomBadRequest struct {

	/*
	  In: Body
	*/
	Payload string `json:"body,omitempty"`
}

GetRandomBadRequest Bad Request

swagger:response getRandomBadRequest

func NewGetRandomBadRequest

func NewGetRandomBadRequest() *GetRandomBadRequest

NewGetRandomBadRequest creates GetRandomBadRequest with default headers values

func (*GetRandomBadRequest) SetPayload

func (o *GetRandomBadRequest) SetPayload(payload string)

SetPayload sets the payload to the get random bad request response

func (*GetRandomBadRequest) WithPayload

func (o *GetRandomBadRequest) WithPayload(payload string) *GetRandomBadRequest

WithPayload adds the payload to the get random bad request response

func (*GetRandomBadRequest) WriteResponse

func (o *GetRandomBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetRandomDefault

type GetRandomDefault struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
	// contains filtered or unexported fields
}

GetRandomDefault generic error response

swagger:response getRandomDefault

func NewGetRandomDefault

func NewGetRandomDefault(code int) *GetRandomDefault

NewGetRandomDefault creates GetRandomDefault with default headers values

func (*GetRandomDefault) SetPayload

func (o *GetRandomDefault) SetPayload(payload *models.Error)

SetPayload sets the payload to the get random default response

func (*GetRandomDefault) SetStatusCode

func (o *GetRandomDefault) SetStatusCode(code int)

SetStatusCode sets the status to the get random default response

func (*GetRandomDefault) WithPayload

func (o *GetRandomDefault) WithPayload(payload *models.Error) *GetRandomDefault

WithPayload adds the payload to the get random default response

func (*GetRandomDefault) WithStatusCode

func (o *GetRandomDefault) WithStatusCode(code int) *GetRandomDefault

WithStatusCode adds the status to the get random default response

func (*GetRandomDefault) WriteResponse

func (o *GetRandomDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetRandomHandler

type GetRandomHandler interface {
	Handle(GetRandomParams) middleware.Responder
}

GetRandomHandler interface for that can handle valid get random params

type GetRandomHandlerFunc

type GetRandomHandlerFunc func(GetRandomParams) middleware.Responder

GetRandomHandlerFunc turns a function with the right signature into a get random handler

func (GetRandomHandlerFunc) Handle

Handle executing the request and returning a response

type GetRandomOK

type GetRandomOK struct {

	/*
	  In: Body
	*/
	Payload string `json:"body,omitempty"`
}

GetRandomOK OK

swagger:response getRandomOK

func NewGetRandomOK

func NewGetRandomOK() *GetRandomOK

NewGetRandomOK creates GetRandomOK with default headers values

func (*GetRandomOK) SetPayload

func (o *GetRandomOK) SetPayload(payload string)

SetPayload sets the payload to the get random o k response

func (*GetRandomOK) WithPayload

func (o *GetRandomOK) WithPayload(payload string) *GetRandomOK

WithPayload adds the payload to the get random o k response

func (*GetRandomOK) WriteResponse

func (o *GetRandomOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)

WriteResponse to the client

type GetRandomParams

type GetRandomParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*Wordchain Parameters
	  In: body
	*/
	Body *models.ModelsWordchainPrefs
}

GetRandomParams contains all the bound params for the get random operation typically these are obtained from a http.Request

swagger:parameters get-random

func NewGetRandomParams

func NewGetRandomParams() GetRandomParams

NewGetRandomParams creates a new GetRandomParams object

There are no default values defined in the spec.

func (*GetRandomParams) BindRequest

func (o *GetRandomParams) 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 NewGetRandomParams() beforehand.

type GetRandomURL

type GetRandomURL struct {
	// contains filtered or unexported fields
}

GetRandomURL generates an URL for the get random operation

func (*GetRandomURL) Build

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

Build a url path and query string

func (*GetRandomURL) BuildFull

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

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

func (*GetRandomURL) Must

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

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

func (*GetRandomURL) SetBasePath

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

func (o *GetRandomURL) String() string

String returns the string representation of the path with query string

func (*GetRandomURL) StringFull

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

StringFull returns the string representation of a complete url

func (*GetRandomURL) WithBasePath

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

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