service

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: MulanPSL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ReadyzOKCode int = 200

ReadyzOKCode is the HTTP code returned for type ReadyzOK

Variables

This section is empty.

Functions

This section is empty.

Types

type Readyz

type Readyz struct {
	Context *middleware.Context
	Handler ReadyzHandler
}
Readyz swagger:route GET /readyz Service readyz

Ready status

func NewReadyz

func NewReadyz(ctx *middleware.Context, handler ReadyzHandler) *Readyz

NewReadyz creates a new http.Handler for the readyz operation

func (*Readyz) ServeHTTP

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

type ReadyzHandler

type ReadyzHandler interface {
	Handle(ReadyzParams) middleware.Responder
}

ReadyzHandler interface for that can handle valid readyz params

type ReadyzHandlerFunc

type ReadyzHandlerFunc func(ReadyzParams) middleware.Responder

ReadyzHandlerFunc turns a function with the right signature into a readyz handler

func (ReadyzHandlerFunc) Handle

Handle executing the request and returning a response

type ReadyzOK

type ReadyzOK struct {

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

ReadyzOK Ready status

swagger:response readyzOK

func NewReadyzOK

func NewReadyzOK() *ReadyzOK

NewReadyzOK creates ReadyzOK with default headers values

func (*ReadyzOK) SetPayload

func (o *ReadyzOK) SetPayload(payload models.ReadyStatus)

SetPayload sets the payload to the readyz o k response

func (*ReadyzOK) WithPayload

func (o *ReadyzOK) WithPayload(payload models.ReadyStatus) *ReadyzOK

WithPayload adds the payload to the readyz o k response

func (*ReadyzOK) WriteResponse

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

WriteResponse to the client

type ReadyzParams

type ReadyzParams struct {

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

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

swagger:parameters readyz

func NewReadyzParams

func NewReadyzParams() ReadyzParams

NewReadyzParams creates a new ReadyzParams object

There are no default values defined in the spec.

func (*ReadyzParams) BindRequest

func (o *ReadyzParams) 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 NewReadyzParams() beforehand.

type ReadyzURL

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

ReadyzURL generates an URL for the readyz operation

func (*ReadyzURL) Build

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

Build a url path and query string

func (*ReadyzURL) BuildFull

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

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

func (*ReadyzURL) Must

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

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

func (*ReadyzURL) SetBasePath

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

func (o *ReadyzURL) String() string

String returns the string representation of the path with query string

func (*ReadyzURL) StringFull

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

StringFull returns the string representation of a complete url

func (*ReadyzURL) WithBasePath

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

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