Documentation
¶
Index ¶
Constants ¶
View Source
const ModuleName = "config"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CfgDynamic ¶
type CfgDynamic struct {
System *SystemCfg
Shortcuts *ShortcutsCfg
Logger *LoggerCfg
}
type CfgStatic ¶
type CfgStatic struct {
Rpc *RpcCfg
Provider *ProviderCfg
DsX11 *DsX11Cfg
Desktop *DesktopCfg
XDGDesktopEntry *XDGDesktopEntryCfg
}
Static configuration
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func (*Config) AddVersionToLog ¶
func (*Config) Get ¶
func (c *Config) Get() *Configuration
type Configuration ¶
type Configuration struct {
Build *BuildCfg
*CfgStatic
*CfgDynamic
}
type DesktopCfg ¶
type LoggerCfg ¶
type LoggerCfg struct {
// One of: stderr, stdout, <filename> (for example: runify.log)
Output string
// MaxSizeMb is the maximum size in megabytes of the log file before it gets
// rotated. It defaults to 100 megabytes.
MaxSizeMb int
// MaxAgeDays is the maximum number of days to retain old log files based on the
// timestamp encoded in their filename. Note that a day is defined as 24
// hours and may not exactly correspond to calendar days due to daylight
// savings, leap seconds, etc. The default is not to remove old log files
// based on age.
MaxAgeDays int
// MaxBackups is the maximum number of old log files to retain. The default
// is to retain all old log files (though MaxAgeDays may still cause them to get
// deleted.)
MaxBackups int
// text is one of: "debug", "info", "warn", "error", "dpanic", "panic", "fatal"
Level zapcore.Level
LevelStacktrace zapcore.Level
AddCallerInfo bool
// text is one of: "plain", "json"
Format LoggerFormat
// LocalTimeInBackupFilename determines if the time used for formatting the timestamps in
// backup files is the computer's local time. The default is to use UTC
// time.
LocalTimeInBackupFilename bool
// Compress determines if the rotated log files should be compressed
// using gzip. The default is not to perform compression.
Compress bool
// Enable/Disable log rotation with internal application settings
EnableRotate bool
}
type LoggerFormat ¶
type LoggerFormat int8
const ( PlainFormat LoggerFormat = iota JSONFormat )
func (LoggerFormat) MarshalText ¶
func (l LoggerFormat) MarshalText() ([]byte, error)
func (LoggerFormat) String ¶
func (l LoggerFormat) String() string
String returns a lower-case ASCII representation of the log level.
func (*LoggerFormat) UnmarshalText ¶
func (l *LoggerFormat) UnmarshalText(text []byte) error
type ProviderCfg ¶
type ProviderCfg struct {
ChannelLen uint32
SubModuleChannelLen uint32
DesktopEntry *ProviderDesktopEntryCfg
}
type ProviderDesktopEntryCfg ¶
type ProviderDesktopEntryCfg struct {
DesktopEntriesChLen uint32
}
type ShortcutsCfg ¶
type ShortcutsCfg struct {
Root string
}
type XDGDesktopEntryCfg ¶
type XDGDesktopEntryCfg struct {
ModuleChLen uint32
}
Click to show internal directories.
Click to hide internal directories.