restapi

package
v0.10.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CiliumAPI

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

	// EndpointDeleteEndpointIDHandler sets the operation handler for the delete endpoint ID operation
	EndpointDeleteEndpointIDHandler endpoint.DeleteEndpointIDHandler
	// IPAMDeleteIPAMIPHandler sets the operation handler for the delete IP a m IP operation
	IPAMDeleteIPAMIPHandler ipam.DeleteIPAMIPHandler
	// PolicyDeletePolicyHandler sets the operation handler for the delete policy operation
	PolicyDeletePolicyHandler policy.DeletePolicyHandler
	// ServiceDeleteServiceIDHandler sets the operation handler for the delete service ID operation
	ServiceDeleteServiceIDHandler service.DeleteServiceIDHandler
	// DaemonGetConfigHandler sets the operation handler for the get config operation
	DaemonGetConfigHandler daemon.GetConfigHandler
	// EndpointGetEndpointHandler sets the operation handler for the get endpoint operation
	EndpointGetEndpointHandler endpoint.GetEndpointHandler
	// EndpointGetEndpointIDHandler sets the operation handler for the get endpoint ID operation
	EndpointGetEndpointIDHandler endpoint.GetEndpointIDHandler
	// EndpointGetEndpointIDConfigHandler sets the operation handler for the get endpoint ID config operation
	EndpointGetEndpointIDConfigHandler endpoint.GetEndpointIDConfigHandler
	// EndpointGetEndpointIDLabelsHandler sets the operation handler for the get endpoint ID labels operation
	EndpointGetEndpointIDLabelsHandler endpoint.GetEndpointIDLabelsHandler
	// DaemonGetHealthzHandler sets the operation handler for the get healthz operation
	DaemonGetHealthzHandler daemon.GetHealthzHandler
	// PolicyGetIdentityHandler sets the operation handler for the get identity operation
	PolicyGetIdentityHandler policy.GetIdentityHandler
	// PolicyGetIdentityIDHandler sets the operation handler for the get identity ID operation
	PolicyGetIdentityIDHandler policy.GetIdentityIDHandler
	// PolicyGetPolicyHandler sets the operation handler for the get policy operation
	PolicyGetPolicyHandler policy.GetPolicyHandler
	// PolicyGetPolicyResolveHandler sets the operation handler for the get policy resolve operation
	PolicyGetPolicyResolveHandler policy.GetPolicyResolveHandler
	// ServiceGetServiceHandler sets the operation handler for the get service operation
	ServiceGetServiceHandler service.GetServiceHandler
	// ServiceGetServiceIDHandler sets the operation handler for the get service ID operation
	ServiceGetServiceIDHandler service.GetServiceIDHandler
	// DaemonPatchConfigHandler sets the operation handler for the patch config operation
	DaemonPatchConfigHandler daemon.PatchConfigHandler
	// EndpointPatchEndpointIDHandler sets the operation handler for the patch endpoint ID operation
	EndpointPatchEndpointIDHandler endpoint.PatchEndpointIDHandler
	// EndpointPatchEndpointIDConfigHandler sets the operation handler for the patch endpoint ID config operation
	EndpointPatchEndpointIDConfigHandler endpoint.PatchEndpointIDConfigHandler
	// IPAMPostIPAMHandler sets the operation handler for the post IP a m operation
	IPAMPostIPAMHandler ipam.PostIPAMHandler
	// IPAMPostIPAMIPHandler sets the operation handler for the post IP a m IP operation
	IPAMPostIPAMIPHandler ipam.PostIPAMIPHandler
	// EndpointPutEndpointIDHandler sets the operation handler for the put endpoint ID operation
	EndpointPutEndpointIDHandler endpoint.PutEndpointIDHandler
	// EndpointPutEndpointIDLabelsHandler sets the operation handler for the put endpoint ID labels operation
	EndpointPutEndpointIDLabelsHandler endpoint.PutEndpointIDLabelsHandler
	// PolicyPutPolicyHandler sets the operation handler for the put policy operation
	PolicyPutPolicyHandler policy.PutPolicyHandler
	// ServicePutServiceIDHandler sets the operation handler for the put service ID operation
	ServicePutServiceIDHandler service.PutServiceIDHandler

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

CiliumAPI Cilium

func NewCiliumAPI

func NewCiliumAPI(spec *loads.Document) *CiliumAPI

NewCiliumAPI creates a new Cilium instance

func (*CiliumAPI) AuthenticatorsFor

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

AuthenticatorsFor gets the authenticators for the specified security schemes

func (*CiliumAPI) ConsumersFor

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

ConsumersFor gets the consumers for the specified media types

func (*CiliumAPI) Context

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

Context returns the middleware context for the cilium API

func (*CiliumAPI) DefaultConsumes

func (o *CiliumAPI) DefaultConsumes() string

DefaultConsumes returns the default consumes media type

func (*CiliumAPI) DefaultProduces

func (o *CiliumAPI) DefaultProduces() string

DefaultProduces returns the default produces media type

func (*CiliumAPI) Formats

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

Formats returns the registered string formats

func (*CiliumAPI) HandlerFor

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

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

func (*CiliumAPI) Init

func (o *CiliumAPI) Init()

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

func (*CiliumAPI) ProducersFor

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

ProducersFor gets the producers for the specified media types

func (*CiliumAPI) RegisterFormat

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

RegisterFormat registers a custom format validator

func (*CiliumAPI) Serve

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

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

ServeErrorFor gets a error handler for a given operation id

func (*CiliumAPI) SetDefaultConsumes

func (o *CiliumAPI) SetDefaultConsumes(mediaType string)

SetDefaultConsumes returns the default consumes media type

func (*CiliumAPI) SetDefaultProduces

func (o *CiliumAPI) SetDefaultProduces(mediaType string)

SetDefaultProduces sets the default produces media type

func (*CiliumAPI) SetSpec

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

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

func (*CiliumAPI) Validate

func (o *CiliumAPI) Validate() error

Validate validates the registrations in the CiliumAPI

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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