general

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2018 License: Apache-2.0, Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

View Source
const VersionInternalServerErrorCode int = 500

VersionInternalServerErrorCode is the HTTP code returned for type VersionInternalServerError

View Source
const VersionOKCode int = 200

VersionOKCode is the HTTP code returned for type VersionOK

Variables

This section is empty.

Functions

This section is empty.

Types

type Version

type Version struct {
	Context *middleware.Context
	Handler VersionHandler
}

Version swagger:route GET /version general version

Show current version of Weles internals

Version and state of API (e.g. v1 obsolete, v2 stable, v3 devel) and server version.

func NewVersion

func NewVersion(ctx *middleware.Context, handler VersionHandler) *Version

NewVersion creates a new http.Handler for the version operation

func (*Version) ServeHTTP

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

type VersionHandler

type VersionHandler interface {
	Handle(VersionParams) middleware.Responder
}

VersionHandler interface for that can handle valid version params

type VersionHandlerFunc

type VersionHandlerFunc func(VersionParams) middleware.Responder

VersionHandlerFunc turns a function with the right signature into a version handler

func (VersionHandlerFunc) Handle

Handle executing the request and returning a response

type VersionInternalServerError

type VersionInternalServerError struct {

	/*
	  In: Body
	*/
	Payload *weles.ErrResponse `json:"body,omitempty"`
}

VersionInternalServerError Internal Server error

swagger:response versionInternalServerError

func NewVersionInternalServerError

func NewVersionInternalServerError() *VersionInternalServerError

NewVersionInternalServerError creates VersionInternalServerError with default headers values

func (*VersionInternalServerError) SetPayload

func (o *VersionInternalServerError) SetPayload(payload *weles.ErrResponse)

SetPayload sets the payload to the version internal server error response

func (*VersionInternalServerError) WithPayload

WithPayload adds the payload to the version internal server error response

func (*VersionInternalServerError) WriteResponse

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

WriteResponse to the client

type VersionOK

type VersionOK struct {
	/*State of Weles API.

	 */
	WelesAPIState string `json:"Weles-API-State"`
	/*Version of Weles API.

	 */
	WelesAPIVersion string `json:"Weles-API-Version"`
	/*Version of Weles server.

	 */
	WelesServerVersion string `json:"Weles-Server-Version"`

	/*
	  In: Body
	*/
	Payload *weles.Version `json:"body,omitempty"`
}

VersionOK OK

swagger:response versionOK

func NewVersionOK

func NewVersionOK() *VersionOK

NewVersionOK creates VersionOK with default headers values

func (*VersionOK) SetPayload

func (o *VersionOK) SetPayload(payload *weles.Version)

SetPayload sets the payload to the version o k response

func (*VersionOK) SetWelesAPIState

func (o *VersionOK) SetWelesAPIState(welesAPIState string)

SetWelesAPIState sets the welesApiState to the version o k response

func (*VersionOK) SetWelesAPIVersion

func (o *VersionOK) SetWelesAPIVersion(welesAPIVersion string)

SetWelesAPIVersion sets the welesApiVersion to the version o k response

func (*VersionOK) SetWelesServerVersion

func (o *VersionOK) SetWelesServerVersion(welesServerVersion string)

SetWelesServerVersion sets the welesServerVersion to the version o k response

func (*VersionOK) WithPayload

func (o *VersionOK) WithPayload(payload *weles.Version) *VersionOK

WithPayload adds the payload to the version o k response

func (*VersionOK) WithWelesAPIState

func (o *VersionOK) WithWelesAPIState(welesAPIState string) *VersionOK

WithWelesAPIState adds the welesApiState to the version o k response

func (*VersionOK) WithWelesAPIVersion

func (o *VersionOK) WithWelesAPIVersion(welesAPIVersion string) *VersionOK

WithWelesAPIVersion adds the welesApiVersion to the version o k response

func (*VersionOK) WithWelesServerVersion

func (o *VersionOK) WithWelesServerVersion(welesServerVersion string) *VersionOK

WithWelesServerVersion adds the welesServerVersion to the version o k response

func (*VersionOK) WriteResponse

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

WriteResponse to the client

type VersionParams

type VersionParams struct {

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

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

swagger:parameters Version

func NewVersionParams

func NewVersionParams() VersionParams

NewVersionParams creates a new VersionParams object no default values defined in spec.

func (*VersionParams) BindRequest

func (o *VersionParams) 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 NewVersionParams() beforehand.

type VersionURL

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

VersionURL generates an URL for the version operation

func (*VersionURL) Build

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

Build a url path and query string

func (*VersionURL) BuildFull

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

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

func (*VersionURL) Must

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

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

func (*VersionURL) SetBasePath

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

func (o *VersionURL) String() string

String returns the string representation of the path with query string

func (*VersionURL) StringFull

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

StringFull returns the string representation of a complete url

func (*VersionURL) WithBasePath

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

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