import "github.com/go-swagger/go-swagger/examples/authentication/restapi/operations/customers"
create.go create_parameters.go create_responses.go create_urlbuilder.go get_id.go get_id_parameters.go get_id_responses.go get_id_urlbuilder.go
CreateCreatedCode is the HTTP code returned for type CreateCreated
GetIDNotFoundCode is the HTTP code returned for type GetIDNotFound
GetIDOKCode is the HTTP code returned for type GetIDOK
GetIDUnauthorizedCode is the HTTP code returned for type GetIDUnauthorized
type Create struct { Context *middleware.Context Handler CreateHandler }
Create swagger:route POST /customers customers create
Create a new customer to track
func NewCreate(ctx *middleware.Context, handler CreateHandler) *Create
NewCreate creates a new http.Handler for the create operation
CreateCreated created
swagger:response createCreated
func NewCreateCreated() *CreateCreated
NewCreateCreated creates CreateCreated with default headers values
func (o *CreateCreated) SetPayload(payload *models.Customer)
SetPayload sets the payload to the create created response
func (o *CreateCreated) WithPayload(payload *models.Customer) *CreateCreated
WithPayload adds the payload to the create created response
func (o *CreateCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type CreateDefault struct { /* In: Body */ Payload *models.Error `json:"body,omitempty"` // contains filtered or unexported fields }
CreateDefault error
swagger:response createDefault
func NewCreateDefault(code int) *CreateDefault
NewCreateDefault creates CreateDefault with default headers values
func (o *CreateDefault) SetPayload(payload *models.Error)
SetPayload sets the payload to the create default response
func (o *CreateDefault) SetStatusCode(code int)
SetStatusCode sets the status to the create default response
func (o *CreateDefault) WithPayload(payload *models.Error) *CreateDefault
WithPayload adds the payload to the create default response
func (o *CreateDefault) WithStatusCode(code int) *CreateDefault
WithStatusCode adds the status to the create default response
func (o *CreateDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type CreateHandler interface { Handle(CreateParams, *models.Principal) middleware.Responder }
CreateHandler interface for that can handle valid create params
type CreateHandlerFunc func(CreateParams, *models.Principal) middleware.Responder
CreateHandlerFunc turns a function with the right signature into a create handler
func (fn CreateHandlerFunc) Handle(params CreateParams, principal *models.Principal) middleware.Responder
Handle executing the request and returning a response
type CreateParams struct { // HTTP Request Object HTTPRequest *http.Request `json:"-"` /* In: body */ Info *models.Customer }
CreateParams contains all the bound params for the create operation typically these are obtained from a http.Request
swagger:parameters create
func NewCreateParams() CreateParams
NewCreateParams creates a new CreateParams object
There are no default values defined in the spec.
func (o *CreateParams) 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 NewCreateParams() beforehand.
type CreateURL struct {
// contains filtered or unexported fields
}
CreateURL generates an URL for the create 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 GetID struct { Context *middleware.Context Handler GetIDHandler }
GetID swagger:route GET /customers customers getId
Get a customerId given an SSN
func NewGetID(ctx *middleware.Context, handler GetIDHandler) *GetID
NewGetID creates a new http.Handler for the get Id operation
type GetIDDefault struct { /* In: Body */ Payload *models.Error `json:"body,omitempty"` // contains filtered or unexported fields }
GetIDDefault error
swagger:response getIdDefault
func NewGetIDDefault(code int) *GetIDDefault
NewGetIDDefault creates GetIDDefault with default headers values
func (o *GetIDDefault) SetPayload(payload *models.Error)
SetPayload sets the payload to the get Id default response
func (o *GetIDDefault) SetStatusCode(code int)
SetStatusCode sets the status to the get Id default response
func (o *GetIDDefault) WithPayload(payload *models.Error) *GetIDDefault
WithPayload adds the payload to the get Id default response
func (o *GetIDDefault) WithStatusCode(code int) *GetIDDefault
WithStatusCode adds the status to the get Id default response
func (o *GetIDDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type GetIDHandler interface { Handle(GetIDParams, *models.Principal) middleware.Responder }
GetIDHandler interface for that can handle valid get Id params
type GetIDHandlerFunc func(GetIDParams, *models.Principal) middleware.Responder
GetIDHandlerFunc turns a function with the right signature into a get Id handler
func (fn GetIDHandlerFunc) Handle(params GetIDParams, principal *models.Principal) middleware.Responder
Handle executing the request and returning a response
GetIDNotFound resource not found
swagger:response getIdNotFound
func NewGetIDNotFound() *GetIDNotFound
NewGetIDNotFound creates GetIDNotFound with default headers values
func (o *GetIDNotFound) SetPayload(payload *models.Error)
SetPayload sets the payload to the get Id not found response
func (o *GetIDNotFound) WithPayload(payload *models.Error) *GetIDNotFound
WithPayload adds the payload to the get Id not found response
func (o *GetIDNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
GetIDOK OK
swagger:response getIdOK
NewGetIDOK creates GetIDOK with default headers values
SetPayload sets the payload to the get Id o k response
WithPayload adds the payload to the get Id o k response
WriteResponse to the client
type GetIDParams struct { // HTTP Request Object HTTPRequest *http.Request `json:"-"` /* In: body */ Info *models.SocialID }
GetIDParams contains all the bound params for the get Id operation typically these are obtained from a http.Request
swagger:parameters getId
func NewGetIDParams() GetIDParams
NewGetIDParams creates a new GetIDParams object
There are no default values defined in the spec.
func (o *GetIDParams) 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 NewGetIDParams() beforehand.
type GetIDURL struct {
// contains filtered or unexported fields
}
GetIDURL generates an URL for the get Id 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
GetIDUnauthorized unauthorized
swagger:response getIdUnauthorized
func NewGetIDUnauthorized() *GetIDUnauthorized
NewGetIDUnauthorized creates GetIDUnauthorized with default headers values
func (o *GetIDUnauthorized) SetPayload(payload *models.Error)
SetPayload sets the payload to the get Id unauthorized response
func (o *GetIDUnauthorized) WithPayload(payload *models.Error) *GetIDUnauthorized
WithPayload adds the payload to the get Id unauthorized response
func (o *GetIDUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
Package customers imports 10 packages (graph) and is imported by 4 packages. Updated 2021-01-26. Refresh now. Tools for package owners.