import "github.com/go-swagger/go-swagger/examples/tutorials/todo-list/server-2/restapi/operations/todos"
add_one.go add_one_parameters.go add_one_responses.go add_one_urlbuilder.go destroy_one.go destroy_one_parameters.go destroy_one_responses.go destroy_one_urlbuilder.go find_todos.go find_todos_parameters.go find_todos_responses.go find_todos_urlbuilder.go update_one.go update_one_parameters.go update_one_responses.go update_one_urlbuilder.go
AddOneCreatedCode is the HTTP code returned for type AddOneCreated
DestroyOneNoContentCode is the HTTP code returned for type DestroyOneNoContent
FindTodosOKCode is the HTTP code returned for type FindTodosOK
UpdateOneOKCode is the HTTP code returned for type UpdateOneOK
type AddOne struct { Context *middleware.Context Handler AddOneHandler }
AddOne swagger:route POST / todos addOne
AddOne add one API
func NewAddOne(ctx *middleware.Context, handler AddOneHandler) *AddOne
NewAddOne creates a new http.Handler for the add one operation
AddOneCreated Created
swagger:response addOneCreated
func NewAddOneCreated() *AddOneCreated
NewAddOneCreated creates AddOneCreated with default headers values
func (o *AddOneCreated) SetPayload(payload *models.Item)
SetPayload sets the payload to the add one created response
func (o *AddOneCreated) WithPayload(payload *models.Item) *AddOneCreated
WithPayload adds the payload to the add one created response
func (o *AddOneCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type AddOneDefault struct { /* In: Body */ Payload *models.Error `json:"body,omitempty"` // contains filtered or unexported fields }
AddOneDefault error
swagger:response addOneDefault
func NewAddOneDefault(code int) *AddOneDefault
NewAddOneDefault creates AddOneDefault with default headers values
func (o *AddOneDefault) SetPayload(payload *models.Error)
SetPayload sets the payload to the add one default response
func (o *AddOneDefault) SetStatusCode(code int)
SetStatusCode sets the status to the add one default response
func (o *AddOneDefault) WithPayload(payload *models.Error) *AddOneDefault
WithPayload adds the payload to the add one default response
func (o *AddOneDefault) WithStatusCode(code int) *AddOneDefault
WithStatusCode adds the status to the add one default response
func (o *AddOneDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type AddOneHandler interface { Handle(AddOneParams) middleware.Responder }
AddOneHandler interface for that can handle valid add one params
type AddOneHandlerFunc func(AddOneParams) middleware.Responder
AddOneHandlerFunc turns a function with the right signature into a add one handler
func (fn AddOneHandlerFunc) Handle(params AddOneParams) middleware.Responder
Handle executing the request and returning a response
type AddOneParams struct { // HTTP Request Object HTTPRequest *http.Request `json:"-"` /* 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() AddOneParams
NewAddOneParams creates a new AddOneParams object
There are no default values defined in the spec.
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.
To ensure default values, the struct must have been initialized with NewAddOneParams() beforehand.
type AddOneURL struct {
// contains filtered or unexported fields
}
AddOneURL generates an URL for the add one operation
Build a url path and query string
BuildFull builds a full url with scheme, host, path and query string
Must is a helper function to panic when the url builder returns an error
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
String returns the string representation of the path with query string
StringFull returns the string representation of a complete url
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 struct { Context *middleware.Context Handler DestroyOneHandler }
DestroyOne swagger:route DELETE /{id} todos destroyOne
DestroyOne destroy one API
func NewDestroyOne(ctx *middleware.Context, handler DestroyOneHandler) *DestroyOne
NewDestroyOne creates a new http.Handler for the destroy one operation
func (o *DestroyOne) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type DestroyOneDefault struct { /* In: Body */ Payload *models.Error `json:"body,omitempty"` // contains filtered or unexported fields }
DestroyOneDefault error
swagger:response destroyOneDefault
func NewDestroyOneDefault(code int) *DestroyOneDefault
NewDestroyOneDefault creates DestroyOneDefault with default headers values
func (o *DestroyOneDefault) SetPayload(payload *models.Error)
SetPayload sets the payload to the destroy one default response
func (o *DestroyOneDefault) SetStatusCode(code int)
SetStatusCode sets the status to the destroy one default response
func (o *DestroyOneDefault) WithPayload(payload *models.Error) *DestroyOneDefault
WithPayload adds the payload to the destroy one default response
func (o *DestroyOneDefault) WithStatusCode(code int) *DestroyOneDefault
WithStatusCode adds the status to the destroy one default response
func (o *DestroyOneDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type DestroyOneHandler interface { Handle(DestroyOneParams) middleware.Responder }
DestroyOneHandler interface for that can handle valid destroy one params
type DestroyOneHandlerFunc func(DestroyOneParams) middleware.Responder
DestroyOneHandlerFunc turns a function with the right signature into a destroy one handler
func (fn DestroyOneHandlerFunc) Handle(params DestroyOneParams) middleware.Responder
Handle executing the request and returning a response
type DestroyOneNoContent struct { }
DestroyOneNoContent Deleted
swagger:response destroyOneNoContent
func NewDestroyOneNoContent() *DestroyOneNoContent
NewDestroyOneNoContent creates DestroyOneNoContent with default headers values
func (o *DestroyOneNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type DestroyOneParams struct { // HTTP Request Object HTTPRequest *http.Request `json:"-"` /* 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() DestroyOneParams
NewDestroyOneParams creates a new DestroyOneParams object
There are no default values defined in the spec.
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.
To ensure default values, the struct must have been initialized with NewDestroyOneParams() beforehand.
DestroyOneURL generates an URL for the destroy one operation
func (o *DestroyOneURL) Build() (*url.URL, error)
Build a url path and query string
BuildFull builds a full url with scheme, host, path and query string
Must is a helper function to panic when the url builder returns an error
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 (o *DestroyOneURL) String() string
String returns the string representation of the path with query string
func (o *DestroyOneURL) StringFull(scheme, host string) string
StringFull returns the string representation of a complete url
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 FindTodos struct { Context *middleware.Context Handler FindTodosHandler }
FindTodos swagger:route GET / todos findTodos
FindTodos find todos API
func NewFindTodos(ctx *middleware.Context, handler FindTodosHandler) *FindTodos
NewFindTodos creates a new http.Handler for the find todos operation
type FindTodosDefault struct { /* In: Body */ Payload *models.Error `json:"body,omitempty"` // contains filtered or unexported fields }
FindTodosDefault generic error response
swagger:response findTodosDefault
func NewFindTodosDefault(code int) *FindTodosDefault
NewFindTodosDefault creates FindTodosDefault with default headers values
func (o *FindTodosDefault) SetPayload(payload *models.Error)
SetPayload sets the payload to the find todos default response
func (o *FindTodosDefault) SetStatusCode(code int)
SetStatusCode sets the status to the find todos default response
func (o *FindTodosDefault) WithPayload(payload *models.Error) *FindTodosDefault
WithPayload adds the payload to the find todos default response
func (o *FindTodosDefault) WithStatusCode(code int) *FindTodosDefault
WithStatusCode adds the status to the find todos default response
func (o *FindTodosDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type FindTodosHandler interface { Handle(FindTodosParams) middleware.Responder }
FindTodosHandler interface for that can handle valid find todos params
type FindTodosHandlerFunc func(FindTodosParams) middleware.Responder
FindTodosHandlerFunc turns a function with the right signature into a find todos handler
func (fn FindTodosHandlerFunc) Handle(params FindTodosParams) middleware.Responder
Handle executing the request and returning a response
FindTodosOK list the todo operations
swagger:response findTodosOK
func NewFindTodosOK() *FindTodosOK
NewFindTodosOK creates FindTodosOK with default headers values
func (o *FindTodosOK) SetPayload(payload []*models.Item)
SetPayload sets the payload to the find todos o k response
func (o *FindTodosOK) WithPayload(payload []*models.Item) *FindTodosOK
WithPayload adds the payload to the find todos o k response
func (o *FindTodosOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type FindTodosParams struct { // HTTP Request Object HTTPRequest *http.Request `json:"-"` /* In: query Default: 20 */ Limit *int32 /* In: query */ Since *int64 }
FindTodosParams contains all the bound params for the find todos operation typically these are obtained from a http.Request
swagger:parameters findTodos
func NewFindTodosParams() FindTodosParams
NewFindTodosParams creates a new FindTodosParams object with the default values initialized.
func (o *FindTodosParams) 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 NewFindTodosParams() beforehand.
FindTodosURL generates an URL for the find todos operation
func (o *FindTodosURL) Build() (*url.URL, error)
Build a url path and query string
BuildFull builds a full url with scheme, host, path and query string
Must is a helper function to panic when the url builder returns an error
func (o *FindTodosURL) 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 (o *FindTodosURL) String() string
String returns the string representation of the path with query string
func (o *FindTodosURL) StringFull(scheme, host string) string
StringFull returns the string representation of a complete url
func (o *FindTodosURL) WithBasePath(bp string) *FindTodosURL
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 struct { Context *middleware.Context Handler UpdateOneHandler }
UpdateOne swagger:route PUT /{id} todos updateOne
UpdateOne update one API
func NewUpdateOne(ctx *middleware.Context, handler UpdateOneHandler) *UpdateOne
NewUpdateOne creates a new http.Handler for the update one operation
type UpdateOneDefault struct { /* In: Body */ Payload *models.Error `json:"body,omitempty"` // contains filtered or unexported fields }
UpdateOneDefault error
swagger:response updateOneDefault
func NewUpdateOneDefault(code int) *UpdateOneDefault
NewUpdateOneDefault creates UpdateOneDefault with default headers values
func (o *UpdateOneDefault) SetPayload(payload *models.Error)
SetPayload sets the payload to the update one default response
func (o *UpdateOneDefault) SetStatusCode(code int)
SetStatusCode sets the status to the update one default response
func (o *UpdateOneDefault) WithPayload(payload *models.Error) *UpdateOneDefault
WithPayload adds the payload to the update one default response
func (o *UpdateOneDefault) WithStatusCode(code int) *UpdateOneDefault
WithStatusCode adds the status to the update one default response
func (o *UpdateOneDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type UpdateOneHandler interface { Handle(UpdateOneParams) middleware.Responder }
UpdateOneHandler interface for that can handle valid update one params
type UpdateOneHandlerFunc func(UpdateOneParams) middleware.Responder
UpdateOneHandlerFunc turns a function with the right signature into a update one handler
func (fn UpdateOneHandlerFunc) Handle(params UpdateOneParams) middleware.Responder
Handle executing the request and returning a response
UpdateOneOK OK
swagger:response updateOneOK
func NewUpdateOneOK() *UpdateOneOK
NewUpdateOneOK creates UpdateOneOK with default headers values
func (o *UpdateOneOK) SetPayload(payload *models.Item)
SetPayload sets the payload to the update one o k response
func (o *UpdateOneOK) WithPayload(payload *models.Item) *UpdateOneOK
WithPayload adds the payload to the update one o k response
func (o *UpdateOneOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type UpdateOneParams struct { // HTTP Request Object HTTPRequest *http.Request `json:"-"` /* 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() UpdateOneParams
NewUpdateOneParams creates a new UpdateOneParams object
There are no default values defined in the spec.
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.
To ensure default values, the struct must have been initialized with NewUpdateOneParams() beforehand.
UpdateOneURL generates an URL for the update one operation
func (o *UpdateOneURL) Build() (*url.URL, error)
Build a url path and query string
BuildFull builds a full url with scheme, host, path and query string
Must is a helper function to panic when the url builder returns an error
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 (o *UpdateOneURL) String() string
String returns the string representation of the path with query string
func (o *UpdateOneURL) StringFull(scheme, host string) string
StringFull returns the string representation of a complete url
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
Package todos imports 13 packages (graph) and is imported by 18 packages. Updated 2021-01-25. Refresh now. Tools for package owners.