Documentation ¶
Index ¶
- Constants
- type ServeAPI
- func (o *ServeAPI) AddMiddlewareFor(method, path string, builder middleware.Builder)
- func (o *ServeAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
- func (o *ServeAPI) Authorizer() runtime.Authorizer
- func (o *ServeAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
- func (o *ServeAPI) Context() *middleware.Context
- func (o *ServeAPI) DefaultConsumes() string
- func (o *ServeAPI) DefaultProduces() string
- func (o *ServeAPI) Formats() strfmt.Registry
- func (o *ServeAPI) HandlerFor(method, path string) (http.Handler, bool)
- func (o *ServeAPI) Init()
- func (o *ServeAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
- func (o *ServeAPI) RegisterConsumer(mediaType string, consumer runtime.Consumer)
- func (o *ServeAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
- func (o *ServeAPI) RegisterProducer(mediaType string, producer runtime.Producer)
- func (o *ServeAPI) Serve(builder middleware.Builder) http.Handler
- func (o *ServeAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
- func (o *ServeAPI) SetDefaultConsumes(mediaType string)
- func (o *ServeAPI) SetDefaultProduces(mediaType string)
- func (o *ServeAPI) SetSpec(spec *loads.Document)
- func (o *ServeAPI) UseRedoc()
- func (o *ServeAPI) UseSwaggerUI()
- func (o *ServeAPI) Validate() error
- type StatusExperiments
- type StatusExperimentsHandler
- type StatusExperimentsHandlerFunc
- type StatusExperimentsInternalServerError
- func (o *StatusExperimentsInternalServerError) SetPayload(payload *models.Error)
- func (o *StatusExperimentsInternalServerError) WithPayload(payload *models.Error) *StatusExperimentsInternalServerError
- func (o *StatusExperimentsInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
- type StatusExperimentsNotFound
- type StatusExperimentsOK
- type StatusExperimentsParams
- type StatusExperimentsURL
- func (o *StatusExperimentsURL) Build() (*url.URL, error)
- func (o *StatusExperimentsURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *StatusExperimentsURL) Must(u *url.URL, err error) *url.URL
- func (o *StatusExperimentsURL) SetBasePath(bp string)
- func (o *StatusExperimentsURL) String() string
- func (o *StatusExperimentsURL) StringFull(scheme, host string) string
- func (o *StatusExperimentsURL) WithBasePath(bp string) *StatusExperimentsURL
- type StatusExperimentsUnauthorized
- type StatusJumps
- type StatusJumpsHandler
- type StatusJumpsHandlerFunc
- type StatusJumpsOK
- type StatusJumpsParams
- type StatusJumpsURL
- func (o *StatusJumpsURL) Build() (*url.URL, error)
- func (o *StatusJumpsURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *StatusJumpsURL) Must(u *url.URL, err error) *url.URL
- func (o *StatusJumpsURL) SetBasePath(bp string)
- func (o *StatusJumpsURL) String() string
- func (o *StatusJumpsURL) StringFull(scheme, host string) string
- func (o *StatusJumpsURL) WithBasePath(bp string) *StatusJumpsURL
- type StatusJumpsUnauthorized
Constants ¶
const StatusExperimentsInternalServerErrorCode int = 500
StatusExperimentsInternalServerErrorCode is the HTTP code returned for type StatusExperimentsInternalServerError
const StatusExperimentsNotFoundCode int = 404
StatusExperimentsNotFoundCode is the HTTP code returned for type StatusExperimentsNotFound
const StatusExperimentsOKCode int = 200
StatusExperimentsOKCode is the HTTP code returned for type StatusExperimentsOK
StatusExperimentsUnauthorizedCode is the HTTP code returned for type StatusExperimentsUnauthorized
const StatusJumpsOKCode int = 200
StatusJumpsOKCode is the HTTP code returned for type StatusJumpsOK
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 ¶
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 ¶
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 ¶
DefaultConsumes returns the default consumes media type
func (*ServeAPI) DefaultProduces ¶
DefaultProduces returns the default produces media type
func (*ServeAPI) HandlerFor ¶
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 ¶
ProducersFor gets the producers for the specified media types. MIME type parameters are ignored here.
func (*ServeAPI) RegisterConsumer ¶
RegisterConsumer allows you to add (or override) a consumer for a media type.
func (*ServeAPI) RegisterFormat ¶
RegisterFormat registers a custom format validator
func (*ServeAPI) RegisterProducer ¶
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 ¶
SetDefaultConsumes returns the default consumes media type
func (*ServeAPI) SetDefaultProduces ¶
SetDefaultProduces sets the default produces media type
func (*ServeAPI) UseSwaggerUI ¶
func (o *ServeAPI) UseSwaggerUI()
UseSwaggerUI for documentation at /docs
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 ¶
func (fn StatusExperimentsHandlerFunc) Handle(params StatusExperimentsParams) middleware.Responder
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 ¶
func (o *StatusExperimentsInternalServerError) WithPayload(payload *models.Error) *StatusExperimentsInternalServerError
WithPayload adds the payload to the status experiments internal server error response
func (*StatusExperimentsInternalServerError) WriteResponse ¶
func (o *StatusExperimentsInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
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 ¶
func (o *StatusExperimentsNotFound) WithPayload(payload *models.Error) *StatusExperimentsNotFound
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 ¶
func (o *StatusExperimentsOK) WithPayload(payload models.ExperimentStatuses) *StatusExperimentsOK
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 ¶
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 ¶
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 ¶
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 ¶
func (o *StatusExperimentsUnauthorized) WithPayload(payload *models.Error) *StatusExperimentsUnauthorized
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 ¶
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 ¶
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 ¶
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