todos

package
v0.0.0-...-f53f79a Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2019 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const AddOneCreatedCode int = 201

AddOneCreatedCode is the HTTP code returned for type AddOneCreated

View Source
const DestroyOneNoContentCode int = 204

DestroyOneNoContentCode is the HTTP code returned for type DestroyOneNoContent

View Source
const GetOKCode int = 200

GetOKCode is the HTTP code returned for type GetOK

View Source
const UpdateOneOKCode int = 200

UpdateOneOKCode is the HTTP code returned for type UpdateOneOK

Variables

This section is empty.

Functions

This section is empty.

Types

type AddOne

type AddOne struct {
	Context *middleware.Context
	Handler AddOneHandler
}

AddOne swagger:route POST / todos addOne

AddOne add one API

func NewAddOne

func NewAddOne(ctx *middleware.Context, handler AddOneHandler) *AddOne

NewAddOne creates a new http.Handler for the add one operation

func (*AddOne) ServeHTTP

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

type AddOneCreated

type AddOneCreated struct {

	/*
	  In: Body
	*/
	Payload *models.Item `json:"body,omitempty"`
}

AddOneCreated Created

swagger:response addOneCreated

func NewAddOneCreated

func NewAddOneCreated() *AddOneCreated

NewAddOneCreated creates AddOneCreated with default headers values

func (*AddOneCreated) SetPayload

func (o *AddOneCreated) SetPayload(payload *models.Item)

SetPayload sets the payload to the add one created response

func (*AddOneCreated) WithPayload

func (o *AddOneCreated) WithPayload(payload *models.Item) *AddOneCreated

WithPayload adds the payload to the add one created response

func (*AddOneCreated) WriteResponse

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

WriteResponse to the client

type AddOneDefault

type AddOneDefault struct {

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

AddOneDefault error

swagger:response addOneDefault

func NewAddOneDefault

func NewAddOneDefault(code int) *AddOneDefault

NewAddOneDefault creates AddOneDefault with default headers values

func (*AddOneDefault) SetPayload

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

SetPayload sets the payload to the add one default response

func (*AddOneDefault) SetStatusCode

func (o *AddOneDefault) SetStatusCode(code int)

SetStatusCode sets the status to the add one default response

func (*AddOneDefault) WithPayload

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

WithPayload adds the payload to the add one default response

func (*AddOneDefault) WithStatusCode

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

WithStatusCode adds the status to the add one default response

func (*AddOneDefault) WriteResponse

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

WriteResponse to the client

type AddOneHandler

type AddOneHandler interface {
	Handle(AddOneParams) middleware.Responder
}

AddOneHandler interface for that can handle valid add one params

type AddOneHandlerFunc

type AddOneHandlerFunc func(AddOneParams) middleware.Responder

AddOneHandlerFunc turns a function with the right signature into a add one handler

func (AddOneHandlerFunc) Handle

Handle executing the request and returning a response

type AddOneParams

type AddOneParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request

	/*
	  In: body
	*/
	Body *models.Item
}

AddOneParams contains all the bound params for the add one operation typically these are obtained from a http.Request

swagger:parameters addOne

func NewAddOneParams

func NewAddOneParams() AddOneParams

NewAddOneParams creates a new AddOneParams object with the default values initialized.

func (*AddOneParams) BindRequest

func (o *AddOneParams) 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 AddOneURL

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

AddOneURL generates an URL for the add one operation

func (*AddOneURL) Build

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

Build a url path and query string

func (*AddOneURL) BuildFull

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

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

func (*AddOneURL) Must

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

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

func (*AddOneURL) SetBasePath

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

func (o *AddOneURL) String() string

String returns the string representation of the path with query string

func (*AddOneURL) StringFull

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

StringFull returns the string representation of a complete url

func (*AddOneURL) WithBasePath

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

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 DestroyOne

type DestroyOne struct {
	Context *middleware.Context
	Handler DestroyOneHandler
}

DestroyOne swagger:route DELETE /{id} todos destroyOne

DestroyOne destroy one API

func NewDestroyOne

func NewDestroyOne(ctx *middleware.Context, handler DestroyOneHandler) *DestroyOne

NewDestroyOne creates a new http.Handler for the destroy one operation

func (*DestroyOne) ServeHTTP

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

type DestroyOneDefault

type DestroyOneDefault struct {

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

DestroyOneDefault error

swagger:response destroyOneDefault

func NewDestroyOneDefault

func NewDestroyOneDefault(code int) *DestroyOneDefault

NewDestroyOneDefault creates DestroyOneDefault with default headers values

func (*DestroyOneDefault) SetPayload

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

SetPayload sets the payload to the destroy one default response

func (*DestroyOneDefault) SetStatusCode

func (o *DestroyOneDefault) SetStatusCode(code int)

SetStatusCode sets the status to the destroy one default response

func (*DestroyOneDefault) WithPayload

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

WithPayload adds the payload to the destroy one default response

func (*DestroyOneDefault) WithStatusCode

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

WithStatusCode adds the status to the destroy one default response

func (*DestroyOneDefault) WriteResponse

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

WriteResponse to the client

type DestroyOneHandler

type DestroyOneHandler interface {
	Handle(DestroyOneParams) middleware.Responder
}

DestroyOneHandler interface for that can handle valid destroy one params

type DestroyOneHandlerFunc

type DestroyOneHandlerFunc func(DestroyOneParams) middleware.Responder

DestroyOneHandlerFunc turns a function with the right signature into a destroy one handler

func (DestroyOneHandlerFunc) Handle

Handle executing the request and returning a response

type DestroyOneNoContent

type DestroyOneNoContent struct {
}

DestroyOneNoContent Deleted

swagger:response destroyOneNoContent

func NewDestroyOneNoContent

func NewDestroyOneNoContent() *DestroyOneNoContent

NewDestroyOneNoContent creates DestroyOneNoContent with default headers values

func (*DestroyOneNoContent) WriteResponse

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

WriteResponse to the client

type DestroyOneParams

type DestroyOneParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request

	/*
	  Required: true
	  In: path
	*/
	ID int64
}

DestroyOneParams contains all the bound params for the destroy one operation typically these are obtained from a http.Request

swagger:parameters destroyOne

func NewDestroyOneParams

func NewDestroyOneParams() DestroyOneParams

NewDestroyOneParams creates a new DestroyOneParams object with the default values initialized.

func (*DestroyOneParams) BindRequest

func (o *DestroyOneParams) 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 DestroyOneURL

type DestroyOneURL struct {
	ID int64
	// contains filtered or unexported fields
}

DestroyOneURL generates an URL for the destroy one operation

func (*DestroyOneURL) Build

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

Build a url path and query string

func (*DestroyOneURL) BuildFull

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

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

func (*DestroyOneURL) Must

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

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

func (*DestroyOneURL) SetBasePath

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

func (o *DestroyOneURL) String() string

String returns the string representation of the path with query string

func (*DestroyOneURL) StringFull

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

StringFull returns the string representation of a complete url

func (*DestroyOneURL) WithBasePath

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

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 Get

type Get struct {
	Context *middleware.Context
	Handler GetHandler
}

Get swagger:route GET / todos get

Get get API

func NewGet

func NewGet(ctx *middleware.Context, handler GetHandler) *Get

NewGet creates a new http.Handler for the get operation

func (*Get) ServeHTTP

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

type GetDefault

type GetDefault struct {

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

GetDefault generic error response

swagger:response getDefault

func NewGetDefault

func NewGetDefault(code int) *GetDefault

NewGetDefault creates GetDefault with default headers values

func (*GetDefault) SetPayload

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

SetPayload sets the payload to the get default response

func (*GetDefault) SetStatusCode

func (o *GetDefault) SetStatusCode(code int)

SetStatusCode sets the status to the get default response

func (*GetDefault) WithPayload

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

WithPayload adds the payload to the get default response

func (*GetDefault) WithStatusCode

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

WithStatusCode adds the status to the get default response

func (*GetDefault) WriteResponse

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

WriteResponse to the client

type GetHandler

type GetHandler interface {
	Handle(GetParams) middleware.Responder
}

GetHandler interface for that can handle valid get params

type GetHandlerFunc

type GetHandlerFunc func(GetParams) middleware.Responder

GetHandlerFunc turns a function with the right signature into a get handler

func (GetHandlerFunc) Handle

func (fn GetHandlerFunc) Handle(params GetParams) middleware.Responder

Handle executing the request and returning a response

type GetOK

type GetOK struct {

	/*
	  In: Body
	*/
	Payload []*models.Item `json:"body,omitempty"`
}

GetOK list the todo operations

swagger:response getOK

func NewGetOK

func NewGetOK() *GetOK

NewGetOK creates GetOK with default headers values

func (*GetOK) SetPayload

func (o *GetOK) SetPayload(payload []*models.Item)

SetPayload sets the payload to the get o k response

func (*GetOK) WithPayload

func (o *GetOK) WithPayload(payload []*models.Item) *GetOK

WithPayload adds the payload to the get o k response

func (*GetOK) WriteResponse

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

WriteResponse to the client

type GetParams

type GetParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request

	/*
	  In: query
	  Default: 20
	*/
	Limit *int32
	/*
	  In: query
	*/
	Since *int64
}

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

swagger:parameters Get

func NewGetParams

func NewGetParams() GetParams

NewGetParams creates a new GetParams object with the default values initialized.

func (*GetParams) BindRequest

func (o *GetParams) 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 GetURL

type GetURL struct {
	Limit *int32
	Since *int64
	// contains filtered or unexported fields
}

GetURL generates an URL for the get operation

func (*GetURL) Build

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

Build a url path and query string

func (*GetURL) BuildFull

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

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

func (*GetURL) Must

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

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

func (*GetURL) SetBasePath

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

func (o *GetURL) String() string

String returns the string representation of the path with query string

func (*GetURL) StringFull

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

StringFull returns the string representation of a complete url

func (*GetURL) WithBasePath

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

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 UpdateOne

type UpdateOne struct {
	Context *middleware.Context
	Handler UpdateOneHandler
}

UpdateOne swagger:route PUT /{id} todos updateOne

UpdateOne update one API

func NewUpdateOne

func NewUpdateOne(ctx *middleware.Context, handler UpdateOneHandler) *UpdateOne

NewUpdateOne creates a new http.Handler for the update one operation

func (*UpdateOne) ServeHTTP

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

type UpdateOneDefault

type UpdateOneDefault struct {

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

UpdateOneDefault error

swagger:response updateOneDefault

func NewUpdateOneDefault

func NewUpdateOneDefault(code int) *UpdateOneDefault

NewUpdateOneDefault creates UpdateOneDefault with default headers values

func (*UpdateOneDefault) SetPayload

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

SetPayload sets the payload to the update one default response

func (*UpdateOneDefault) SetStatusCode

func (o *UpdateOneDefault) SetStatusCode(code int)

SetStatusCode sets the status to the update one default response

func (*UpdateOneDefault) WithPayload

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

WithPayload adds the payload to the update one default response

func (*UpdateOneDefault) WithStatusCode

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

WithStatusCode adds the status to the update one default response

func (*UpdateOneDefault) WriteResponse

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

WriteResponse to the client

type UpdateOneHandler

type UpdateOneHandler interface {
	Handle(UpdateOneParams) middleware.Responder
}

UpdateOneHandler interface for that can handle valid update one params

type UpdateOneHandlerFunc

type UpdateOneHandlerFunc func(UpdateOneParams) middleware.Responder

UpdateOneHandlerFunc turns a function with the right signature into a update one handler

func (UpdateOneHandlerFunc) Handle

Handle executing the request and returning a response

type UpdateOneOK

type UpdateOneOK struct {

	/*
	  In: Body
	*/
	Payload *models.Item `json:"body,omitempty"`
}

UpdateOneOK OK

swagger:response updateOneOK

func NewUpdateOneOK

func NewUpdateOneOK() *UpdateOneOK

NewUpdateOneOK creates UpdateOneOK with default headers values

func (*UpdateOneOK) SetPayload

func (o *UpdateOneOK) SetPayload(payload *models.Item)

SetPayload sets the payload to the update one o k response

func (*UpdateOneOK) WithPayload

func (o *UpdateOneOK) WithPayload(payload *models.Item) *UpdateOneOK

WithPayload adds the payload to the update one o k response

func (*UpdateOneOK) WriteResponse

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

WriteResponse to the client

type UpdateOneParams

type UpdateOneParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request

	/*
	  In: body
	*/
	Body *models.Item
	/*
	  Required: true
	  In: path
	*/
	ID int64
}

UpdateOneParams contains all the bound params for the update one operation typically these are obtained from a http.Request

swagger:parameters updateOne

func NewUpdateOneParams

func NewUpdateOneParams() UpdateOneParams

NewUpdateOneParams creates a new UpdateOneParams object with the default values initialized.

func (*UpdateOneParams) BindRequest

func (o *UpdateOneParams) 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 UpdateOneURL

type UpdateOneURL struct {
	ID int64
	// contains filtered or unexported fields
}

UpdateOneURL generates an URL for the update one operation

func (*UpdateOneURL) Build

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

Build a url path and query string

func (*UpdateOneURL) BuildFull

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

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

func (*UpdateOneURL) Must

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

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

func (*UpdateOneURL) SetBasePath

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

func (o *UpdateOneURL) String() string

String returns the string representation of the path with query string

func (*UpdateOneURL) StringFull

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

StringFull returns the string representation of a complete url

func (*UpdateOneURL) WithBasePath

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

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