system

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const AliveOKCode int = 200

AliveOKCode is the HTTP code returned for type AliveOK

Variables

This section is empty.

Functions

This section is empty.

Types

type Alive

type Alive struct {
	Context *middleware.Context
	Handler AliveHandler
}

Alive swagger:route GET /api/alive system alive

Used by Caddy or other reverse proxy to determine if the service is alive.

Any non-200 response means the service is not alive.

func NewAlive

func NewAlive(ctx *middleware.Context, handler AliveHandler) *Alive

NewAlive creates a new http.Handler for the alive operation

func (*Alive) ServeHTTP

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

type AliveHandler

type AliveHandler interface {
	Handle(AliveParams) middleware.Responder
}

AliveHandler interface for that can handle valid alive params

type AliveHandlerFunc

type AliveHandlerFunc func(AliveParams) middleware.Responder

AliveHandlerFunc turns a function with the right signature into a alive handler

func (AliveHandlerFunc) Handle

Handle executing the request and returning a response

type AliveOK

type AliveOK struct {
}

AliveOK Service is alive.

swagger:response aliveOK

func NewAliveOK

func NewAliveOK() *AliveOK

NewAliveOK creates AliveOK with default headers values

func (*AliveOK) WriteResponse

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

WriteResponse to the client

type AliveParams

type AliveParams struct {

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

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

swagger:parameters alive

func NewAliveParams

func NewAliveParams() AliveParams

NewAliveParams creates a new AliveParams object no default values defined in spec.

func (*AliveParams) BindRequest

func (o *AliveParams) 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 NewAliveParams() beforehand.

type AliveURL

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

AliveURL generates an URL for the alive operation

func (*AliveURL) Build

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

Build a url path and query string

func (*AliveURL) BuildFull

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

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

func (*AliveURL) Must

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

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

func (*AliveURL) SetBasePath

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

func (o *AliveURL) String() string

String returns the string representation of the path with query string

func (*AliveURL) StringFull

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

StringFull returns the string representation of a complete url

func (*AliveURL) WithBasePath

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

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