config

package
v0.9.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

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

func (AuthConfig) LogAuth added in v0.4.0

func (c AuthConfig) LogAuth() bool

type CameraConfig

type CameraConfig struct {
	// contains filtered or unexported fields
}

func (CameraConfig) Address

func (c CameraConfig) Address() string

func (CameraConfig) ExpireEarly

func (c CameraConfig) ExpireEarly() time.Duration

func (CameraConfig) Name

func (c CameraConfig) Name() string

func (CameraConfig) Password

func (c CameraConfig) Password() string

func (CameraConfig) PreemptiveFetch added in v0.3.0

func (c CameraConfig) PreemptiveFetch() time.Duration

func (CameraConfig) RefreshInterval

func (c CameraConfig) RefreshInterval() time.Duration

func (CameraConfig) User

func (c CameraConfig) User() string

type Config

type Config struct {
	// contains filtered or unexported fields
}

func ReadConfig

func ReadConfig(yamlStr []byte) (config Config, err []error)

func ReadConfigFile

func ReadConfigFile(exe, source string) (config Config, err []error)

func (Config) Auth

func (c Config) Auth() AuthConfig

func (Config) Cameras

func (c Config) Cameras() []*CameraConfig

func (Config) GetViewNames

func (c Config) GetViewNames() (ret []string)

func (Config) HttpServer

func (c Config) HttpServer() HttpServerConfig

func (Config) LogConfig

func (c Config) LogConfig() bool

func (Config) LogDebug

func (c Config) LogDebug() bool

func (Config) LogWorkerStart

func (c Config) LogWorkerStart() bool

func (Config) MarshalYAML

func (c Config) MarshalYAML() (interface{}, error)

func (Config) MqttClients

func (c Config) MqttClients() []*MqttClientConfig

func (Config) PrintConfig

func (c Config) PrintConfig() (err error)

func (Config) ProjectTitle

func (c Config) ProjectTitle() string

func (Config) Version

func (c Config) Version() int

func (Config) Views

func (c Config) Views() []*ViewConfig

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) 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) HashSecret

func (c HttpServerConfig) HashSecret() string

func (HttpServerConfig) HashTimeout

func (c HttpServerConfig) HashTimeout() time.Duration

func (HttpServerConfig) ImageEarlyExpire

func (c HttpServerConfig) ImageEarlyExpire() time.Duration

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() string

func (MqttClientConfig) ClientId

func (c MqttClientConfig) ClientId() string

func (MqttClientConfig) LogDebug added in v0.7.1

func (c MqttClientConfig) LogDebug() bool

func (MqttClientConfig) Name

func (c MqttClientConfig) Name() string

func (MqttClientConfig) Password

func (c MqttClientConfig) Password() string

func (MqttClientConfig) Qos

func (c MqttClientConfig) Qos() byte

func (MqttClientConfig) TopicPrefix

func (c MqttClientConfig) TopicPrefix() string

func (MqttClientConfig) User

func (c MqttClientConfig) User() string

type ViewCameraConfig

type ViewCameraConfig struct {
	// contains filtered or unexported fields
}

func (ViewCameraConfig) Name

func (c ViewCameraConfig) Name() string

func (ViewCameraConfig) Title

func (c ViewCameraConfig) Title() string

type ViewConfig

type ViewConfig struct {
	// contains filtered or unexported fields
}

func (ViewConfig) Autoplay

func (c ViewConfig) Autoplay() bool

func (ViewConfig) CameraNames

func (c ViewConfig) CameraNames() []string

func (ViewConfig) Cameras

func (c ViewConfig) Cameras() []*ViewCameraConfig

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) JpgQuality

func (c ViewConfig) JpgQuality() int

func (ViewConfig) Name

func (c ViewConfig) Name() string

func (ViewConfig) RefreshInterval

func (c ViewConfig) RefreshInterval() time.Duration

func (ViewConfig) ResolutionMaxHeight

func (c ViewConfig) ResolutionMaxHeight() int

func (ViewConfig) ResolutionMaxWidth

func (c ViewConfig) ResolutionMaxWidth() int

func (ViewConfig) Title

func (c ViewConfig) Title() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL