Documentation ¶
Index ¶
- Constants
- type Auth
- type AuthHandler
- type AuthHandlerFunc
- type AuthOK
- type AuthParams
- type AuthURL
- func (o *AuthURL) Build() (*url.URL, error)
- func (o *AuthURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *AuthURL) Must(u *url.URL, err error) *url.URL
- func (o *AuthURL) SetBasePath(bp string)
- func (o *AuthURL) String() string
- func (o *AuthURL) StringFull(scheme, host string) string
- func (o *AuthURL) WithBasePath(bp string) *AuthURL
Constants ¶
const AuthOKCode int = 200
AuthOKCode is the HTTP code returned for type AuthOK
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct { Context *middleware.Context Handler AuthHandler }
Auth swagger:route POST /auth Auth auth
Checks the provided token
func NewAuth ¶
func NewAuth(ctx *middleware.Context, handler AuthHandler) *Auth
NewAuth creates a new http.Handler for the auth operation
type AuthHandler ¶
type AuthHandler interface {
Handle(AuthParams, *models.Principal) middleware.Responder
}
AuthHandler interface for that can handle valid auth params
type AuthHandlerFunc ¶
type AuthHandlerFunc func(AuthParams, *models.Principal) middleware.Responder
AuthHandlerFunc turns a function with the right signature into a auth handler
func (AuthHandlerFunc) Handle ¶
func (fn AuthHandlerFunc) Handle(params AuthParams, principal *models.Principal) middleware.Responder
Handle executing the request and returning a response
type AuthOK ¶
type AuthOK struct { }
AuthOK Authenticated
swagger:response authOK
func (*AuthOK) WriteResponse ¶
func (o *AuthOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type AuthParams ¶
AuthParams contains all the bound params for the auth operation typically these are obtained from a http.Request
swagger:parameters auth
func NewAuthParams ¶
func NewAuthParams() AuthParams
NewAuthParams creates a new AuthParams object
There are no default values defined in the spec.
func (*AuthParams) BindRequest ¶
func (o *AuthParams) 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 NewAuthParams() beforehand.
type AuthURL ¶
type AuthURL struct {
// contains filtered or unexported fields
}
AuthURL generates an URL for the auth operation
func (*AuthURL) SetBasePath ¶
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 (*AuthURL) StringFull ¶
StringFull returns the string representation of a complete url
func (*AuthURL) WithBasePath ¶
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