general

package
v0.0.0-...-764e792 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const HealthcheckOKCode int = 200

HealthcheckOKCode is the HTTP code returned for type HealthcheckOK

View Source
const LoginBadRequestCode int = 400

LoginBadRequestCode is the HTTP code returned for type LoginBadRequest

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 Healthcheck

type Healthcheck struct {
	Context *middleware.Context
	Handler HealthcheckHandler
}
Healthcheck swagger:route GET /health general healthcheck

Healthcheck

Health check endpoint

func NewHealthcheck

func NewHealthcheck(ctx *middleware.Context, handler HealthcheckHandler) *Healthcheck

NewHealthcheck creates a new http.Handler for the healthcheck operation

func (*Healthcheck) ServeHTTP

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

type HealthcheckHandler

type HealthcheckHandler interface {
	Handle(HealthcheckParams) middleware.Responder
}

HealthcheckHandler interface for that can handle valid healthcheck params

type HealthcheckHandlerFunc

type HealthcheckHandlerFunc func(HealthcheckParams) middleware.Responder

HealthcheckHandlerFunc turns a function with the right signature into a healthcheck handler

func (HealthcheckHandlerFunc) Handle

Handle executing the request and returning a response

type HealthcheckOK

type HealthcheckOK struct {

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

HealthcheckOK Ok

swagger:response healthcheckOK

func NewHealthcheckOK

func NewHealthcheckOK() *HealthcheckOK

NewHealthcheckOK creates HealthcheckOK with default headers values

func (*HealthcheckOK) SetPayload

func (o *HealthcheckOK) SetPayload(payload string)

SetPayload sets the payload to the healthcheck o k response

func (*HealthcheckOK) WithPayload

func (o *HealthcheckOK) WithPayload(payload string) *HealthcheckOK

WithPayload adds the payload to the healthcheck o k response

func (*HealthcheckOK) WriteResponse

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

WriteResponse to the client

type HealthcheckParams

type HealthcheckParams struct {

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

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

swagger:parameters Healthcheck

func NewHealthcheckParams

func NewHealthcheckParams() HealthcheckParams

NewHealthcheckParams creates a new HealthcheckParams object

There are no default values defined in the spec.

func (*HealthcheckParams) BindRequest

func (o *HealthcheckParams) 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 NewHealthcheckParams() beforehand.

type HealthcheckURL

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

HealthcheckURL generates an URL for the healthcheck operation

func (*HealthcheckURL) Build

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

Build a url path and query string

func (*HealthcheckURL) BuildFull

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

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

func (*HealthcheckURL) Must

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

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

func (*HealthcheckURL) SetBasePath

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

func (o *HealthcheckURL) String() string

String returns the string representation of the path with query string

func (*HealthcheckURL) StringFull

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

StringFull returns the string representation of a complete url

func (*HealthcheckURL) WithBasePath

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

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 Login

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

Login

Returns JWT token for authorized user

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 LoginBadRequest

type LoginBadRequest struct {

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

LoginBadRequest Bad Request

swagger:response loginBadRequest

func NewLoginBadRequest

func NewLoginBadRequest() *LoginBadRequest

NewLoginBadRequest creates LoginBadRequest with default headers values

func (*LoginBadRequest) SetPayload

func (o *LoginBadRequest) SetPayload(payload *models.Error)

SetPayload sets the payload to the login bad request response

func (*LoginBadRequest) WithPayload

func (o *LoginBadRequest) WithPayload(payload *models.Error) *LoginBadRequest

WithPayload adds the payload to the login bad request response

func (*LoginBadRequest) WriteResponse

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

WriteResponse to the client

type LoginHandler

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

LoginHandler interface for that can handle valid login params

type LoginHandlerFunc

type LoginHandlerFunc func(LoginParams) middleware.Responder

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

func (LoginHandlerFunc) Handle

Handle executing the request and returning a response

type LoginInternalServerError

type LoginInternalServerError struct {

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

LoginInternalServerError Internal Server Error

swagger:response loginInternalServerError

func NewLoginInternalServerError

func NewLoginInternalServerError() *LoginInternalServerError

NewLoginInternalServerError creates LoginInternalServerError with default headers values

func (*LoginInternalServerError) SetPayload

func (o *LoginInternalServerError) SetPayload(payload *models.Error)

SetPayload sets the payload to the login internal server error response

func (*LoginInternalServerError) WithPayload

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.LoginSuccess `json:"body,omitempty"`
}

LoginOK Successful login

swagger:response loginOK

func NewLoginOK

func NewLoginOK() *LoginOK

NewLoginOK creates LoginOK with default headers values

func (*LoginOK) SetPayload

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

SetPayload sets the payload to the login o k response

func (*LoginOK) WithPayload

func (o *LoginOK) WithPayload(payload *models.LoginSuccess) *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:"-"`

	/*Login Payload
	  In: body
	*/
	Login *models.LoginInfo
}

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 *models.Error `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 *models.Error)

SetPayload sets the payload to the login unauthorized response

func (*LoginUnauthorized) WithPayload

func (o *LoginUnauthorized) WithPayload(payload *models.Error) *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
⌂ 换网址