service

package
v0.0.0-...-25ad089 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2021 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const InvokeInternalServerErrorCode int = 500

InvokeInternalServerErrorCode is the HTTP code returned for type InvokeInternalServerError

View Source
const InvokeOKCode int = 200

InvokeOKCode is the HTTP code returned for type InvokeOK

View Source
const InvokeServiceUnavailableCode int = 503

InvokeServiceUnavailableCode is the HTTP code returned for type InvokeServiceUnavailable

Variables

This section is empty.

Functions

This section is empty.

Types

type Invoke

type Invoke struct {
	Context *middleware.Context
	Handler InvokeHandler
}
Invoke swagger:route POST /invoke service invoke

Invoke test service.

func NewInvoke

func NewInvoke(ctx *middleware.Context, handler InvokeHandler) *Invoke

NewInvoke creates a new http.Handler for the invoke operation

func (*Invoke) ServeHTTP

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

type InvokeHandler

type InvokeHandler interface {
	Handle(InvokeParams) middleware.Responder
}

InvokeHandler interface for that can handle valid invoke params

type InvokeHandlerFunc

type InvokeHandlerFunc func(InvokeParams) middleware.Responder

InvokeHandlerFunc turns a function with the right signature into a invoke handler

func (InvokeHandlerFunc) Handle

Handle executing the request and returning a response

type InvokeInternalServerError

type InvokeInternalServerError struct {

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

InvokeInternalServerError Internal Server Error

swagger:response invokeInternalServerError

func NewInvokeInternalServerError

func NewInvokeInternalServerError() *InvokeInternalServerError

NewInvokeInternalServerError creates InvokeInternalServerError with default headers values

func (*InvokeInternalServerError) SetPayload

func (o *InvokeInternalServerError) SetPayload(payload *models.StandardError)

SetPayload sets the payload to the invoke internal server error response

func (*InvokeInternalServerError) WithPayload

WithPayload adds the payload to the invoke internal server error response

func (*InvokeInternalServerError) WriteResponse

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

WriteResponse to the client

type InvokeOK

type InvokeOK struct {

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

InvokeOK Success

swagger:response invokeOK

func NewInvokeOK

func NewInvokeOK() *InvokeOK

NewInvokeOK creates InvokeOK with default headers values

func (*InvokeOK) SetPayload

func (o *InvokeOK) SetPayload(payload *models.HTTPResponse)

SetPayload sets the payload to the invoke o k response

func (*InvokeOK) WithPayload

func (o *InvokeOK) WithPayload(payload *models.HTTPResponse) *InvokeOK

WithPayload adds the payload to the invoke o k response

func (*InvokeOK) WriteResponse

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

WriteResponse to the client

type InvokeParams

type InvokeParams struct {

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

	/*
	  Required: true
	  In: body
	*/
	Data *models.HTTPRequest
}

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

swagger:parameters invoke

func NewInvokeParams

func NewInvokeParams() InvokeParams

NewInvokeParams creates a new InvokeParams object

There are no default values defined in the spec.

func (*InvokeParams) BindRequest

func (o *InvokeParams) 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 NewInvokeParams() beforehand.

type InvokeServiceUnavailable

type InvokeServiceUnavailable struct {

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

InvokeServiceUnavailable Service Unavailable

swagger:response invokeServiceUnavailable

func NewInvokeServiceUnavailable

func NewInvokeServiceUnavailable() *InvokeServiceUnavailable

NewInvokeServiceUnavailable creates InvokeServiceUnavailable with default headers values

func (*InvokeServiceUnavailable) SetPayload

func (o *InvokeServiceUnavailable) SetPayload(payload *models.StandardError)

SetPayload sets the payload to the invoke service unavailable response

func (*InvokeServiceUnavailable) WithPayload

WithPayload adds the payload to the invoke service unavailable response

func (*InvokeServiceUnavailable) WriteResponse

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

WriteResponse to the client

type InvokeURL

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

InvokeURL generates an URL for the invoke operation

func (*InvokeURL) Build

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

Build a url path and query string

func (*InvokeURL) BuildFull

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

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

func (*InvokeURL) Must

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

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

func (*InvokeURL) SetBasePath

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

func (o *InvokeURL) String() string

String returns the string representation of the path with query string

func (*InvokeURL) StringFull

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

StringFull returns the string representation of a complete url

func (*InvokeURL) WithBasePath

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

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