Documentation
¶
Index ¶
- type DfaAPI
- func (o *DfaAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
- func (o *DfaAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
- func (o *DfaAPI) Context() *middleware.Context
- func (o *DfaAPI) DefaultConsumes() string
- func (o *DfaAPI) DefaultProduces() string
- func (o *DfaAPI) Formats() strfmt.Registry
- func (o *DfaAPI) HandlerFor(method, path string) (http.Handler, bool)
- func (o *DfaAPI) Init()
- func (o *DfaAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
- func (o *DfaAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
- func (o *DfaAPI) Serve(builder middleware.Builder) http.Handler
- func (o *DfaAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
- func (o *DfaAPI) SetDefaultConsumes(mediaType string)
- func (o *DfaAPI) SetDefaultProduces(mediaType string)
- func (o *DfaAPI) SetSpec(spec *loads.Document)
- func (o *DfaAPI) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DfaAPI ¶
type DfaAPI struct {
Middleware func(middleware.Builder) http.Handler
// JSONConsumer registers a consumer for a "application/dfa.api.v1+json" mime type
JSONConsumer runtime.Consumer
// JSONProducer registers a producer for a "application/dfa.api.v1+json" mime type
JSONProducer runtime.Producer
// SecurityHeaderAuth registers a function that takes a token and returns a principal
// it performs authentication based on an api key X-Token provided in the header
SecurityHeaderAuth func(string) (*models.Principal, error)
// SecurityQueryAuth registers a function that takes a token and returns a principal
// it performs authentication based on an api key token provided in the query
SecurityQueryAuth func(string) (*models.Principal, error)
// GeometryGetConvexHullHandler sets the operation handler for the get convex hull operation
GeometryGetConvexHullHandler geometry.GetConvexHullHandler
// RootVersionHandler sets the operation handler for the version operation
RootVersionHandler root.VersionHandler
// 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
}
DfaAPI Provides geometry, combinatorics, integer programming, functional simulation, and other domain flow algorithm analysis services
func (*DfaAPI) AuthenticatorsFor ¶
func (o *DfaAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
AuthenticatorsFor gets the authenticators for the specified security schemes
func (*DfaAPI) ConsumersFor ¶
ConsumersFor gets the consumers for the specified media types
func (*DfaAPI) Context ¶
func (o *DfaAPI) Context() *middleware.Context
Context returns the middleware context for the dfa API
func (*DfaAPI) DefaultConsumes ¶
DefaultConsumes returns the default consumes media type
func (*DfaAPI) DefaultProduces ¶
DefaultProduces returns the default produces media type
func (*DfaAPI) HandlerFor ¶
HandlerFor gets a http.Handler for the provided operation method and path
func (*DfaAPI) Init ¶
func (o *DfaAPI) Init()
Init allows you to just initialize the handler cache, you can then recompose the middelware as you see fit
func (*DfaAPI) ProducersFor ¶
ProducersFor gets the producers for the specified media types
func (*DfaAPI) RegisterFormat ¶
RegisterFormat registers a custom format validator
func (*DfaAPI) Serve ¶
func (o *DfaAPI) 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 (*DfaAPI) ServeErrorFor ¶
ServeErrorFor gets a error handler for a given operation id
func (*DfaAPI) SetDefaultConsumes ¶
SetDefaultConsumes returns the default consumes media type
func (*DfaAPI) SetDefaultProduces ¶
SetDefaultProduces sets the default produces media type