auth

package
v0.0.0-...-318a3d5 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
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

func (*Auth) ServeHTTP

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

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 NewAuthOK

func NewAuthOK() *AuthOK

NewAuthOK creates AuthOK with default headers values

func (*AuthOK) WriteResponse

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

WriteResponse to the client

type AuthParams

type AuthParams struct {

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

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) Build

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

Build a url path and query string

func (*AuthURL) BuildFull

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

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

func (*AuthURL) Must

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

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

func (*AuthURL) SetBasePath

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

func (o *AuthURL) String() string

String returns the string representation of the path with query string

func (*AuthURL) StringFull

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

StringFull returns the string representation of a complete url

func (*AuthURL) WithBasePath

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

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

Jump to

Keyboard shortcuts

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