go-swagger: github.com/go-swagger/go-swagger/examples/tutorials/todo-list/server-1/restapi/operations/todos Index | Files

package todos

import "github.com/go-swagger/go-swagger/examples/tutorials/todo-list/server-1/restapi/operations/todos"

Index

Package Files

find_todos.go find_todos_parameters.go find_todos_responses.go find_todos_urlbuilder.go

Constants

const FindTodosOKCode int = 200

FindTodosOKCode is the HTTP code returned for type FindTodosOK

type FindTodos Uses

type FindTodos struct {
    Context *middleware.Context
    Handler FindTodosHandler
}

FindTodos swagger:route GET / todos findTodos

FindTodos find todos API

func NewFindTodos Uses

func NewFindTodos(ctx *middleware.Context, handler FindTodosHandler) *FindTodos

NewFindTodos creates a new http.Handler for the find todos operation

func (*FindTodos) ServeHTTP Uses

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

type FindTodosDefault Uses

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 Uses

func NewFindTodosDefault(code int) *FindTodosDefault

NewFindTodosDefault creates FindTodosDefault with default headers values

func (*FindTodosDefault) SetPayload Uses

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

SetPayload sets the payload to the find todos default response

func (*FindTodosDefault) SetStatusCode Uses

func (o *FindTodosDefault) SetStatusCode(code int)

SetStatusCode sets the status to the find todos default response

func (*FindTodosDefault) WithPayload Uses

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

WithPayload adds the payload to the find todos default response

func (*FindTodosDefault) WithStatusCode Uses

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

WithStatusCode adds the status to the find todos default response

func (*FindTodosDefault) WriteResponse Uses

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

WriteResponse to the client

type FindTodosHandler Uses

type FindTodosHandler interface {
    Handle(FindTodosParams) middleware.Responder
}

FindTodosHandler interface for that can handle valid find todos params

type FindTodosHandlerFunc Uses

type FindTodosHandlerFunc func(FindTodosParams) middleware.Responder

FindTodosHandlerFunc turns a function with the right signature into a find todos handler

func (FindTodosHandlerFunc) Handle Uses

func (fn FindTodosHandlerFunc) Handle(params FindTodosParams) middleware.Responder

Handle executing the request and returning a response

type FindTodosOK Uses

type FindTodosOK struct {

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

FindTodosOK list the todo operations

swagger:response findTodosOK

func NewFindTodosOK Uses

func NewFindTodosOK() *FindTodosOK

NewFindTodosOK creates FindTodosOK with default headers values

func (*FindTodosOK) SetPayload Uses

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

SetPayload sets the payload to the find todos o k response

func (*FindTodosOK) WithPayload Uses

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

WithPayload adds the payload to the find todos o k response

func (*FindTodosOK) WriteResponse Uses

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

WriteResponse to the client

type FindTodosParams Uses

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 Uses

func NewFindTodosParams() FindTodosParams

NewFindTodosParams creates a new FindTodosParams object with the default values initialized.

func (*FindTodosParams) BindRequest Uses

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.

type FindTodosURL Uses

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

FindTodosURL generates an URL for the find todos operation

func (*FindTodosURL) Build Uses

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

Build a url path and query string

func (*FindTodosURL) BuildFull Uses

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

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

func (*FindTodosURL) Must Uses

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

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

func (*FindTodosURL) SetBasePath Uses

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 (*FindTodosURL) String Uses

func (o *FindTodosURL) String() string

String returns the string representation of the path with query string

func (*FindTodosURL) StringFull Uses

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

StringFull returns the string representation of a complete url

func (*FindTodosURL) WithBasePath Uses

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

Package todos imports 10 packages (graph) and is imported by 7 packages. Updated 2020-01-28. Refresh now. Tools for package owners.