operations

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2017 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EsioAPI

type EsioAPI struct {
	Middleware func(middleware.Builder) http.Handler
	// 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

	// IndexDeleteStartEndHandler sets the operation handler for the delete start end operation
	IndexDeleteStartEndHandler index.DeleteStartEndHandler
	// HealthGetHealthzHandler sets the operation handler for the get healthz operation
	HealthGetHealthzHandler health.GetHealthzHandler
	// IndexGetStartEndHandler sets the operation handler for the get start end operation
	IndexGetStartEndHandler index.GetStartEndHandler
	// IndexPostStartEndHandler sets the operation handler for the post start end operation
	IndexPostStartEndHandler index.PostStartEndHandler

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

EsioAPI Orchestrates the recovery and cleanup of Elasticsearch index snapshots.

func NewEsioAPI

func NewEsioAPI(spec *loads.Document) *EsioAPI

NewEsioAPI creates a new Esio instance

func (*EsioAPI) AuthenticatorsFor

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

AuthenticatorsFor gets the authenticators for the specified security schemes

func (*EsioAPI) ConsumersFor

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

ConsumersFor gets the consumers for the specified media types

func (*EsioAPI) Context

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

Context returns the middleware context for the esio API

func (*EsioAPI) DefaultConsumes

func (o *EsioAPI) DefaultConsumes() string

DefaultConsumes returns the default consumes media type

func (*EsioAPI) DefaultProduces

func (o *EsioAPI) DefaultProduces() string

DefaultProduces returns the default produces media type

func (*EsioAPI) Formats

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

Formats returns the registered string formats

func (*EsioAPI) HandlerFor

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

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

func (*EsioAPI) Init

func (o *EsioAPI) Init()

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

func (*EsioAPI) ProducersFor

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

ProducersFor gets the producers for the specified media types

func (*EsioAPI) RegisterFormat

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

RegisterFormat registers a custom format validator

func (*EsioAPI) Serve

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

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

ServeErrorFor gets a error handler for a given operation id

func (*EsioAPI) SetDefaultConsumes

func (o *EsioAPI) SetDefaultConsumes(mediaType string)

SetDefaultConsumes returns the default consumes media type

func (*EsioAPI) SetDefaultProduces

func (o *EsioAPI) SetDefaultProduces(mediaType string)

SetDefaultProduces sets the default produces media type

func (*EsioAPI) SetSpec

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

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

func (*EsioAPI) Validate

func (o *EsioAPI) Validate() error

Validate validates the registrations in the EsioAPI

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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