operations

package
v0.0.0-...-18cb8d9 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2023 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const StatusExperimentsInternalServerErrorCode int = 500

StatusExperimentsInternalServerErrorCode is the HTTP code returned for type StatusExperimentsInternalServerError

View Source
const StatusExperimentsNotFoundCode int = 404

StatusExperimentsNotFoundCode is the HTTP code returned for type StatusExperimentsNotFound

View Source
const StatusExperimentsOKCode int = 200

StatusExperimentsOKCode is the HTTP code returned for type StatusExperimentsOK

View Source
const StatusExperimentsUnauthorizedCode int = 401

StatusExperimentsUnauthorizedCode is the HTTP code returned for type StatusExperimentsUnauthorized

View Source
const StatusJumpsOKCode int = 200

StatusJumpsOKCode is the HTTP code returned for type StatusJumpsOK

View Source
const StatusJumpsUnauthorizedCode int = 401

StatusJumpsUnauthorizedCode is the HTTP code returned for type StatusJumpsUnauthorized

Variables

This section is empty.

Functions

This section is empty.

Types

type ServeAPI

type ServeAPI struct {
	Middleware func(middleware.Builder) http.Handler

	// BasicAuthenticator generates a runtime.Authenticator from the supplied basic auth function.
	// It has a default implementation in the security package, however you can replace it for your particular usage.
	BasicAuthenticator func(security.UserPassAuthentication) runtime.Authenticator

	// APIKeyAuthenticator generates a runtime.Authenticator from the supplied token auth function.
	// It has a default implementation in the security package, however you can replace it for your particular usage.
	APIKeyAuthenticator func(string, string, security.TokenAuthentication) runtime.Authenticator

	// BearerAuthenticator generates a runtime.Authenticator from the supplied bearer token auth function.
	// It has a default implementation in the security package, however you can replace it for your particular usage.
	BearerAuthenticator func(string, security.ScopedTokenAuthentication) runtime.Authenticator

	// JSONConsumer registers a consumer for the following mime types:
	//   - application/json
	JSONConsumer runtime.Consumer

	// JSONProducer registers a producer for the following mime types:
	//   - application/json
	JSONProducer runtime.Producer

	// BearerAuth registers a function that takes a token and returns a principal
	// it performs authentication based on an api key Authorization provided in the header
	BearerAuth func(string) (interface{}, error)

	// APIAuthorizer provides access control (ACL/RBAC/ABAC) by providing access to the request and authenticated principal
	APIAuthorizer runtime.Authorizer

	// StatusExperimentsHandler sets the operation handler for the status experiments operation
	StatusExperimentsHandler StatusExperimentsHandler
	// StatusJumpsHandler sets the operation handler for the status jumps operation
	StatusJumpsHandler StatusJumpsHandler

	// ServeError is called when an error is received, there is a default handler
	// but you can set your own with this
	ServeError func(http.ResponseWriter, *http.Request, error)

	// PreServerShutdown is called before the HTTP(S) server is shutdown
	// This allows for custom functions to get executed before the HTTP(S) server stops accepting traffic
	PreServerShutdown func()

	// ServerShutdown is called when the HTTP(S) server is shut down and done
	// handling all active connections and does not accept connections any more
	ServerShutdown func()

	// Custom command line argument groups with their descriptions
	CommandLineOptionsGroups []swag.CommandLineOptionsGroup

	// User defined logger function.
	Logger func(string, ...interface{})
	// contains filtered or unexported fields
}

ServeAPI API for accessing status of experiments

func NewServeAPI

func NewServeAPI(spec *loads.Document) *ServeAPI

NewServeAPI creates a new Serve instance

func (*ServeAPI) AddMiddlewareFor

func (o *ServeAPI) AddMiddlewareFor(method, path string, builder middleware.Builder)

AddMiddlewareFor adds a http middleware to existing handler

func (*ServeAPI) AuthenticatorsFor

func (o *ServeAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator

AuthenticatorsFor gets the authenticators for the specified security schemes

func (*ServeAPI) Authorizer

func (o *ServeAPI) Authorizer() runtime.Authorizer

Authorizer returns the registered authorizer

func (*ServeAPI) ConsumersFor

func (o *ServeAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer

ConsumersFor gets the consumers for the specified media types. MIME type parameters are ignored here.

func (*ServeAPI) Context

func (o *ServeAPI) Context() *middleware.Context

Context returns the middleware context for the serve API

func (*ServeAPI) DefaultConsumes

func (o *ServeAPI) DefaultConsumes() string

DefaultConsumes returns the default consumes media type

func (*ServeAPI) DefaultProduces

func (o *ServeAPI) DefaultProduces() string

DefaultProduces returns the default produces media type

func (*ServeAPI) Formats

func (o *ServeAPI) Formats() strfmt.Registry

Formats returns the registered string formats

func (*ServeAPI) HandlerFor

func (o *ServeAPI) HandlerFor(method, path string) (http.Handler, bool)

HandlerFor gets a http.Handler for the provided operation method and path

func (*ServeAPI) Init

func (o *ServeAPI) Init()

Init allows you to just initialize the handler cache, you can then recompose the middleware as you see fit

func (*ServeAPI) ProducersFor

func (o *ServeAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer

ProducersFor gets the producers for the specified media types. MIME type parameters are ignored here.

func (*ServeAPI) RegisterConsumer

func (o *ServeAPI) RegisterConsumer(mediaType string, consumer runtime.Consumer)

RegisterConsumer allows you to add (or override) a consumer for a media type.

func (*ServeAPI) RegisterFormat

func (o *ServeAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)

RegisterFormat registers a custom format validator

func (*ServeAPI) RegisterProducer

func (o *ServeAPI) RegisterProducer(mediaType string, producer runtime.Producer)

RegisterProducer allows you to add (or override) a producer for a media type.

func (*ServeAPI) Serve

func (o *ServeAPI) Serve(builder middleware.Builder) http.Handler

Serve creates a http handler to serve the API over HTTP can be used directly in http.ListenAndServe(":8000", api.Serve(nil))

func (*ServeAPI) ServeErrorFor

func (o *ServeAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)

ServeErrorFor gets a error handler for a given operation id

func (*ServeAPI) SetDefaultConsumes

func (o *ServeAPI) SetDefaultConsumes(mediaType string)

SetDefaultConsumes returns the default consumes media type

func (*ServeAPI) SetDefaultProduces

func (o *ServeAPI) SetDefaultProduces(mediaType string)

SetDefaultProduces sets the default produces media type

func (*ServeAPI) SetSpec

func (o *ServeAPI) SetSpec(spec *loads.Document)

SetSpec sets a spec that will be served for the clients.

func (*ServeAPI) UseRedoc

func (o *ServeAPI) UseRedoc()

UseRedoc for documentation at /docs

func (*ServeAPI) UseSwaggerUI

func (o *ServeAPI) UseSwaggerUI()

UseSwaggerUI for documentation at /docs

func (*ServeAPI) Validate

func (o *ServeAPI) Validate() error

Validate validates the registrations in the ServeAPI

type StatusExperiments

type StatusExperiments struct {
	Context *middleware.Context
	Handler StatusExperimentsHandler
}
StatusExperiments swagger:route GET /experiments statusExperiments

Get the status of all experiments

Get the status of all experiments

func NewStatusExperiments

func NewStatusExperiments(ctx *middleware.Context, handler StatusExperimentsHandler) *StatusExperiments

NewStatusExperiments creates a new http.Handler for the status experiments operation

func (*StatusExperiments) ServeHTTP

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

type StatusExperimentsHandler

type StatusExperimentsHandler interface {
	Handle(StatusExperimentsParams) middleware.Responder
}

StatusExperimentsHandler interface for that can handle valid status experiments params

type StatusExperimentsHandlerFunc

type StatusExperimentsHandlerFunc func(StatusExperimentsParams) middleware.Responder

StatusExperimentsHandlerFunc turns a function with the right signature into a status experiments handler

func (StatusExperimentsHandlerFunc) Handle

Handle executing the request and returning a response

type StatusExperimentsInternalServerError

type StatusExperimentsInternalServerError struct {

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

StatusExperimentsInternalServerError Internal Error

swagger:response statusExperimentsInternalServerError

func NewStatusExperimentsInternalServerError

func NewStatusExperimentsInternalServerError() *StatusExperimentsInternalServerError

NewStatusExperimentsInternalServerError creates StatusExperimentsInternalServerError with default headers values

func (*StatusExperimentsInternalServerError) SetPayload

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

SetPayload sets the payload to the status experiments internal server error response

func (*StatusExperimentsInternalServerError) WithPayload

WithPayload adds the payload to the status experiments internal server error response

func (*StatusExperimentsInternalServerError) WriteResponse

WriteResponse to the client

type StatusExperimentsNotFound

type StatusExperimentsNotFound struct {

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

StatusExperimentsNotFound The specified resource was not found

swagger:response statusExperimentsNotFound

func NewStatusExperimentsNotFound

func NewStatusExperimentsNotFound() *StatusExperimentsNotFound

NewStatusExperimentsNotFound creates StatusExperimentsNotFound with default headers values

func (*StatusExperimentsNotFound) SetPayload

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

SetPayload sets the payload to the status experiments not found response

func (*StatusExperimentsNotFound) WithPayload

WithPayload adds the payload to the status experiments not found response

func (*StatusExperimentsNotFound) WriteResponse

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

WriteResponse to the client

type StatusExperimentsOK

type StatusExperimentsOK struct {

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

StatusExperimentsOK OK

swagger:response statusExperimentsOK

func NewStatusExperimentsOK

func NewStatusExperimentsOK() *StatusExperimentsOK

NewStatusExperimentsOK creates StatusExperimentsOK with default headers values

func (*StatusExperimentsOK) SetPayload

func (o *StatusExperimentsOK) SetPayload(payload models.ExperimentStatuses)

SetPayload sets the payload to the status experiments o k response

func (*StatusExperimentsOK) WithPayload

WithPayload adds the payload to the status experiments o k response

func (*StatusExperimentsOK) WriteResponse

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

WriteResponse to the client

type StatusExperimentsParams

type StatusExperimentsParams struct {

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

StatusExperimentsParams contains all the bound params for the status experiments operation typically these are obtained from a http.Request

swagger:parameters statusExperiments

func NewStatusExperimentsParams

func NewStatusExperimentsParams() StatusExperimentsParams

NewStatusExperimentsParams creates a new StatusExperimentsParams object

There are no default values defined in the spec.

func (*StatusExperimentsParams) BindRequest

func (o *StatusExperimentsParams) 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 NewStatusExperimentsParams() beforehand.

type StatusExperimentsURL

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

StatusExperimentsURL generates an URL for the status experiments operation

func (*StatusExperimentsURL) Build

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

Build a url path and query string

func (*StatusExperimentsURL) BuildFull

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

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

func (*StatusExperimentsURL) Must

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

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

func (*StatusExperimentsURL) SetBasePath

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

func (o *StatusExperimentsURL) String() string

String returns the string representation of the path with query string

func (*StatusExperimentsURL) StringFull

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

StringFull returns the string representation of a complete url

func (*StatusExperimentsURL) WithBasePath

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

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

type StatusExperimentsUnauthorized

type StatusExperimentsUnauthorized struct {

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

StatusExperimentsUnauthorized Unauthorized

swagger:response statusExperimentsUnauthorized

func NewStatusExperimentsUnauthorized

func NewStatusExperimentsUnauthorized() *StatusExperimentsUnauthorized

NewStatusExperimentsUnauthorized creates StatusExperimentsUnauthorized with default headers values

func (*StatusExperimentsUnauthorized) SetPayload

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

SetPayload sets the payload to the status experiments unauthorized response

func (*StatusExperimentsUnauthorized) WithPayload

WithPayload adds the payload to the status experiments unauthorized response

func (*StatusExperimentsUnauthorized) WriteResponse

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

WriteResponse to the client

type StatusJumps

type StatusJumps struct {
	Context *middleware.Context
	Handler StatusJumpsHandler
}
StatusJumps swagger:route GET /jumps statusJumps

Get the status of all jump connections

Get the status of all jump connections

func NewStatusJumps

func NewStatusJumps(ctx *middleware.Context, handler StatusJumpsHandler) *StatusJumps

NewStatusJumps creates a new http.Handler for the status jumps operation

func (*StatusJumps) ServeHTTP

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

type StatusJumpsHandler

type StatusJumpsHandler interface {
	Handle(StatusJumpsParams, interface{}) middleware.Responder
}

StatusJumpsHandler interface for that can handle valid status jumps params

type StatusJumpsHandlerFunc

type StatusJumpsHandlerFunc func(StatusJumpsParams, interface{}) middleware.Responder

StatusJumpsHandlerFunc turns a function with the right signature into a status jumps handler

func (StatusJumpsHandlerFunc) Handle

func (fn StatusJumpsHandlerFunc) Handle(params StatusJumpsParams, principal interface{}) middleware.Responder

Handle executing the request and returning a response

type StatusJumpsOK

type StatusJumpsOK struct {

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

StatusJumpsOK Status

swagger:response statusJumpsOK

func NewStatusJumpsOK

func NewStatusJumpsOK() *StatusJumpsOK

NewStatusJumpsOK creates StatusJumpsOK with default headers values

func (*StatusJumpsOK) SetPayload

func (o *StatusJumpsOK) SetPayload(payload models.JumpStatuses)

SetPayload sets the payload to the status jumps o k response

func (*StatusJumpsOK) WithPayload

func (o *StatusJumpsOK) WithPayload(payload models.JumpStatuses) *StatusJumpsOK

WithPayload adds the payload to the status jumps o k response

func (*StatusJumpsOK) WriteResponse

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

WriteResponse to the client

type StatusJumpsParams

type StatusJumpsParams struct {

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

StatusJumpsParams contains all the bound params for the status jumps operation typically these are obtained from a http.Request

swagger:parameters statusJumps

func NewStatusJumpsParams

func NewStatusJumpsParams() StatusJumpsParams

NewStatusJumpsParams creates a new StatusJumpsParams object

There are no default values defined in the spec.

func (*StatusJumpsParams) BindRequest

func (o *StatusJumpsParams) 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 NewStatusJumpsParams() beforehand.

type StatusJumpsURL

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

StatusJumpsURL generates an URL for the status jumps operation

func (*StatusJumpsURL) Build

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

Build a url path and query string

func (*StatusJumpsURL) BuildFull

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

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

func (*StatusJumpsURL) Must

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

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

func (*StatusJumpsURL) SetBasePath

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

func (o *StatusJumpsURL) String() string

String returns the string representation of the path with query string

func (*StatusJumpsURL) StringFull

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

StringFull returns the string representation of a complete url

func (*StatusJumpsURL) WithBasePath

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

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

type StatusJumpsUnauthorized

type StatusJumpsUnauthorized struct {

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

StatusJumpsUnauthorized Unauthorized

swagger:response statusJumpsUnauthorized

func NewStatusJumpsUnauthorized

func NewStatusJumpsUnauthorized() *StatusJumpsUnauthorized

NewStatusJumpsUnauthorized creates StatusJumpsUnauthorized with default headers values

func (*StatusJumpsUnauthorized) SetPayload

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

SetPayload sets the payload to the status jumps unauthorized response

func (*StatusJumpsUnauthorized) WithPayload

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

WithPayload adds the payload to the status jumps unauthorized response

func (*StatusJumpsUnauthorized) WriteResponse

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

WriteResponse to the client

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL