config

package
v0.0.0-...-ae4999c Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SysRegCodePath             = "sys.reg.code"
	SysRegOwnerPath            = "sys.reg.owner"
	SysTitlePath               = "sys.title"
	ApiAddrPath                = "api.addr"
	ApiPortPath                = "api.port"
	InversePortPath            = "inverse.port"
	DefaultUserNamePath        = "default.username"
	DefaultOrganizationPath    = "default.organization"
	DefaultEffectPath          = "default.effect"
	DefaultPageSizePath        = "default.pagesize"
	DefaultTokenExpirationPath = "default.token.expiration"
	LogLevelPath               = "log.level"
	LogFileNamePath            = "log.filename"
	StreamURLsPath             = "stream.urls"
	WebViewURLsPath            = "web.urls"
	GeTuiAppIDPath             = "getui.app.id"
	GeTuiAppKeyPath            = "getui.app.key"
	GeTuiAppSecretPath         = "getui.app.secret"
	GeTuiMasterSecretPath      = "getui.master.secret"

	InfluxDBUrl      = "influxdb.url"
	InfluxDBUserName = "influxdb.username"
	InfluxDBPassword = "influxdb.password"
)
View Source
const (
	GeTuiAppIDEnvStr        = "GETUI_APP_ID"
	GeTuiAppKeyEnvStr       = "GETUI_APP_KEY"
	GeTuiAppSecretEnvStr    = "GETUI_APP_SECRET"
	GeTuiMasterSecretEnvStr = "GETUI_MASTER_SECRET"
)
View Source
const (
	DefaultApiPort         = 9090
	DefaultInversePort     = 10502
	DefaultOrganization    = "default"
	DefaultUserName        = "admin"
	DefaultPageSize        = 20
	DefaultTokenExpiration = 3600 // second
	DefaultLogLevel        = "info"
	DefaultLogFileName     = "./log.data"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BaseConfig  model.Config
	ExtraConfig model.Config

	Status sync.Map
	// contains filtered or unexported fields
}

func New

func New(store store.Store) *Config

func (*Config) APIAddr

func (c *Config) APIAddr() string

func (*Config) APIPort

func (c *Config) APIPort() int

func (*Config) DefaultEffect

func (c *Config) DefaultEffect() resource.Effect

func (*Config) DefaultOrganization

func (c *Config) DefaultOrganization() string

func (*Config) DefaultPageSize

func (c *Config) DefaultPageSize() int64

func (*Config) DefaultTokenExpiration

func (c *Config) DefaultTokenExpiration() time.Duration

func (*Config) DefaultUserName

func (c *Config) DefaultUserName() string

func (*Config) GeTuiConfig

func (c *Config) GeTuiConfig() map[string]string

func (*Config) InfluxDBConfig

func (c *Config) InfluxDBConfig() map[string]string

func (*Config) InversePort

func (c *Config) InversePort() int

func (*Config) JwtTokenKey

func (c *Config) JwtTokenKey() []byte

func (*Config) Load

func (c *Config) Load() error

func (*Config) LogFileName

func (c *Config) LogFileName() string

func (*Config) LogLevel

func (c *Config) LogLevel() string

func (*Config) RegCode

func (c *Config) RegCode() string

func (*Config) RegOwner

func (c *Config) RegOwner() string

func (*Config) Save

func (c *Config) Save() error

func (*Config) SaveStreamURLs

func (c *Config) SaveStreamURLs(streams interface{}) error

func (*Config) SaveWebViewUrls

func (c *Config) SaveWebViewUrls(urls interface{}) error

func (*Config) SetLogLevel

func (c *Config) SetLogLevel(level string)

func (*Config) StreamURLs

func (c *Config) StreamURLs() interface{}

func (*Config) SysTitle

func (c *Config) SysTitle() string

func (*Config) WebViewUrls

func (c *Config) WebViewUrls() interface{}

Jump to

Keyboard shortcuts

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