Documentation ¶
Index ¶
- Constants
- type DenonAPI
- func (o *DenonAPI) AddMiddlewareFor(method, path string, builder middleware.Builder)
- func (o *DenonAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
- func (o *DenonAPI) Authorizer() runtime.Authorizer
- func (o *DenonAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer
- func (o *DenonAPI) Context() *middleware.Context
- func (o *DenonAPI) DefaultConsumes() string
- func (o *DenonAPI) DefaultProduces() string
- func (o *DenonAPI) Formats() strfmt.Registry
- func (o *DenonAPI) HandlerFor(method, path string) (http.Handler, bool)
- func (o *DenonAPI) Init()
- func (o *DenonAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer
- func (o *DenonAPI) RegisterConsumer(mediaType string, consumer runtime.Consumer)
- func (o *DenonAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator)
- func (o *DenonAPI) RegisterProducer(mediaType string, producer runtime.Producer)
- func (o *DenonAPI) Serve(builder middleware.Builder) http.Handler
- func (o *DenonAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
- func (o *DenonAPI) SetDefaultConsumes(mediaType string)
- func (o *DenonAPI) SetDefaultProduces(mediaType string)
- func (o *DenonAPI) SetSpec(spec *loads.Document)
- func (o *DenonAPI) Validate() error
- type GetStatus
- type GetStatusDefault
- func (o *GetStatusDefault) SetPayload(payload models.ErrorResponse)
- func (o *GetStatusDefault) SetStatusCode(code int)
- func (o *GetStatusDefault) WithPayload(payload models.ErrorResponse) *GetStatusDefault
- func (o *GetStatusDefault) WithStatusCode(code int) *GetStatusDefault
- func (o *GetStatusDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
- type GetStatusHandler
- type GetStatusHandlerFunc
- type GetStatusOK
- type GetStatusParams
- type GetStatusURL
- func (o *GetStatusURL) Build() (*url.URL, error)
- func (o *GetStatusURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *GetStatusURL) Must(u *url.URL, err error) *url.URL
- func (o *GetStatusURL) SetBasePath(bp string)
- func (o *GetStatusURL) String() string
- func (o *GetStatusURL) StringFull(scheme, host string) string
- func (o *GetStatusURL) WithBasePath(bp string) *GetStatusURL
- type PostCommand
- type PostCommandAccepted
- type PostCommandDefault
- func (o *PostCommandDefault) SetPayload(payload models.ErrorResponse)
- func (o *PostCommandDefault) SetStatusCode(code int)
- func (o *PostCommandDefault) WithPayload(payload models.ErrorResponse) *PostCommandDefault
- func (o *PostCommandDefault) WithStatusCode(code int) *PostCommandDefault
- func (o *PostCommandDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
- type PostCommandHandler
- type PostCommandHandlerFunc
- type PostCommandParams
- type PostCommandURL
- func (o *PostCommandURL) Build() (*url.URL, error)
- func (o *PostCommandURL) BuildFull(scheme, host string) (*url.URL, error)
- func (o *PostCommandURL) Must(u *url.URL, err error) *url.URL
- func (o *PostCommandURL) SetBasePath(bp string)
- func (o *PostCommandURL) String() string
- func (o *PostCommandURL) StringFull(scheme, host string) string
- func (o *PostCommandURL) WithBasePath(bp string) *PostCommandURL
Constants ¶
const GetStatusOKCode int = 200
GetStatusOKCode is the HTTP code returned for type GetStatusOK
const PostCommandAcceptedCode int = 202
PostCommandAcceptedCode is the HTTP code returned for type PostCommandAccepted
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DenonAPI ¶
type DenonAPI struct { Middleware func(middleware.Builder) http.Handler // BasicAuthenticator generates a runtime.Authenticator from the supplied basic auth function. // It has a default implementation in the security package, however you can replace it for your particular usage. BasicAuthenticator func(security.UserPassAuthentication) runtime.Authenticator // APIKeyAuthenticator generates a runtime.Authenticator from the supplied token auth function. // It has a default implementation in the security package, however you can replace it for your particular usage. APIKeyAuthenticator func(string, string, security.TokenAuthentication) runtime.Authenticator // BearerAuthenticator generates a runtime.Authenticator from the supplied bearer token auth function. // It has a default implementation in the security package, however you can replace it for your particular usage. BearerAuthenticator func(string, security.ScopedTokenAuthentication) runtime.Authenticator // JSONConsumer registers a consumer for the following mime types: // - application/json JSONConsumer runtime.Consumer // JSONProducer registers a producer for the following mime types: // - application/json JSONProducer runtime.Producer // GetStatusHandler sets the operation handler for the get status operation GetStatusHandler GetStatusHandler // PostCommandHandler sets the operation handler for the post command operation PostCommandHandler PostCommandHandler // 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) // PreServerShutdown is called before the HTTP(S) server is shutdown // This allows for custom functions to get executed before the HTTP(S) server stops accepting traffic PreServerShutdown func() // 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 }
DenonAPI the denon API
func NewDenonAPI ¶
NewDenonAPI creates a new Denon instance
func (*DenonAPI) AddMiddlewareFor ¶
func (o *DenonAPI) AddMiddlewareFor(method, path string, builder middleware.Builder)
AddMiddlewareFor adds a http middleware to existing handler
func (*DenonAPI) AuthenticatorsFor ¶
func (o *DenonAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator
AuthenticatorsFor gets the authenticators for the specified security schemes
func (*DenonAPI) Authorizer ¶
func (o *DenonAPI) Authorizer() runtime.Authorizer
Authorizer returns the registered authorizer
func (*DenonAPI) ConsumersFor ¶
ConsumersFor gets the consumers for the specified media types. MIME type parameters are ignored here.
func (*DenonAPI) Context ¶
func (o *DenonAPI) Context() *middleware.Context
Context returns the middleware context for the denon API
func (*DenonAPI) DefaultConsumes ¶
DefaultConsumes returns the default consumes media type
func (*DenonAPI) DefaultProduces ¶
DefaultProduces returns the default produces media type
func (*DenonAPI) HandlerFor ¶
HandlerFor gets a http.Handler for the provided operation method and path
func (*DenonAPI) Init ¶
func (o *DenonAPI) Init()
Init allows you to just initialize the handler cache, you can then recompose the middleware as you see fit
func (*DenonAPI) ProducersFor ¶
ProducersFor gets the producers for the specified media types. MIME type parameters are ignored here.
func (*DenonAPI) RegisterConsumer ¶
RegisterConsumer allows you to add (or override) a consumer for a media type.
func (*DenonAPI) RegisterFormat ¶
RegisterFormat registers a custom format validator
func (*DenonAPI) RegisterProducer ¶
RegisterProducer allows you to add (or override) a producer for a media type.
func (*DenonAPI) Serve ¶
func (o *DenonAPI) 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 (*DenonAPI) ServeErrorFor ¶
func (o *DenonAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error)
ServeErrorFor gets a error handler for a given operation id
func (*DenonAPI) SetDefaultConsumes ¶
SetDefaultConsumes returns the default consumes media type
func (*DenonAPI) SetDefaultProduces ¶
SetDefaultProduces sets the default produces media type
type GetStatus ¶
type GetStatus struct { Context *middleware.Context Handler GetStatusHandler }
GetStatus swagger:route GET /status getStatus
Checks the configuration and the connection to the receiver
func NewGetStatus ¶
func NewGetStatus(ctx *middleware.Context, handler GetStatusHandler) *GetStatus
NewGetStatus creates a new http.Handler for the get status operation
type GetStatusDefault ¶
type GetStatusDefault struct { /* In: Body */ Payload models.ErrorResponse `json:"body,omitempty"` // contains filtered or unexported fields }
GetStatusDefault Error
swagger:response getStatusDefault
func NewGetStatusDefault ¶
func NewGetStatusDefault(code int) *GetStatusDefault
NewGetStatusDefault creates GetStatusDefault with default headers values
func (*GetStatusDefault) SetPayload ¶
func (o *GetStatusDefault) SetPayload(payload models.ErrorResponse)
SetPayload sets the payload to the get status default response
func (*GetStatusDefault) SetStatusCode ¶
func (o *GetStatusDefault) SetStatusCode(code int)
SetStatusCode sets the status to the get status default response
func (*GetStatusDefault) WithPayload ¶
func (o *GetStatusDefault) WithPayload(payload models.ErrorResponse) *GetStatusDefault
WithPayload adds the payload to the get status default response
func (*GetStatusDefault) WithStatusCode ¶
func (o *GetStatusDefault) WithStatusCode(code int) *GetStatusDefault
WithStatusCode adds the status to the get status default response
func (*GetStatusDefault) WriteResponse ¶
func (o *GetStatusDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type GetStatusHandler ¶
type GetStatusHandler interface {
Handle(GetStatusParams) middleware.Responder
}
GetStatusHandler interface for that can handle valid get status params
type GetStatusHandlerFunc ¶
type GetStatusHandlerFunc func(GetStatusParams) middleware.Responder
GetStatusHandlerFunc turns a function with the right signature into a get status handler
func (GetStatusHandlerFunc) Handle ¶
func (fn GetStatusHandlerFunc) Handle(params GetStatusParams) middleware.Responder
Handle executing the request and returning a response
type GetStatusOK ¶
type GetStatusOK struct { /* In: Body */ Payload *models.StatusResponse `json:"body,omitempty"` }
GetStatusOK Success
swagger:response getStatusOK
func NewGetStatusOK ¶
func NewGetStatusOK() *GetStatusOK
NewGetStatusOK creates GetStatusOK with default headers values
func (*GetStatusOK) SetPayload ¶
func (o *GetStatusOK) SetPayload(payload *models.StatusResponse)
SetPayload sets the payload to the get status o k response
func (*GetStatusOK) WithPayload ¶
func (o *GetStatusOK) WithPayload(payload *models.StatusResponse) *GetStatusOK
WithPayload adds the payload to the get status o k response
func (*GetStatusOK) WriteResponse ¶
func (o *GetStatusOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type GetStatusParams ¶
GetStatusParams contains all the bound params for the get status operation typically these are obtained from a http.Request
swagger:parameters getStatus
func NewGetStatusParams ¶
func NewGetStatusParams() GetStatusParams
NewGetStatusParams creates a new GetStatusParams object no default values defined in spec.
func (*GetStatusParams) BindRequest ¶
func (o *GetStatusParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error
BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.
To ensure default values, the struct must have been initialized with NewGetStatusParams() beforehand.
type GetStatusURL ¶
type GetStatusURL struct {
// contains filtered or unexported fields
}
GetStatusURL generates an URL for the get status operation
func (*GetStatusURL) Build ¶
func (o *GetStatusURL) Build() (*url.URL, error)
Build a url path and query string
func (*GetStatusURL) BuildFull ¶
func (o *GetStatusURL) BuildFull(scheme, host string) (*url.URL, error)
BuildFull builds a full url with scheme, host, path and query string
func (*GetStatusURL) Must ¶
Must is a helper function to panic when the url builder returns an error
func (*GetStatusURL) SetBasePath ¶
func (o *GetStatusURL) SetBasePath(bp string)
SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string
func (*GetStatusURL) String ¶
func (o *GetStatusURL) String() string
String returns the string representation of the path with query string
func (*GetStatusURL) StringFull ¶
func (o *GetStatusURL) StringFull(scheme, host string) string
StringFull returns the string representation of a complete url
func (*GetStatusURL) WithBasePath ¶
func (o *GetStatusURL) WithBasePath(bp string) *GetStatusURL
WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string
type PostCommand ¶
type PostCommand struct { Context *middleware.Context Handler PostCommandHandler }
PostCommand swagger:route POST /command/{command} postCommand
Sends a command to the Receiver
func NewPostCommand ¶
func NewPostCommand(ctx *middleware.Context, handler PostCommandHandler) *PostCommand
NewPostCommand creates a new http.Handler for the post command operation
func (*PostCommand) ServeHTTP ¶
func (o *PostCommand) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type PostCommandAccepted ¶
type PostCommandAccepted struct { /* In: Body */ Payload *models.CommandResponse `json:"body,omitempty"` }
PostCommandAccepted Accepted
swagger:response postCommandAccepted
func NewPostCommandAccepted ¶
func NewPostCommandAccepted() *PostCommandAccepted
NewPostCommandAccepted creates PostCommandAccepted with default headers values
func (*PostCommandAccepted) SetPayload ¶
func (o *PostCommandAccepted) SetPayload(payload *models.CommandResponse)
SetPayload sets the payload to the post command accepted response
func (*PostCommandAccepted) WithPayload ¶
func (o *PostCommandAccepted) WithPayload(payload *models.CommandResponse) *PostCommandAccepted
WithPayload adds the payload to the post command accepted response
func (*PostCommandAccepted) WriteResponse ¶
func (o *PostCommandAccepted) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type PostCommandDefault ¶
type PostCommandDefault struct { /* In: Body */ Payload models.ErrorResponse `json:"body,omitempty"` // contains filtered or unexported fields }
PostCommandDefault Error
swagger:response postCommandDefault
func NewPostCommandDefault ¶
func NewPostCommandDefault(code int) *PostCommandDefault
NewPostCommandDefault creates PostCommandDefault with default headers values
func (*PostCommandDefault) SetPayload ¶
func (o *PostCommandDefault) SetPayload(payload models.ErrorResponse)
SetPayload sets the payload to the post command default response
func (*PostCommandDefault) SetStatusCode ¶
func (o *PostCommandDefault) SetStatusCode(code int)
SetStatusCode sets the status to the post command default response
func (*PostCommandDefault) WithPayload ¶
func (o *PostCommandDefault) WithPayload(payload models.ErrorResponse) *PostCommandDefault
WithPayload adds the payload to the post command default response
func (*PostCommandDefault) WithStatusCode ¶
func (o *PostCommandDefault) WithStatusCode(code int) *PostCommandDefault
WithStatusCode adds the status to the post command default response
func (*PostCommandDefault) WriteResponse ¶
func (o *PostCommandDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)
WriteResponse to the client
type PostCommandHandler ¶
type PostCommandHandler interface {
Handle(PostCommandParams) middleware.Responder
}
PostCommandHandler interface for that can handle valid post command params
type PostCommandHandlerFunc ¶
type PostCommandHandlerFunc func(PostCommandParams) middleware.Responder
PostCommandHandlerFunc turns a function with the right signature into a post command handler
func (PostCommandHandlerFunc) Handle ¶
func (fn PostCommandHandlerFunc) Handle(params PostCommandParams) middleware.Responder
Handle executing the request and returning a response
type PostCommandParams ¶
type PostCommandParams struct { // HTTP Request Object HTTPRequest *http.Request `json:"-"` /* Required: true In: path */ Command string }
PostCommandParams contains all the bound params for the post command operation typically these are obtained from a http.Request
swagger:parameters postCommand
func NewPostCommandParams ¶
func NewPostCommandParams() PostCommandParams
NewPostCommandParams creates a new PostCommandParams object no default values defined in spec.
func (*PostCommandParams) BindRequest ¶
func (o *PostCommandParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error
BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface for simple values it will use straight method calls.
To ensure default values, the struct must have been initialized with NewPostCommandParams() beforehand.
type PostCommandURL ¶
type PostCommandURL struct { Command string // contains filtered or unexported fields }
PostCommandURL generates an URL for the post command operation
func (*PostCommandURL) Build ¶
func (o *PostCommandURL) Build() (*url.URL, error)
Build a url path and query string
func (*PostCommandURL) BuildFull ¶
func (o *PostCommandURL) BuildFull(scheme, host string) (*url.URL, error)
BuildFull builds a full url with scheme, host, path and query string
func (*PostCommandURL) Must ¶
Must is a helper function to panic when the url builder returns an error
func (*PostCommandURL) SetBasePath ¶
func (o *PostCommandURL) SetBasePath(bp string)
SetBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string
func (*PostCommandURL) String ¶
func (o *PostCommandURL) String() string
String returns the string representation of the path with query string
func (*PostCommandURL) StringFull ¶
func (o *PostCommandURL) StringFull(scheme, host string) string
StringFull returns the string representation of a complete url
func (*PostCommandURL) WithBasePath ¶
func (o *PostCommandURL) WithBasePath(bp string) *PostCommandURL
WithBasePath sets the base path for this url builder, only required when it's different from the base path specified in the swagger spec. When the value of the base path is an empty string