login

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: AGPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const GetCurrentBookingsInternalServerErrorCode int = 500

GetCurrentBookingsInternalServerErrorCode is the HTTP code returned for type GetCurrentBookingsInternalServerError

View Source
const GetCurrentBookingsNotFoundCode int = 404

GetCurrentBookingsNotFoundCode is the HTTP code returned for type GetCurrentBookingsNotFound

View Source
const GetCurrentBookingsOKCode int = 200

GetCurrentBookingsOKCode is the HTTP code returned for type GetCurrentBookingsOK

View Source
const GetCurrentBookingsUnauthorizedCode int = 401

GetCurrentBookingsUnauthorizedCode is the HTTP code returned for type GetCurrentBookingsUnauthorized

View Source
const LoginInternalServerErrorCode int = 500

LoginInternalServerErrorCode is the HTTP code returned for type LoginInternalServerError

View Source
const LoginOKCode int = 200

LoginOKCode is the HTTP code returned for type LoginOK

View Source
const LoginUnauthorizedCode int = 401

LoginUnauthorizedCode is the HTTP code returned for type LoginUnauthorized

Variables

This section is empty.

Functions

This section is empty.

Types

type GetCurrentBookings

type GetCurrentBookings struct {
	Context *middleware.Context
	Handler GetCurrentBookingsHandler
}
GetCurrentBookings swagger:route GET /login login getCurrentBookings

Get current bookings

Get details of currently held bookings and max number of bookings that can be held

func NewGetCurrentBookings

func NewGetCurrentBookings(ctx *middleware.Context, handler GetCurrentBookingsHandler) *GetCurrentBookings

NewGetCurrentBookings creates a new http.Handler for the get current bookings operation

func (*GetCurrentBookings) ServeHTTP

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

type GetCurrentBookingsHandler

type GetCurrentBookingsHandler interface {
	Handle(GetCurrentBookingsParams, interface{}) middleware.Responder
}

GetCurrentBookingsHandler interface for that can handle valid get current bookings params

type GetCurrentBookingsHandlerFunc

type GetCurrentBookingsHandlerFunc func(GetCurrentBookingsParams, interface{}) middleware.Responder

GetCurrentBookingsHandlerFunc turns a function with the right signature into a get current bookings handler

func (GetCurrentBookingsHandlerFunc) Handle

func (fn GetCurrentBookingsHandlerFunc) Handle(params GetCurrentBookingsParams, principal interface{}) middleware.Responder

Handle executing the request and returning a response

type GetCurrentBookingsInternalServerError

type GetCurrentBookingsInternalServerError struct {

	/*
	  In: Body
	*/
	Payload interface{} `json:"body,omitempty"`
}

GetCurrentBookingsInternalServerError Internal Error

swagger:response getCurrentBookingsInternalServerError

func NewGetCurrentBookingsInternalServerError

func NewGetCurrentBookingsInternalServerError() *GetCurrentBookingsInternalServerError

NewGetCurrentBookingsInternalServerError creates GetCurrentBookingsInternalServerError with default headers values

func (*GetCurrentBookingsInternalServerError) SetPayload

func (o *GetCurrentBookingsInternalServerError) SetPayload(payload interface{})

SetPayload sets the payload to the get current bookings internal server error response

func (*GetCurrentBookingsInternalServerError) WithPayload

WithPayload adds the payload to the get current bookings internal server error response

func (*GetCurrentBookingsInternalServerError) WriteResponse

WriteResponse to the client

type GetCurrentBookingsNotFound

type GetCurrentBookingsNotFound struct {

	/*
	  In: Body
	*/
	Payload interface{} `json:"body,omitempty"`
}

GetCurrentBookingsNotFound Not Found

swagger:response getCurrentBookingsNotFound

func NewGetCurrentBookingsNotFound

func NewGetCurrentBookingsNotFound() *GetCurrentBookingsNotFound

NewGetCurrentBookingsNotFound creates GetCurrentBookingsNotFound with default headers values

func (*GetCurrentBookingsNotFound) SetPayload

func (o *GetCurrentBookingsNotFound) SetPayload(payload interface{})

SetPayload sets the payload to the get current bookings not found response

func (*GetCurrentBookingsNotFound) WithPayload

func (o *GetCurrentBookingsNotFound) WithPayload(payload interface{}) *GetCurrentBookingsNotFound

WithPayload adds the payload to the get current bookings not found response

func (*GetCurrentBookingsNotFound) WriteResponse

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

WriteResponse to the client

type GetCurrentBookingsOK

type GetCurrentBookingsOK struct {

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

GetCurrentBookingsOK get current bookings o k

swagger:response getCurrentBookingsOK

func NewGetCurrentBookingsOK

func NewGetCurrentBookingsOK() *GetCurrentBookingsOK

NewGetCurrentBookingsOK creates GetCurrentBookingsOK with default headers values

func (*GetCurrentBookingsOK) SetPayload

func (o *GetCurrentBookingsOK) SetPayload(payload *models.Bookings)

SetPayload sets the payload to the get current bookings o k response

func (*GetCurrentBookingsOK) WithPayload

func (o *GetCurrentBookingsOK) WithPayload(payload *models.Bookings) *GetCurrentBookingsOK

WithPayload adds the payload to the get current bookings o k response

func (*GetCurrentBookingsOK) WriteResponse

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

WriteResponse to the client

type GetCurrentBookingsParams

type GetCurrentBookingsParams struct {

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

GetCurrentBookingsParams contains all the bound params for the get current bookings operation typically these are obtained from a http.Request

swagger:parameters getCurrentBookings

func NewGetCurrentBookingsParams

func NewGetCurrentBookingsParams() GetCurrentBookingsParams

NewGetCurrentBookingsParams creates a new GetCurrentBookingsParams object

There are no default values defined in the spec.

func (*GetCurrentBookingsParams) BindRequest

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 NewGetCurrentBookingsParams() beforehand.

type GetCurrentBookingsURL

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

GetCurrentBookingsURL generates an URL for the get current bookings operation

func (*GetCurrentBookingsURL) Build

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

Build a url path and query string

func (*GetCurrentBookingsURL) BuildFull

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

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

func (*GetCurrentBookingsURL) Must

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

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

func (*GetCurrentBookingsURL) SetBasePath

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

func (o *GetCurrentBookingsURL) String() string

String returns the string representation of the path with query string

func (*GetCurrentBookingsURL) StringFull

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

StringFull returns the string representation of a complete url

func (*GetCurrentBookingsURL) WithBasePath

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

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 GetCurrentBookingsUnauthorized

type GetCurrentBookingsUnauthorized struct {

	/*
	  In: Body
	*/
	Payload interface{} `json:"body,omitempty"`
}

GetCurrentBookingsUnauthorized Unauthorized

swagger:response getCurrentBookingsUnauthorized

func NewGetCurrentBookingsUnauthorized

func NewGetCurrentBookingsUnauthorized() *GetCurrentBookingsUnauthorized

NewGetCurrentBookingsUnauthorized creates GetCurrentBookingsUnauthorized with default headers values

func (*GetCurrentBookingsUnauthorized) SetPayload

func (o *GetCurrentBookingsUnauthorized) SetPayload(payload interface{})

SetPayload sets the payload to the get current bookings unauthorized response

func (*GetCurrentBookingsUnauthorized) WithPayload

func (o *GetCurrentBookingsUnauthorized) WithPayload(payload interface{}) *GetCurrentBookingsUnauthorized

WithPayload adds the payload to the get current bookings unauthorized response

func (*GetCurrentBookingsUnauthorized) WriteResponse

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

WriteResponse to the client

type Login

type Login struct {
	Context *middleware.Context
	Handler LoginHandler
}
Login swagger:route POST /login login login

login

Login with a class token to get an individual booking token, usable for a finite period.

func NewLogin

func NewLogin(ctx *middleware.Context, handler LoginHandler) *Login

NewLogin creates a new http.Handler for the login operation

func (*Login) ServeHTTP

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

type LoginBody

type LoginBody struct {

	// booking token
	// Example: ey...
	Token string `json:"token,omitempty"`
}

LoginBody login body

swagger:model LoginBody

func (*LoginBody) ContextValidate

func (o *LoginBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error

ContextValidate validates this login body based on context it is used

func (*LoginBody) MarshalBinary

func (o *LoginBody) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*LoginBody) UnmarshalBinary

func (o *LoginBody) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*LoginBody) Validate

func (o *LoginBody) Validate(formats strfmt.Registry) error

Validate validates this login body

type LoginHandler

type LoginHandler interface {
	Handle(LoginParams, interface{}) middleware.Responder
}

LoginHandler interface for that can handle valid login params

type LoginHandlerFunc

type LoginHandlerFunc func(LoginParams, interface{}) middleware.Responder

LoginHandlerFunc turns a function with the right signature into a login handler

func (LoginHandlerFunc) Handle

func (fn LoginHandlerFunc) Handle(params LoginParams, principal interface{}) middleware.Responder

Handle executing the request and returning a response

type LoginInternalServerError

type LoginInternalServerError struct {

	/*
	  In: Body
	*/
	Payload interface{} `json:"body,omitempty"`
}

LoginInternalServerError Internal Error

swagger:response loginInternalServerError

func NewLoginInternalServerError

func NewLoginInternalServerError() *LoginInternalServerError

NewLoginInternalServerError creates LoginInternalServerError with default headers values

func (*LoginInternalServerError) SetPayload

func (o *LoginInternalServerError) SetPayload(payload interface{})

SetPayload sets the payload to the login internal server error response

func (*LoginInternalServerError) WithPayload

func (o *LoginInternalServerError) WithPayload(payload interface{}) *LoginInternalServerError

WithPayload adds the payload to the login internal server error response

func (*LoginInternalServerError) WriteResponse

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

WriteResponse to the client

type LoginOK

type LoginOK struct {

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

LoginOK login o k

swagger:response loginOK

func NewLoginOK

func NewLoginOK() *LoginOK

NewLoginOK creates LoginOK with default headers values

func (*LoginOK) SetPayload

func (o *LoginOK) SetPayload(payload *models.Bookingtoken)

SetPayload sets the payload to the login o k response

func (*LoginOK) WithPayload

func (o *LoginOK) WithPayload(payload *models.Bookingtoken) *LoginOK

WithPayload adds the payload to the login o k response

func (*LoginOK) WriteResponse

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

WriteResponse to the client

type LoginParams

type LoginParams struct {

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

	/*
	  In: body
	*/
	Expired LoginBody
}

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

swagger:parameters login

func NewLoginParams

func NewLoginParams() LoginParams

NewLoginParams creates a new LoginParams object

There are no default values defined in the spec.

func (*LoginParams) BindRequest

func (o *LoginParams) 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 NewLoginParams() beforehand.

type LoginURL

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

LoginURL generates an URL for the login operation

func (*LoginURL) Build

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

Build a url path and query string

func (*LoginURL) BuildFull

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

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

func (*LoginURL) Must

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

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

func (*LoginURL) SetBasePath

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

func (o *LoginURL) String() string

String returns the string representation of the path with query string

func (*LoginURL) StringFull

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

StringFull returns the string representation of a complete url

func (*LoginURL) WithBasePath

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

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 LoginUnauthorized

type LoginUnauthorized struct {

	/*
	  In: Body
	*/
	Payload interface{} `json:"body,omitempty"`
}

LoginUnauthorized Unauthorized

swagger:response loginUnauthorized

func NewLoginUnauthorized

func NewLoginUnauthorized() *LoginUnauthorized

NewLoginUnauthorized creates LoginUnauthorized with default headers values

func (*LoginUnauthorized) SetPayload

func (o *LoginUnauthorized) SetPayload(payload interface{})

SetPayload sets the payload to the login unauthorized response

func (*LoginUnauthorized) WithPayload

func (o *LoginUnauthorized) WithPayload(payload interface{}) *LoginUnauthorized

WithPayload adds the payload to the login unauthorized response

func (*LoginUnauthorized) WriteResponse

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