auth

package
v0.0.0-...-e56e09a Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const PostLoginOKCode int = 200

PostLoginOKCode is the HTTP code returned for type PostLoginOK

View Source
const PostLoginUnauthorizedCode int = 401

PostLoginUnauthorizedCode is the HTTP code returned for type PostLoginUnauthorized

Variables

This section is empty.

Functions

This section is empty.

Types

type PostLogin

type PostLogin struct {
	Context *middleware.Context
	Handler PostLoginHandler
}

PostLogin swagger:route POST /login auth postLogin

Allow users to log in, and to receive a Token

func NewPostLogin

func NewPostLogin(ctx *middleware.Context, handler PostLoginHandler) *PostLogin

NewPostLogin creates a new http.Handler for the post login operation

func (*PostLogin) ServeHTTP

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

type PostLoginHandler

type PostLoginHandler interface {
	Handle(PostLoginParams) middleware.Responder
}

PostLoginHandler interface for that can handle valid post login params

type PostLoginHandlerFunc

type PostLoginHandlerFunc func(PostLoginParams) middleware.Responder

PostLoginHandlerFunc turns a function with the right signature into a post login handler

func (PostLoginHandlerFunc) Handle

Handle executing the request and returning a response

type PostLoginOK

type PostLoginOK struct {

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

PostLoginOK Login Success

swagger:response postLoginOK

func NewPostLoginOK

func NewPostLoginOK() *PostLoginOK

NewPostLoginOK creates PostLoginOK with default headers values

func (*PostLoginOK) SetPayload

func (o *PostLoginOK) SetPayload(payload *models.Token)

SetPayload sets the payload to the post login o k response

func (*PostLoginOK) WithPayload

func (o *PostLoginOK) WithPayload(payload *models.Token) *PostLoginOK

WithPayload adds the payload to the post login o k response

func (*PostLoginOK) WriteResponse

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

WriteResponse to the client

type PostLoginParams

type PostLoginParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request

	/*The username/password
	  Required: true
	  In: body
	*/
	Body *models.Login
}

PostLoginParams contains all the bound params for the post login operation typically these are obtained from a http.Request

swagger:parameters PostLogin

func NewPostLoginParams

func NewPostLoginParams() PostLoginParams

NewPostLoginParams creates a new PostLoginParams object with the default values initialized.

func (*PostLoginParams) BindRequest

func (o *PostLoginParams) 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 PostLoginURL

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

PostLoginURL generates an URL for the post login operation

func (*PostLoginURL) Build

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

Build a url path and query string

func (*PostLoginURL) BuildFull

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

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

func (*PostLoginURL) Must

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

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

func (*PostLoginURL) SetBasePath

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

func (o *PostLoginURL) String() string

String returns the string representation of the path with query string

func (*PostLoginURL) StringFull

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

StringFull returns the string representation of a complete url

func (*PostLoginURL) WithBasePath

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

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 PostLoginUnauthorized

type PostLoginUnauthorized struct {

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

PostLoginUnauthorized Whether the user is not found or error while login

swagger:response postLoginUnauthorized

func NewPostLoginUnauthorized

func NewPostLoginUnauthorized() *PostLoginUnauthorized

NewPostLoginUnauthorized creates PostLoginUnauthorized with default headers values

func (*PostLoginUnauthorized) SetPayload

func (o *PostLoginUnauthorized) SetPayload(payload *models.LoginError)

SetPayload sets the payload to the post login unauthorized response

func (*PostLoginUnauthorized) WithPayload

WithPayload adds the payload to the post login unauthorized response

func (*PostLoginUnauthorized) WriteResponse

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

WriteResponse to the client

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL