Documentation
¶
Index ¶
- Constants
- type AuthConfig
- type Config
- func (c Config) Auth() AuthConfig
- func (c Config) Devices() []*DeviceConfig
- func (c Config) GetViewNames() (ret []string)
- func (c Config) HttpServer() HttpServerConfig
- func (c Config) LogConfig() bool
- func (c Config) LogDebug() bool
- func (c Config) LogWorkerStart() bool
- func (c Config) MarshalYAML() (interface{}, error)
- func (c Config) MqttClients() []*MqttClientConfig
- func (c Config) PrintConfig() (err error)
- func (c Config) ProjectTitle() string
- func (c Config) Version() int
- func (c Config) Views() []*ViewConfig
- type DeviceConfig
- type DeviceKind
- type HttpServerConfig
- func (c HttpServerConfig) Bind() string
- func (c HttpServerConfig) ConfigExpires() time.Duration
- func (c HttpServerConfig) EnableDocs() bool
- func (c HttpServerConfig) Enabled() bool
- func (c HttpServerConfig) FrontendExpires() time.Duration
- func (c HttpServerConfig) FrontendPath() string
- func (c HttpServerConfig) FrontendProxy() *url.URL
- func (c HttpServerConfig) LogRequests() bool
- func (c HttpServerConfig) Port() int
- type MqttClientConfig
- func (c MqttClientConfig) AvailabilityTopic() string
- func (c MqttClientConfig) Broker() *url.URL
- func (c MqttClientConfig) ClientId() string
- func (c MqttClientConfig) ConnectRetryDelay() time.Duration
- func (c MqttClientConfig) ConnectTimeout() time.Duration
- func (c MqttClientConfig) KeepAlive() time.Duration
- func (c MqttClientConfig) LogDebug() bool
- func (c MqttClientConfig) LogMessages() bool
- func (c MqttClientConfig) Name() string
- func (c MqttClientConfig) Password() string
- func (c MqttClientConfig) ProtocolVersion() int
- func (c MqttClientConfig) Qos() byte
- func (c MqttClientConfig) RealtimeEnable() bool
- func (c MqttClientConfig) RealtimeRetain() bool
- func (c MqttClientConfig) RealtimeTopic() string
- func (c MqttClientConfig) TelemetryInterval() time.Duration
- func (c MqttClientConfig) TelemetryRetain() bool
- func (c MqttClientConfig) TelemetryTopic() string
- func (c MqttClientConfig) TopicPrefix() string
- func (c MqttClientConfig) User() string
- type ViewConfig
- func (c ViewConfig) Autoplay() bool
- func (c ViewConfig) DeviceNames() []string
- func (c ViewConfig) Devices() []*ViewDeviceConfig
- func (c ViewConfig) Hidden() bool
- func (c ViewConfig) IsAllowed(user string) bool
- func (c ViewConfig) IsPublic() bool
- func (c ViewConfig) Name() string
- func (c ViewConfig) SkipCategories() []string
- func (c ViewConfig) SkipFields() []string
- func (c ViewConfig) Title() string
- type ViewDeviceConfig
Constants ¶
View Source
const NameRegexp = "^[a-zA-Z0-9\\-]{1,32}$"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthConfig ¶
type AuthConfig struct {
// contains filtered or unexported fields
}
func (AuthConfig) Enabled ¶
func (c AuthConfig) Enabled() bool
func (AuthConfig) HtaccessFile ¶
func (c AuthConfig) HtaccessFile() string
func (AuthConfig) JwtSecret ¶
func (c AuthConfig) JwtSecret() []byte
func (AuthConfig) JwtValidityPeriod ¶
func (c AuthConfig) JwtValidityPeriod() time.Duration
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func ReadConfig ¶
func ReadConfigFile ¶
func (Config) Auth ¶
func (c Config) Auth() AuthConfig
func (Config) Devices ¶
func (c Config) Devices() []*DeviceConfig
func (Config) GetViewNames ¶
func (Config) HttpServer ¶
func (c Config) HttpServer() HttpServerConfig
func (Config) LogWorkerStart ¶
func (Config) MarshalYAML ¶
func (Config) MqttClients ¶
func (c Config) MqttClients() []*MqttClientConfig
func (Config) PrintConfig ¶
func (Config) ProjectTitle ¶
func (Config) Views ¶
func (c Config) Views() []*ViewConfig
type DeviceConfig ¶
type DeviceConfig struct {
// contains filtered or unexported fields
}
func (DeviceConfig) Device ¶
func (c DeviceConfig) Device() string
func (DeviceConfig) Kind ¶
func (c DeviceConfig) Kind() DeviceKind
func (DeviceConfig) LogComDebug ¶
func (c DeviceConfig) LogComDebug() bool
func (DeviceConfig) LogDebug ¶
func (c DeviceConfig) LogDebug() bool
func (DeviceConfig) Name ¶
func (c DeviceConfig) Name() string
func (DeviceConfig) SkipCategories ¶ added in v1.6.0
func (c DeviceConfig) SkipCategories() []string
func (DeviceConfig) SkipFields ¶ added in v1.6.0
func (c DeviceConfig) SkipFields() []string
type DeviceKind ¶
type DeviceKind int
device kind
const ( UndefinedKind DeviceKind = iota RandomBmvKind RandomSolarKind VedirectKind )
func DeviceKindFromString ¶
func DeviceKindFromString(s string) DeviceKind
func (DeviceKind) String ¶
func (dk DeviceKind) String() string
type HttpServerConfig ¶
type HttpServerConfig struct {
// contains filtered or unexported fields
}
func (HttpServerConfig) Bind ¶
func (c HttpServerConfig) Bind() string
func (HttpServerConfig) ConfigExpires ¶
func (c HttpServerConfig) ConfigExpires() time.Duration
func (HttpServerConfig) EnableDocs ¶
func (c HttpServerConfig) EnableDocs() bool
func (HttpServerConfig) Enabled ¶
func (c HttpServerConfig) Enabled() bool
func (HttpServerConfig) FrontendExpires ¶
func (c HttpServerConfig) FrontendExpires() time.Duration
func (HttpServerConfig) FrontendPath ¶
func (c HttpServerConfig) FrontendPath() string
func (HttpServerConfig) FrontendProxy ¶
func (c HttpServerConfig) FrontendProxy() *url.URL
func (HttpServerConfig) LogRequests ¶
func (c HttpServerConfig) LogRequests() bool
func (HttpServerConfig) Port ¶
func (c HttpServerConfig) Port() int
type MqttClientConfig ¶
type MqttClientConfig struct {
// contains filtered or unexported fields
}
func (MqttClientConfig) AvailabilityTopic ¶
func (c MqttClientConfig) AvailabilityTopic() string
func (MqttClientConfig) Broker ¶
func (c MqttClientConfig) Broker() *url.URL
Broker always returns a non-nil pointer.
func (MqttClientConfig) ClientId ¶
func (c MqttClientConfig) ClientId() string
func (MqttClientConfig) ConnectRetryDelay ¶ added in v1.7.0
func (c MqttClientConfig) ConnectRetryDelay() time.Duration
func (MqttClientConfig) ConnectTimeout ¶ added in v1.7.0
func (c MqttClientConfig) ConnectTimeout() time.Duration
func (MqttClientConfig) KeepAlive ¶ added in v1.7.0
func (c MqttClientConfig) KeepAlive() time.Duration
func (MqttClientConfig) LogDebug ¶ added in v1.3.0
func (c MqttClientConfig) LogDebug() bool
func (MqttClientConfig) LogMessages ¶
func (c MqttClientConfig) LogMessages() bool
func (MqttClientConfig) Name ¶
func (c MqttClientConfig) Name() string
func (MqttClientConfig) Password ¶
func (c MqttClientConfig) Password() string
func (MqttClientConfig) ProtocolVersion ¶ added in v1.7.0
func (c MqttClientConfig) ProtocolVersion() int
func (MqttClientConfig) Qos ¶
func (c MqttClientConfig) Qos() byte
func (MqttClientConfig) RealtimeEnable ¶
func (c MqttClientConfig) RealtimeEnable() bool
func (MqttClientConfig) RealtimeRetain ¶
func (c MqttClientConfig) RealtimeRetain() bool
func (MqttClientConfig) RealtimeTopic ¶
func (c MqttClientConfig) RealtimeTopic() string
func (MqttClientConfig) TelemetryInterval ¶
func (c MqttClientConfig) TelemetryInterval() time.Duration
func (MqttClientConfig) TelemetryRetain ¶
func (c MqttClientConfig) TelemetryRetain() bool
func (MqttClientConfig) TelemetryTopic ¶
func (c MqttClientConfig) TelemetryTopic() string
func (MqttClientConfig) TopicPrefix ¶
func (c MqttClientConfig) TopicPrefix() string
func (MqttClientConfig) User ¶
func (c MqttClientConfig) User() string
type ViewConfig ¶
type ViewConfig struct {
// contains filtered or unexported fields
}
func (ViewConfig) Autoplay ¶
func (c ViewConfig) Autoplay() bool
func (ViewConfig) DeviceNames ¶
func (c ViewConfig) DeviceNames() []string
func (ViewConfig) Devices ¶
func (c ViewConfig) Devices() []*ViewDeviceConfig
func (ViewConfig) Hidden ¶
func (c ViewConfig) Hidden() bool
func (ViewConfig) IsAllowed ¶
func (c ViewConfig) IsAllowed(user string) bool
func (ViewConfig) IsPublic ¶
func (c ViewConfig) IsPublic() bool
func (ViewConfig) Name ¶
func (c ViewConfig) Name() string
func (ViewConfig) SkipCategories ¶ added in v1.6.0
func (c ViewConfig) SkipCategories() []string
func (ViewConfig) SkipFields ¶ added in v1.6.0
func (c ViewConfig) SkipFields() []string
func (ViewConfig) Title ¶
func (c ViewConfig) Title() string
type ViewDeviceConfig ¶
type ViewDeviceConfig struct {
// contains filtered or unexported fields
}
func (ViewDeviceConfig) Name ¶
func (c ViewDeviceConfig) Name() string
func (ViewDeviceConfig) Title ¶
func (c ViewDeviceConfig) Title() string
Click to show internal directories.
Click to hide internal directories.