system

package
v0.0.0-...-3c2e68c Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const HealthBadRequestCode int = 400

HealthBadRequestCode is the HTTP code returned for type HealthBadRequest

View Source
const HealthOKCode int = 200

HealthOKCode is the HTTP code returned for type HealthOK

Variables

This section is empty.

Functions

This section is empty.

Types

type Health

type Health struct {
	Context *middleware.Context
	Handler HealthHandler
}
Health swagger:route GET /health system health

Reports server status

Reports server status

func NewHealth

func NewHealth(ctx *middleware.Context, handler HealthHandler) *Health

NewHealth creates a new http.Handler for the health operation

func (*Health) ServeHTTP

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

type HealthBadRequest

type HealthBadRequest struct {

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

HealthBadRequest Bad Request

swagger:response healthBadRequest

func NewHealthBadRequest

func NewHealthBadRequest() *HealthBadRequest

NewHealthBadRequest creates HealthBadRequest with default headers values

func (*HealthBadRequest) SetPayload

func (o *HealthBadRequest) SetPayload(payload string)

SetPayload sets the payload to the health bad request response

func (*HealthBadRequest) WithPayload

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

WithPayload adds the payload to the health bad request response

func (*HealthBadRequest) WriteResponse

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

WriteResponse to the client

type HealthDefault

type HealthDefault struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
	// contains filtered or unexported fields
}

HealthDefault generic error response

swagger:response healthDefault

func NewHealthDefault

func NewHealthDefault(code int) *HealthDefault

NewHealthDefault creates HealthDefault with default headers values

func (*HealthDefault) SetPayload

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

SetPayload sets the payload to the health default response

func (*HealthDefault) SetStatusCode

func (o *HealthDefault) SetStatusCode(code int)

SetStatusCode sets the status to the health default response

func (*HealthDefault) WithPayload

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

WithPayload adds the payload to the health default response

func (*HealthDefault) WithStatusCode

func (o *HealthDefault) WithStatusCode(code int) *HealthDefault

WithStatusCode adds the status to the health default response

func (*HealthDefault) WriteResponse

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

WriteResponse to the client

type HealthHandler

type HealthHandler interface {
	Handle(HealthParams) middleware.Responder
}

HealthHandler interface for that can handle valid health params

type HealthHandlerFunc

type HealthHandlerFunc func(HealthParams) middleware.Responder

HealthHandlerFunc turns a function with the right signature into a health handler

func (HealthHandlerFunc) Handle

Handle executing the request and returning a response

type HealthOK

type HealthOK struct {

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

HealthOK OK

swagger:response healthOK

func NewHealthOK

func NewHealthOK() *HealthOK

NewHealthOK creates HealthOK with default headers values

func (*HealthOK) SetPayload

func (o *HealthOK) SetPayload(payload *models.ModelsHealthResponse)

SetPayload sets the payload to the health o k response

func (*HealthOK) WithPayload

func (o *HealthOK) WithPayload(payload *models.ModelsHealthResponse) *HealthOK

WithPayload adds the payload to the health o k response

func (*HealthOK) WriteResponse

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

WriteResponse to the client

type HealthParams

type HealthParams struct {

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

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

swagger:parameters health

func NewHealthParams

func NewHealthParams() HealthParams

NewHealthParams creates a new HealthParams object

There are no default values defined in the spec.

func (*HealthParams) BindRequest

func (o *HealthParams) 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 NewHealthParams() beforehand.

type HealthURL

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

HealthURL generates an URL for the health operation

func (*HealthURL) Build

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

Build a url path and query string

func (*HealthURL) BuildFull

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

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

func (*HealthURL) Must

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

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

func (*HealthURL) SetBasePath

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

func (o *HealthURL) String() string

String returns the string representation of the path with query string

func (*HealthURL) StringFull

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

StringFull returns the string representation of a complete url

func (*HealthURL) WithBasePath

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

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