auth

package
v0.0.0-...-50c9e83 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const PostAuthOKCode int = 200

PostAuthOKCode is the HTTP code returned for type PostAuthOK

View Source
const PostAuthUnauthorizedCode int = 401

PostAuthUnauthorizedCode is the HTTP code returned for type PostAuthUnauthorized

Variables

This section is empty.

Functions

This section is empty.

Types

type PostAuth

type PostAuth struct {
	Context *middleware.Context
	Handler PostAuthHandler
}
PostAuth swagger:route POST /auth Auth postAuth

Auth request

func NewPostAuth

func NewPostAuth(ctx *middleware.Context, handler PostAuthHandler) *PostAuth

NewPostAuth creates a new http.Handler for the post auth operation

func (*PostAuth) ServeHTTP

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

type PostAuthHandler

type PostAuthHandler interface {
	Handle(PostAuthParams, interface{}) middleware.Responder
}

PostAuthHandler interface for that can handle valid post auth params

type PostAuthHandlerFunc

type PostAuthHandlerFunc func(PostAuthParams, interface{}) middleware.Responder

PostAuthHandlerFunc turns a function with the right signature into a post auth handler

func (PostAuthHandlerFunc) Handle

func (fn PostAuthHandlerFunc) Handle(params PostAuthParams, principal interface{}) middleware.Responder

Handle executing the request and returning a response

type PostAuthOK

type PostAuthOK struct {

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

PostAuthOK Response for auth request

swagger:response postAuthOK

func NewPostAuthOK

func NewPostAuthOK() *PostAuthOK

NewPostAuthOK creates PostAuthOK with default headers values

func (*PostAuthOK) SetPayload

func (o *PostAuthOK) SetPayload(payload *models.AuthResponse)

SetPayload sets the payload to the post auth o k response

func (*PostAuthOK) WithPayload

func (o *PostAuthOK) WithPayload(payload *models.AuthResponse) *PostAuthOK

WithPayload adds the payload to the post auth o k response

func (*PostAuthOK) WriteResponse

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

WriteResponse to the client

type PostAuthParams

type PostAuthParams struct {

	// HTTP Request Object
	HTTPRequest *http.Request `json:"-"`

	/*
	  In: body
	*/
	Body *models.AuthRequest
}

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

swagger:parameters PostAuth

func NewPostAuthParams

func NewPostAuthParams() PostAuthParams

NewPostAuthParams creates a new PostAuthParams object

There are no default values defined in the spec.

func (*PostAuthParams) BindRequest

func (o *PostAuthParams) 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 NewPostAuthParams() beforehand.

type PostAuthURL

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

PostAuthURL generates an URL for the post auth operation

func (*PostAuthURL) Build

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

Build a url path and query string

func (*PostAuthURL) BuildFull

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

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

func (*PostAuthURL) Must

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

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

func (*PostAuthURL) SetBasePath

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

func (o *PostAuthURL) String() string

String returns the string representation of the path with query string

func (*PostAuthURL) StringFull

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

StringFull returns the string representation of a complete url

func (*PostAuthURL) WithBasePath

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

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 PostAuthUnauthorized

type PostAuthUnauthorized struct {

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

PostAuthUnauthorized Error when auth

swagger:response postAuthUnauthorized

func NewPostAuthUnauthorized

func NewPostAuthUnauthorized() *PostAuthUnauthorized

NewPostAuthUnauthorized creates PostAuthUnauthorized with default headers values

func (*PostAuthUnauthorized) SetPayload

func (o *PostAuthUnauthorized) SetPayload(payload *models.ErrorResponse)

SetPayload sets the payload to the post auth unauthorized response

func (*PostAuthUnauthorized) WithPayload

WithPayload adds the payload to the post auth unauthorized response

func (*PostAuthUnauthorized) WriteResponse

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