operations

package
v0.0.0-...-0997622 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnmasseRestAPI

type EnmasseRestAPI 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

	// AddressesCreateAddressHandler sets the operation handler for the create address operation
	AddressesCreateAddressHandler addresses.CreateAddressHandler
	// AddressesDeleteAddressesHandler sets the operation handler for the delete addresses operation
	AddressesDeleteAddressesHandler addresses.DeleteAddressesHandler
	// AddressesListAddressesHandler sets the operation handler for the list addresses operation
	AddressesListAddressesHandler addresses.ListAddressesHandler
	// AddressesPutAddressesHandler sets the operation handler for the put addresses operation
	AddressesPutAddressesHandler addresses.PutAddressesHandler

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

EnmasseRestAPI The REST API server for the EnMasse messaging service

func NewEnmasseRestAPI

func NewEnmasseRestAPI(spec *loads.Document) *EnmasseRestAPI

NewEnmasseRestAPI creates a new EnmasseRest instance

func (*EnmasseRestAPI) AuthenticatorsFor

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

AuthenticatorsFor gets the authenticators for the specified security schemes

func (*EnmasseRestAPI) ConsumersFor

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

ConsumersFor gets the consumers for the specified media types

func (*EnmasseRestAPI) Context

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

Context returns the middleware context for the enmasse rest API

func (*EnmasseRestAPI) DefaultConsumes

func (o *EnmasseRestAPI) DefaultConsumes() string

DefaultConsumes returns the default consumes media type

func (*EnmasseRestAPI) DefaultProduces

func (o *EnmasseRestAPI) DefaultProduces() string

DefaultProduces returns the default produces media type

func (*EnmasseRestAPI) Formats

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

Formats returns the registered string formats

func (*EnmasseRestAPI) HandlerFor

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

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

func (*EnmasseRestAPI) Init

func (o *EnmasseRestAPI) Init()

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

func (*EnmasseRestAPI) ProducersFor

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

ProducersFor gets the producers for the specified media types

func (*EnmasseRestAPI) RegisterFormat

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

RegisterFormat registers a custom format validator

func (*EnmasseRestAPI) Serve

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

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

ServeErrorFor gets a error handler for a given operation id

func (*EnmasseRestAPI) SetDefaultConsumes

func (o *EnmasseRestAPI) SetDefaultConsumes(mediaType string)

SetDefaultConsumes returns the default consumes media type

func (*EnmasseRestAPI) SetDefaultProduces

func (o *EnmasseRestAPI) SetDefaultProduces(mediaType string)

SetDefaultProduces sets the default produces media type

func (*EnmasseRestAPI) SetSpec

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

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

func (*EnmasseRestAPI) Validate

func (o *EnmasseRestAPI) Validate() error

Validate validates the registrations in the EnmasseRestAPI

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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