Documentation
¶
Index ¶
- func NewHTTP(requestHandler *RequestHandler, authInterceptor kitHttp.Interceptor) (*http.Server, error)
- type APIsConfig
- type BasicOAuthClient
- type ClientsConfig
- type Config
- type DeviceOAuthClient
- type GrpcServerConfig
- type HTTPConfig
- type RequestHandler
- type Server
- type UIConfig
- type WebConfiguration
- type WebSocketConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewHTTP ¶
func NewHTTP(requestHandler *RequestHandler, authInterceptor kitHttp.Interceptor) (*http.Server, error)
NewHTTP returns HTTP server
Types ¶
type APIsConfig ¶
type APIsConfig struct {
HTTP HTTPConfig `yaml:"http" json:"http"`
}
Config represent application configuration
func (*APIsConfig) Validate ¶
func (c *APIsConfig) Validate() error
type BasicOAuthClient ¶
type BasicOAuthClient struct {
ClientID string `yaml:"clientID" json:"clientId"`
Audience string `yaml:"audience" json:"audience"`
Scopes []string `yaml:"scopes" json:"scopes"`
}
func (*BasicOAuthClient) Validate ¶
func (c *BasicOAuthClient) Validate() error
type ClientsConfig ¶
type ClientsConfig struct {
GrpcGateway GrpcServerConfig `yaml:"grpcGateway" json:"grpcGateway"`
}
func (*ClientsConfig) Validate ¶
func (c *ClientsConfig) Validate() error
type Config ¶
type Config struct {
Log log.Config `yaml:"log" json:"log"`
APIs APIsConfig `yaml:"apis" json:"apis"`
Clients ClientsConfig `yaml:"clients" json:"clients"`
UI UIConfig `yaml:"ui" json:"ui"`
}
type DeviceOAuthClient ¶
type DeviceOAuthClient struct {
BasicOAuthClient `yaml:",inline"`
ProviderName string `json:"providerName" yaml:"providerName"`
}
func (*DeviceOAuthClient) Validate ¶
func (c *DeviceOAuthClient) Validate() error
type GrpcServerConfig ¶
func (*GrpcServerConfig) Validate ¶
func (c *GrpcServerConfig) Validate() error
type HTTPConfig ¶
type HTTPConfig struct {
Connection listener.Config `yaml:",inline" json:",inline"`
WebSocket WebSocketConfig `yaml:"webSocket" json:"webSocket"`
Authorization validator.Config `yaml:"authorization" json:"authorization"`
}
func (*HTTPConfig) Validate ¶
func (c *HTTPConfig) Validate() error
type RequestHandler ¶
type RequestHandler struct {
// contains filtered or unexported fields
}
RequestHandler for handling incoming request
func NewRequestHandler ¶
func NewRequestHandler(config *Config, client *client.Client) *RequestHandler
NewRequestHandler factory for new RequestHandler
func (*RequestHandler) CancelPendingCommands ¶
func (requestHandler *RequestHandler) CancelPendingCommands(w http.ResponseWriter, r *http.Request)
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server handle HTTP request
type UIConfig ¶
type UIConfig struct {
Enabled bool `json:"enabled" yaml:"enabled"`
Directory string `json:"directory" yaml:"directory"`
WebConfiguration WebConfiguration `json:"webConfiguration" yaml:"webConfiguration"`
}
UIConfig represents user interface configuration
type WebConfiguration ¶
type WebConfiguration struct {
Authority string `yaml:"authority" json:"authority"`
HTTPGatewayAddress string `yaml:"httpGatewayAddress" json:"httpGatewayAddress"`
WebOAuthClient BasicOAuthClient `yaml:"webOAuthClient" json:"webOauthClient"`
DeviceOAuthClient DeviceOAuthClient `yaml:"deviceOAuthClient" json:"deviceOauthClient"`
}
WebConfiguration represents web configuration for user interface exposed via getOAuthConfiguration handler
func (*WebConfiguration) Validate ¶
func (c *WebConfiguration) Validate() error
type WebSocketConfig ¶
type WebSocketConfig struct {
StreamBodyLimit int `yaml:"streamBodyLimit" json:"streamBodyLimit"`
PingFrequency time.Duration `yaml:"pingFrequency" json:"pingFrequency"`
}
func (*WebSocketConfig) Validate ¶
func (c *WebSocketConfig) Validate() error
Source Files
¶
- cancelPendingCommands.go
- cancelPendingMetadataUpdate.go
- config.go
- createResource.go
- deleteDevice.go
- errorHandler.go
- getDevice.go
- getDevicePendingCommands.go
- getDeviceResourceLinks.go
- getDeviceResources.go
- getEvents.go
- getHubConfiguration.go
- getPendingMetadataUpdates.go
- getResource.go
- getResourcePendingCommands.go
- getWebConfiguration.go
- httpApi.go
- jsonMarshaler.go
- jsonWriter.go
- jsonpbMarshaler.go
- service.go
- updateResource.go
- writeError.go
Click to show internal directories.
Click to hide internal directories.