ping

package
v3.2.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2018 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const PingOKCode int = 200

PingOKCode is the HTTP code returned for type PingOK

Variables

This section is empty.

Functions

This section is empty.

Types

type Ping

type Ping struct {
	Context *middleware.Context
	Handler PingHandler
}

Ping swagger:route GET /api/ping ping ping

Ping ping API

func NewPing

func NewPing(ctx *middleware.Context, handler PingHandler) *Ping

NewPing creates a new http.Handler for the ping operation

func (*Ping) ServeHTTP

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

type PingDefault

type PingDefault struct {

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

PingDefault generic error response

swagger:response pingDefault

func NewPingDefault

func NewPingDefault(code int) *PingDefault

NewPingDefault creates PingDefault with default headers values

func (*PingDefault) SetPayload

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

SetPayload sets the payload to the ping default response

func (*PingDefault) SetStatusCode

func (o *PingDefault) SetStatusCode(code int)

SetStatusCode sets the status to the ping default response

func (*PingDefault) WithPayload

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

WithPayload adds the payload to the ping default response

func (*PingDefault) WithStatusCode

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

WithStatusCode adds the status to the ping default response

func (*PingDefault) WriteResponse

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

WriteResponse to the client

type PingHandler

type PingHandler interface {
	Handle(PingParams) middleware.Responder
}

PingHandler interface for that can handle valid ping params

type PingHandlerFunc

type PingHandlerFunc func(PingParams) middleware.Responder

PingHandlerFunc turns a function with the right signature into a ping handler

func (PingHandlerFunc) Handle

func (fn PingHandlerFunc) Handle(params PingParams) middleware.Responder

Handle executing the request and returning a response

type PingOK

type PingOK struct {

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

PingOK this server is healthy

swagger:response pingOK

func NewPingOK

func NewPingOK() *PingOK

NewPingOK creates PingOK with default headers values

func (*PingOK) SetPayload

func (o *PingOK) SetPayload(payload string)

SetPayload sets the payload to the ping o k response

func (*PingOK) WithPayload

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

WithPayload adds the payload to the ping o k response

func (*PingOK) WriteResponse

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

WriteResponse to the client

type PingParams

type PingParams struct {

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

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

swagger:parameters ping

func NewPingParams

func NewPingParams() PingParams

NewPingParams creates a new PingParams object no default values defined in spec.

func (*PingParams) BindRequest

func (o *PingParams) 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 NewPingParams() beforehand.

type PingURL

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

PingURL generates an URL for the ping operation

func (*PingURL) Build

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

Build a url path and query string

func (*PingURL) BuildFull

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

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

func (*PingURL) Must

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

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

func (*PingURL) SetBasePath

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

func (o *PingURL) String() string

String returns the string representation of the path with query string

func (*PingURL) StringFull

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

StringFull returns the string representation of a complete url

func (*PingURL) WithBasePath

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

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