Documentation ¶
Index ¶
- Constants
- type Alive
- type AliveHandler
- type AliveHandlerFunc
- type AliveOK
- type AliveParams
- type AliveURL
- func (o *AliveURL) Build() (*url.URL, error)
- func (o *AliveURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *AliveURL) Must(u *url.URL, err error) *url.URL
- func (o *AliveURL) SetBasePath(bp string)
- func (o *AliveURL) String() string
- func (o *AliveURL) StringFull(scheme, host string) string
- func (o *AliveURL) WithBasePath(bp string) *AliveURL
Constants ¶
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
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 ¶
func (fn AliveHandlerFunc) Handle(params AliveParams) middleware.Responder
Handle executing the request and returning a response
type AliveOK ¶
type AliveOK struct { }
AliveOK Service is alive.
swagger:response aliveOK
func (*AliveOK) WriteResponse ¶
func (o *AliveOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type AliveParams ¶
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) SetBasePath ¶
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) StringFull ¶
StringFull returns the string representation of a complete url
func (*AliveURL) WithBasePath ¶
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