operations

package
v0.0.1-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const GetCheckResultsOKCode int = 200

GetCheckResultsOKCode is the HTTP code returned for type GetCheckResultsOK

View Source
const GetPluginsOKCode int = 200

GetPluginsOKCode is the HTTP code returned for type GetPluginsOK

Variables

This section is empty.

Functions

This section is empty.

Types

type AnalyzeAPI

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

	// BasicAuthenticator generates a runtime.Authenticator from the supplied basic auth function.
	// It has a default implemention 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 implemention 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 implemention 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 a "application/json" mime type
	JSONConsumer runtime.Consumer

	// JSONProducer registers a producer for a "application/json" mime type
	JSONProducer runtime.Producer

	// GetCheckResultsHandler sets the operation handler for the get check results operation
	GetCheckResultsHandler GetCheckResultsHandler
	// GetPluginsHandler sets the operation handler for the get plugins operation
	GetPluginsHandler GetPluginsHandler

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

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

AnalyzeAPI the analyze API

func NewAnalyzeAPI

func NewAnalyzeAPI(spec *loads.Document) *AnalyzeAPI

NewAnalyzeAPI creates a new Analyze instance

func (*AnalyzeAPI) AuthenticatorsFor

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

AuthenticatorsFor gets the authenticators for the specified security schemes

func (*AnalyzeAPI) Authorizer

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

Authorizer returns the registered authorizer

func (*AnalyzeAPI) ConsumersFor

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

ConsumersFor gets the consumers for the specified media types

func (*AnalyzeAPI) Context

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

Context returns the middleware context for the analyze API

func (*AnalyzeAPI) DefaultConsumes

func (o *AnalyzeAPI) DefaultConsumes() string

DefaultConsumes returns the default consumes media type

func (*AnalyzeAPI) DefaultProduces

func (o *AnalyzeAPI) DefaultProduces() string

DefaultProduces returns the default produces media type

func (*AnalyzeAPI) Formats

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

Formats returns the registered string formats

func (*AnalyzeAPI) HandlerFor

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

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

func (*AnalyzeAPI) Init

func (o *AnalyzeAPI) Init()

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

func (*AnalyzeAPI) ProducersFor

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

ProducersFor gets the producers for the specified media types

func (*AnalyzeAPI) RegisterConsumer

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

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

func (*AnalyzeAPI) RegisterFormat

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

RegisterFormat registers a custom format validator

func (*AnalyzeAPI) RegisterProducer

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

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

func (*AnalyzeAPI) Serve

func (o *AnalyzeAPI) 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 (*AnalyzeAPI) ServeErrorFor

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

ServeErrorFor gets a error handler for a given operation id

func (*AnalyzeAPI) SetDefaultConsumes

func (o *AnalyzeAPI) SetDefaultConsumes(mediaType string)

SetDefaultConsumes returns the default consumes media type

func (*AnalyzeAPI) SetDefaultProduces

func (o *AnalyzeAPI) SetDefaultProduces(mediaType string)

SetDefaultProduces sets the default produces media type

func (*AnalyzeAPI) SetSpec

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

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

func (*AnalyzeAPI) Validate

func (o *AnalyzeAPI) Validate() error

Validate validates the registrations in the AnalyzeAPI

type GetCheckResults

type GetCheckResults struct {
	Context *middleware.Context
	Handler GetCheckResultsHandler
}

GetCheckResults swagger:route GET /check getCheckResults

Returns list of check results produced by installed plugins

func NewGetCheckResults

func NewGetCheckResults(ctx *middleware.Context, handler GetCheckResultsHandler) *GetCheckResults

NewGetCheckResults creates a new http.Handler for the get check results operation

func (*GetCheckResults) ServeHTTP

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

type GetCheckResultsDefault

type GetCheckResultsDefault struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
	// contains filtered or unexported fields
}

GetCheckResultsDefault error

swagger:response getCheckResultsDefault

func NewGetCheckResultsDefault

func NewGetCheckResultsDefault(code int) *GetCheckResultsDefault

NewGetCheckResultsDefault creates GetCheckResultsDefault with default headers values

func (*GetCheckResultsDefault) SetPayload

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

SetPayload sets the payload to the get check results default response

func (*GetCheckResultsDefault) SetStatusCode

func (o *GetCheckResultsDefault) SetStatusCode(code int)

SetStatusCode sets the status to the get check results default response

func (*GetCheckResultsDefault) WithPayload

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

WithPayload adds the payload to the get check results default response

func (*GetCheckResultsDefault) WithStatusCode

func (o *GetCheckResultsDefault) WithStatusCode(code int) *GetCheckResultsDefault

WithStatusCode adds the status to the get check results default response

func (*GetCheckResultsDefault) WriteResponse

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

WriteResponse to the client

type GetCheckResultsHandler

type GetCheckResultsHandler interface {
	Handle(GetCheckResultsParams) middleware.Responder
}

GetCheckResultsHandler interface for that can handle valid get check results params

type GetCheckResultsHandlerFunc

type GetCheckResultsHandlerFunc func(GetCheckResultsParams) middleware.Responder

GetCheckResultsHandlerFunc turns a function with the right signature into a get check results handler

func (GetCheckResultsHandlerFunc) Handle

Handle executing the request and returning a response

type GetCheckResultsOK

type GetCheckResultsOK struct {

	/*existing checks
	  In: Body
	*/
	Payload []*models.CheckResult `json:"body,omitempty"`
}

GetCheckResultsOK no error

swagger:response getCheckResultsOK

func NewGetCheckResultsOK

func NewGetCheckResultsOK() *GetCheckResultsOK

NewGetCheckResultsOK creates GetCheckResultsOK with default headers values

func (*GetCheckResultsOK) SetPayload

func (o *GetCheckResultsOK) SetPayload(payload []*models.CheckResult)

SetPayload sets the payload to the get check results o k response

func (*GetCheckResultsOK) WithPayload

func (o *GetCheckResultsOK) WithPayload(payload []*models.CheckResult) *GetCheckResultsOK

WithPayload adds the payload to the get check results o k response

func (*GetCheckResultsOK) WriteResponse

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

WriteResponse to the client

type GetCheckResultsParams

type GetCheckResultsParams struct {

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

GetCheckResultsParams contains all the bound params for the get check results operation typically these are obtained from a http.Request

swagger:parameters getCheckResults

func NewGetCheckResultsParams

func NewGetCheckResultsParams() GetCheckResultsParams

NewGetCheckResultsParams creates a new GetCheckResultsParams object no default values defined in spec.

func (*GetCheckResultsParams) BindRequest

func (o *GetCheckResultsParams) 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 NewGetCheckResultsParams() beforehand.

type GetCheckResultsURL

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

GetCheckResultsURL generates an URL for the get check results operation

func (*GetCheckResultsURL) Build

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

Build a url path and query string

func (*GetCheckResultsURL) BuildFull

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

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

func (*GetCheckResultsURL) Must

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

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

func (*GetCheckResultsURL) SetBasePath

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

func (o *GetCheckResultsURL) String() string

String returns the string representation of the path with query string

func (*GetCheckResultsURL) StringFull

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

StringFull returns the string representation of a complete url

func (*GetCheckResultsURL) WithBasePath

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

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 GetPlugins

type GetPlugins struct {
	Context *middleware.Context
	Handler GetPluginsHandler
}

GetPlugins swagger:route GET /plugin getPlugins

Returns list of the installed recommendation plugins

func NewGetPlugins

func NewGetPlugins(ctx *middleware.Context, handler GetPluginsHandler) *GetPlugins

NewGetPlugins creates a new http.Handler for the get plugins operation

func (*GetPlugins) ServeHTTP

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

type GetPluginsDefault

type GetPluginsDefault struct {

	/*
	  In: Body
	*/
	Payload *models.Error `json:"body,omitempty"`
	// contains filtered or unexported fields
}

GetPluginsDefault error

swagger:response getPluginsDefault

func NewGetPluginsDefault

func NewGetPluginsDefault(code int) *GetPluginsDefault

NewGetPluginsDefault creates GetPluginsDefault with default headers values

func (*GetPluginsDefault) SetPayload

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

SetPayload sets the payload to the get plugins default response

func (*GetPluginsDefault) SetStatusCode

func (o *GetPluginsDefault) SetStatusCode(code int)

SetStatusCode sets the status to the get plugins default response

func (*GetPluginsDefault) WithPayload

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

WithPayload adds the payload to the get plugins default response

func (*GetPluginsDefault) WithStatusCode

func (o *GetPluginsDefault) WithStatusCode(code int) *GetPluginsDefault

WithStatusCode adds the status to the get plugins default response

func (*GetPluginsDefault) WriteResponse

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

WriteResponse to the client

type GetPluginsHandler

type GetPluginsHandler interface {
	Handle(GetPluginsParams) middleware.Responder
}

GetPluginsHandler interface for that can handle valid get plugins params

type GetPluginsHandlerFunc

type GetPluginsHandlerFunc func(GetPluginsParams) middleware.Responder

GetPluginsHandlerFunc turns a function with the right signature into a get plugins handler

func (GetPluginsHandlerFunc) Handle

Handle executing the request and returning a response

type GetPluginsOK

type GetPluginsOK struct {

	/*installed plugins
	  In: Body
	*/
	Payload []*models.Plugin `json:"body,omitempty"`
}

GetPluginsOK no error

swagger:response getPluginsOK

func NewGetPluginsOK

func NewGetPluginsOK() *GetPluginsOK

NewGetPluginsOK creates GetPluginsOK with default headers values

func (*GetPluginsOK) SetPayload

func (o *GetPluginsOK) SetPayload(payload []*models.Plugin)

SetPayload sets the payload to the get plugins o k response

func (*GetPluginsOK) WithPayload

func (o *GetPluginsOK) WithPayload(payload []*models.Plugin) *GetPluginsOK

WithPayload adds the payload to the get plugins o k response

func (*GetPluginsOK) WriteResponse

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

WriteResponse to the client

type GetPluginsParams

type GetPluginsParams struct {

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

GetPluginsParams contains all the bound params for the get plugins operation typically these are obtained from a http.Request

swagger:parameters getPlugins

func NewGetPluginsParams

func NewGetPluginsParams() GetPluginsParams

NewGetPluginsParams creates a new GetPluginsParams object no default values defined in spec.

func (*GetPluginsParams) BindRequest

func (o *GetPluginsParams) 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 NewGetPluginsParams() beforehand.

type GetPluginsURL

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

GetPluginsURL generates an URL for the get plugins operation

func (*GetPluginsURL) Build

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

Build a url path and query string

func (*GetPluginsURL) BuildFull

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

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

func (*GetPluginsURL) Must

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

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

func (*GetPluginsURL) SetBasePath

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

func (o *GetPluginsURL) String() string

String returns the string representation of the path with query string

func (*GetPluginsURL) StringFull

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

StringFull returns the string representation of a complete url

func (*GetPluginsURL) WithBasePath

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

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