Documentation
¶
Index ¶
- type BbqberryAPI
- func (o *BbqberryAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
- func (o *BbqberryAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
- func (o *BbqberryAPI) Context() *middleware.Context
- func (o *BbqberryAPI) DefaultConsumes() string
- func (o *BbqberryAPI) DefaultProduces() string
- func (o *BbqberryAPI) Formats() strfmt.Registry
- func (o *BbqberryAPI) HandlerFor(method, path string) (http.Handler, bool)
- func (o *BbqberryAPI) Init()
- func (o *BbqberryAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
- func (o *BbqberryAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
- func (o *BbqberryAPI) Serve(builder middleware.Builder) http.Handler
- func (o *BbqberryAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
- func (o *BbqberryAPI) SetDefaultConsumes(mediaType string)
- func (o *BbqberryAPI) SetDefaultProduces(mediaType string)
- func (o *BbqberryAPI) SetSpec(spec *loads.Document)
- func (o *BbqberryAPI) Validate() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BbqberryAPI ¶
type BbqberryAPI 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
// LightsGetGrillLightsHandler sets the operation handler for the get grill lights operation
LightsGetGrillLightsHandler lights.GetGrillLightsHandler
// HardwareGetHardwareHandler sets the operation handler for the get hardware operation
HardwareGetHardwareHandler hardware.GetHardwareHandler
// TemperaturesGetTemperaturesHandler sets the operation handler for the get temperatures operation
TemperaturesGetTemperaturesHandler temperatures.GetTemperaturesHandler
// HealthHealthHandler sets the operation handler for the health operation
HealthHealthHandler health.HealthHandler
// SystemShutdownHandler sets the operation handler for the shutdown operation
SystemShutdownHandler system.ShutdownHandler
// AlertsUpdateAlertHandler sets the operation handler for the update alert operation
AlertsUpdateAlertHandler alerts.UpdateAlertHandler
// LightsUpdateGrillLightsHandler sets the operation handler for the update grill lights operation
LightsUpdateGrillLightsHandler lights.UpdateGrillLightsHandler
// MonitorsUpdateMonitorHandler sets the operation handler for the update monitor operation
MonitorsUpdateMonitorHandler monitors.UpdateMonitorHandler
// 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
}
BbqberryAPI Rest API definition for BBQ Berry
func NewBbqberryAPI ¶
func NewBbqberryAPI(spec *loads.Document) *BbqberryAPI
NewBbqberryAPI creates a new Bbqberry instance
func (*BbqberryAPI) AuthenticatorsFor ¶
func (o *BbqberryAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
AuthenticatorsFor gets the authenticators for the specified security schemes
func (*BbqberryAPI) ConsumersFor ¶
func (o *BbqberryAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
ConsumersFor gets the consumers for the specified media types
func (*BbqberryAPI) Context ¶
func (o *BbqberryAPI) Context() *middleware.Context
Context returns the middleware context for the bbqberry API
func (*BbqberryAPI) DefaultConsumes ¶
func (o *BbqberryAPI) DefaultConsumes() string
DefaultConsumes returns the default consumes media type
func (*BbqberryAPI) DefaultProduces ¶
func (o *BbqberryAPI) DefaultProduces() string
DefaultProduces returns the default produces media type
func (*BbqberryAPI) Formats ¶
func (o *BbqberryAPI) Formats() strfmt.Registry
Formats returns the registered string formats
func (*BbqberryAPI) HandlerFor ¶
func (o *BbqberryAPI) HandlerFor(method, path string) (http.Handler, bool)
HandlerFor gets a http.Handler for the provided operation method and path
func (*BbqberryAPI) Init ¶
func (o *BbqberryAPI) Init()
Init allows you to just initialize the handler cache, you can then recompose the middelware as you see fit
func (*BbqberryAPI) ProducersFor ¶
func (o *BbqberryAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
ProducersFor gets the producers for the specified media types
func (*BbqberryAPI) RegisterFormat ¶
RegisterFormat registers a custom format validator
func (*BbqberryAPI) Serve ¶
func (o *BbqberryAPI) 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 (*BbqberryAPI) ServeErrorFor ¶
func (o *BbqberryAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
ServeErrorFor gets a error handler for a given operation id
func (*BbqberryAPI) SetDefaultConsumes ¶
func (o *BbqberryAPI) SetDefaultConsumes(mediaType string)
SetDefaultConsumes returns the default consumes media type
func (*BbqberryAPI) SetDefaultProduces ¶
func (o *BbqberryAPI) SetDefaultProduces(mediaType string)
SetDefaultProduces sets the default produces media type
func (*BbqberryAPI) SetSpec ¶
func (o *BbqberryAPI) SetSpec(spec *loads.Document)
SetSpec sets a spec that will be served for the clients.
func (*BbqberryAPI) Validate ¶
func (o *BbqberryAPI) Validate() error
Validate validates the registrations in the BbqberryAPI