ping

package
v0.0.0-...-5097846 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2017 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const PingBadRequestCode int = 400

PingBadRequestCode is the HTTP code returned for type PingBadRequest

View Source
const PingForbiddenCode int = 403

PingForbiddenCode is the HTTP code returned for type PingForbidden

View Source
const PingInternalServerErrorCode int = 500

PingInternalServerErrorCode is the HTTP code returned for type PingInternalServerError

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 /ping ping ping

does it ping yet?

YAML-based definitions suck

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 PingBadRequest

type PingBadRequest struct {
}

PingBadRequest Invalid status value

swagger:response pingBadRequest

func NewPingBadRequest

func NewPingBadRequest() *PingBadRequest

NewPingBadRequest creates PingBadRequest with default headers values

func (*PingBadRequest) WriteResponse

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

WriteResponse to the client

type PingForbidden

type PingForbidden struct {
}

PingForbidden Access denied

swagger:response pingForbidden

func NewPingForbidden

func NewPingForbidden() *PingForbidden

NewPingForbidden creates PingForbidden with default headers values

func (*PingForbidden) WriteResponse

func (o *PingForbidden) 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 PingInternalServerError

type PingInternalServerError struct {
}

PingInternalServerError Operation error

swagger:response pingInternalServerError

func NewPingInternalServerError

func NewPingInternalServerError() *PingInternalServerError

NewPingInternalServerError creates PingInternalServerError with default headers values

func (*PingInternalServerError) WriteResponse

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

WriteResponse to the client

type PingOK

type PingOK struct {

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

PingOK successful operation

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

	/*Login
	  Required: true
	  In: query
	*/
	Login string
	/*Password
	  Required: true
	  In: query
	*/
	Password string
}

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 with the default values initialized.

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

type PingURL

type PingURL struct {
	Login    string
	Password string
	// 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