Documentation
¶
Overview ¶
Package commonConfig defines application configuration structures and accessors for dates, logging, servers, databases, assets, and security.
Index ¶
- Variables
- type MODE
- type Settings
- func (s *Settings) Delimiter() string
- func (s *Settings) GetApplication_Author() string
- func (s *Settings) GetApplication_Copyright() string
- func (s *Settings) GetApplication_Description() string
- func (s *Settings) GetApplication_Environment() string
- func (s *Settings) GetApplication_HomePath() string
- func (s *Settings) GetApplication_License() string
- func (s *Settings) GetApplication_Locale() string
- func (s *Settings) GetApplication_Name() string
- func (s *Settings) GetApplication_Prefix() string
- func (s *Settings) GetApplication_ReleaseDate() string
- func (s *Settings) GetApplication_Theme() string
- func (s *Settings) GetApplication_Timezone() string
- func (s *Settings) GetApplication_Version() string
- func (s *Settings) GetAssets_FaviconPath() string
- func (s *Settings) GetAssets_LogoPath() string
- func (s *Settings) GetBackup_RetainForDays() int
- func (s *Settings) GetCommunicationsEmail_AdminEmail() string
- func (s *Settings) GetCommunicationsEmail_Footer() string
- func (s *Settings) GetCommunicationsEmail_Host() string
- func (s *Settings) GetCommunicationsEmail_Password() string
- func (s *Settings) GetCommunicationsEmail_Port() int
- func (s *Settings) GetCommunicationsEmail_PortString() string
- func (s *Settings) GetCommunicationsEmail_Sender() string
- func (s *Settings) GetCommunicationsEmail_User() string
- func (s *Settings) GetCommunicationsPushover_APIToken() string
- func (s *Settings) GetCommunicationsPushover_UserKey() string
- func (s *Settings) GetDatabase_Host() string
- func (s *Settings) GetDatabase_Name() string
- func (s *Settings) GetDatabase_Password() string
- func (s *Settings) GetDatabase_Path() string
- func (s *Settings) GetDatabase_PoolSize() int
- func (s *Settings) GetDatabase_Port() int
- func (s *Settings) GetDatabase_PortString() string
- func (s *Settings) GetDatabase_Timeout() int
- func (s *Settings) GetDatabase_Type() string
- func (s *Settings) GetDatabase_User() string
- func (s *Settings) GetDatabase_Version() int
- func (s *Settings) GetDateFormat_Backup() string
- func (s *Settings) GetDateFormat_BackupDirectory() string
- func (s *Settings) GetDateFormat_DMY2() string
- func (s *Settings) GetDateFormat_Date() string
- func (s *Settings) GetDateFormat_DateTime() string
- func (s *Settings) GetDateFormat_Human() string
- func (s *Settings) GetDateFormat_Internal() string
- func (s *Settings) GetDateFormat_Time() string
- func (s *Settings) GetDateFormat_YMD() string
- func (s *Settings) GetDefault_Delimiter() string
- func (s *Settings) GetDisplayDelimiter() string
- func (s *Settings) GetHistory_MaxHistoryEntries() int
- func (s *Settings) GetLocaleName(in string) string
- func (s *Settings) GetLogging_MaxAge() int
- func (s *Settings) GetLogging_MaxBackups() int
- func (s *Settings) GetLogging_MaxSize() int
- func (s *Settings) GetMessageKey_Action() string
- func (s *Settings) GetMessageKey_Content() string
- func (s *Settings) GetMessageKey_Title() string
- func (s *Settings) GetMessageKey_Type() string
- func (s *Settings) GetSecuritySessionKey_ExpiryPeriod() string
- func (s *Settings) GetSecuritySessionKey_Locale() string
- func (s *Settings) GetSecuritySessionKey_Session() string
- func (s *Settings) GetSecuritySessionKey_Theme() string
- func (s *Settings) GetSecuritySessionKey_Timezone() string
- func (s *Settings) GetSecuritySessionKey_Token() string
- func (s *Settings) GetSecuritySessionKey_UserCode() string
- func (s *Settings) GetSecuritySessionKey_UserKey() string
- func (s *Settings) GetSecuritySessionKey_UserRole() string
- func (s *Settings) GetSecuritySession_ExpiryPeriod() int
- func (s *Settings) GetServer_Compression() bool
- func (s *Settings) GetServer_CompressionString() string
- func (s *Settings) GetServer_Environment() string
- func (s *Settings) GetServer_Host() string
- func (s *Settings) GetServer_Port() int
- func (s *Settings) GetServer_PortString() string
- func (s *Settings) GetServer_Protocol() string
- func (s *Settings) GetServiceUser_Name() string
- func (s *Settings) GetServiceUser_UID() string
- func (s *Settings) GetServiceUser_UserCode() string
- func (s *Settings) GetStatusList() []string
- func (s *Settings) GetStatus_Error() string
- func (s *Settings) GetStatus_Offline() string
- func (s *Settings) GetStatus_Online() string
- func (s *Settings) GetStatus_Unknown() string
- func (s *Settings) GetStatus_Warning() string
- func (s *Settings) GetTranslationServer_Host() string
- func (s *Settings) GetTranslationServer_Port() int
- func (s *Settings) GetTranslationServer_PortString() string
- func (s *Settings) GetTranslationServer_Protocol() string
- func (s *Settings) GetTranslation_Locale() string
- func (s *Settings) GetTranslation_PermittedLocales() []struct{ ... }
- func (s *Settings) GetTranslation_PermittedOrigins() []string
- func (s *Settings) GetValidHosts() []struct{ ... }
- func (s *Settings) GetWorkerPoolSize() int
- func (s *Settings) IsApiLoggingDisabled() bool
- func (s *Settings) IsApplicationMode(inMode MODE) bool
- func (s *Settings) IsAuditLoggingDisabled() bool
- func (s *Settings) IsCacheLoggingDisabled() bool
- func (s *Settings) IsCommunicationsLoggingDisabled() bool
- func (s *Settings) IsDatabaseLoggingDisabled() bool
- func (s *Settings) IsEventLoggingDisabled() bool
- func (s *Settings) IsExportLoggingDisabled() bool
- func (s *Settings) IsGeneralLoggingDisabled() bool
- func (s *Settings) IsImportLoggingDisabled() bool
- func (s *Settings) IsLockLoggingDisabled() bool
- func (s *Settings) IsLogCompressionEnabled() bool
- func (s *Settings) IsLoggingDisabled() bool
- func (s *Settings) IsPermittedTranslationLocale(in string) bool
- func (s *Settings) IsPermittedTranslationOrigin(in string) bool
- func (s *Settings) IsSecurityLoggingDisabled() bool
- func (s *Settings) IsServiceLoggingDisabled() bool
- func (s *Settings) IsTimingLoggingDisabled() bool
- func (s *Settings) IsTraceLoggingDisabled() bool
- func (s *Settings) IsTranslationLoggingDisabled() bool
- func (s *Settings) IsWarningLoggingDisabled() bool
- func (s *Settings) IsWebLoggingDisabled() bool
- func (s *Settings) SEP() string
- func (s *Settings) Spew()
Constants ¶
This section is empty.
Variables ¶
View Source
var FALSE = "false"
View Source
var TRUE = "true"
Functions ¶
This section is empty.
Types ¶
type Settings ¶
type Settings struct {
Application struct {
Name string `toml:"name"`
Prefix string `toml:"prefix"`
Home string `toml:"home"`
Description string `toml:"description"`
Version string `toml:"version"`
Environment string `toml:"environment"`
ReleaseDate string `toml:"releaseDate"`
Copyright string `toml:"copyright"`
Author string `toml:"author"`
License string `toml:"license"`
Locale string `toml:"locale"`
Theme string `toml:"theme"`
Timezone string `toml:"timezone"`
} `toml:"Application"`
Database struct {
Version int `toml:"version"`
Type string `toml:"type"`
Host string `toml:"host"`
Port int `toml:"port"`
Name string `toml:"name"`
User string `toml:"user"`
Pass string `toml:"pass"`
Path string `toml:"path"`
PoolSize int `toml:"poolSize"`
Timeout int `toml:"timeout"`
} `toml:"Database"`
Server struct {
Host string `toml:"host"`
Port int `toml:"port"`
Protocol string `toml:"protocol"`
Environment string `toml:"environment"`
Compression bool `toml:"compression"`
} `toml:"Server"`
Message struct {
Keys struct {
Type string `toml:"type"`
Title string `toml:"title"`
Content string `toml:"content"`
Action string `toml:"action"`
} `toml:"Keys"`
} `toml:"Message"`
Translation struct {
Host string `toml:"host"`
Port int `toml:"port"`
Locale string `toml:"locale"`
Protocol string `toml:"protocol"`
Permitted struct {
Origins []struct {
Name string `toml:"name"`
} `toml:"Origins"`
Locales []struct {
Key string `toml:"key"`
Name string `toml:"name"`
} `toml:"Locales"`
} `toml:"Permitted"`
} `toml:"Translation"`
Assets struct {
Logo string `toml:"logo"`
Favicon string `toml:"favicon"`
} `toml:"Assets"`
Dates struct {
Formats struct {
DateTime string `toml:"dateTime"`
Date string `toml:"date"`
Time string `toml:"time"`
Backup string `toml:"backup"`
BackupFolder string `toml:"backupFolder"`
Human string `toml:"human"`
DMY2 string `toml:"dmy2"`
YMD string `toml:"ymd"`
Internal string `toml:"internal"`
} `toml:"Formats"`
} `toml:"Dates"`
History struct {
MaxEntries int `toml:"maxEntries"`
} `toml:"History"`
Hosts []struct {
Name string `toml:"name"`
FQDN string `toml:"fqdn"`
IP string `toml:"ip"`
Zone string `toml:"zone"`
} `toml:"Hosts"`
Security struct {
Sessions struct {
ExpiryPeriod int `toml:"expiryPeriod"`
Keys struct {
Session string `toml:"session"`
UserKey string `toml:"userKey"`
UserCode string `toml:"userCode"`
Token string `toml:"token"`
ExpiryPeriod string `toml:"expiryPeriod"`
Locale string `toml:"locale"`
Theme string `toml:"theme"`
Timezone string `toml:"timezone"`
Role string `toml:"role"`
} `toml:"Keys"`
} `toml:"Sessions"`
Service struct {
UserUID string `toml:"userUID"`
UserName string `toml:"userName"`
} `toml:"Service"`
} `toml:"Security"`
Display struct {
Delimiter string `toml:"delim"`
} `toml:"Display"`
Status struct {
UNKNOWN string `toml:"unknown"`
ONLINE string `toml:"online"`
OFFLINE string `toml:"offline"`
ERROR string `toml:"error"`
WARNING string `toml:"warning"`
} `toml:"Status"`
Communications struct {
Pushover struct {
UserKey string `toml:"userKey"`
APIToken string `toml:"apiToken"`
} `toml:"Pushover"`
Email struct {
Host string `toml:"host"`
Port int `toml:"port"`
User string `toml:"user"`
Password string `toml:"password"`
From string `toml:"from"`
Footer string `toml:"footer"`
Admin string `toml:"admin"`
} `toml:"Email"`
} `toml:"Communications"`
Logging struct {
Disable struct {
General string `toml:"general"`
Timing string `toml:"timing"`
Service string `toml:"service"`
Audit string `toml:"audit"`
Translation string `toml:"translation"`
Trace string `toml:"trace"`
Warning string `toml:"warning"`
Event string `toml:"event"`
Security string `toml:"security"`
Database string `toml:"database"`
Api string `toml:"api"`
Import string `toml:"import"`
Export string `toml:"export"`
Communications string `toml:"comms"`
Lock string `toml:"lock"`
Cache string `toml:"cache"`
Web string `toml:"web"`
All string `toml:"all"`
} `toml:"disable"`
Defaults struct {
MaxSize string `toml:"maxSize"`
MaxBackups string `toml:"maxBackups"`
MaxAge string `toml:"maxAge"`
Compress string `toml:"compress"`
} `toml:"Defaults"`
} `toml:"Logging"`
Backups struct {
RetainDays int `toml:"retainDays"`
} `toml:"Backups"`
WorkerPool struct {
Size int `toml:"size"`
} `toml:"WorkerPool"`
}
func (*Settings) Delimiter ¶
Delimiter returns the delimiter used to separate the display elements Deprecated: Use GetDefault_Delimiter instead
func (*Settings) GetApplication_Author ¶ added in v1.2.46
func (*Settings) GetApplication_Copyright ¶ added in v1.2.46
func (*Settings) GetApplication_Description ¶ added in v1.2.46
func (*Settings) GetApplication_Environment ¶ added in v1.2.46
func (*Settings) GetApplication_HomePath ¶ added in v1.2.46
func (*Settings) GetApplication_License ¶ added in v1.2.46
func (*Settings) GetApplication_Locale ¶ added in v1.2.46
func (*Settings) GetApplication_Name ¶ added in v1.2.46
func (*Settings) GetApplication_Prefix ¶ added in v1.2.46
func (*Settings) GetApplication_ReleaseDate ¶ added in v1.2.46
func (*Settings) GetApplication_Theme ¶ added in v1.2.67
func (*Settings) GetApplication_Timezone ¶ added in v1.2.67
func (*Settings) GetApplication_Version ¶ added in v1.2.46
func (*Settings) GetAssets_FaviconPath ¶ added in v1.2.46
func (*Settings) GetAssets_LogoPath ¶ added in v1.2.46
func (*Settings) GetBackup_RetainForDays ¶ added in v1.2.60
func (*Settings) GetCommunicationsEmail_AdminEmail ¶ added in v1.2.46
func (*Settings) GetCommunicationsEmail_Footer ¶ added in v1.2.46
func (*Settings) GetCommunicationsEmail_Host ¶ added in v1.2.46
func (*Settings) GetCommunicationsEmail_Password ¶ added in v1.2.46
func (*Settings) GetCommunicationsEmail_Port ¶ added in v1.2.46
func (*Settings) GetCommunicationsEmail_PortString ¶ added in v1.2.46
func (*Settings) GetCommunicationsEmail_Sender ¶ added in v1.2.46
func (*Settings) GetCommunicationsEmail_User ¶ added in v1.2.46
func (*Settings) GetCommunicationsPushover_APIToken ¶ added in v1.2.46
func (*Settings) GetCommunicationsPushover_UserKey ¶ added in v1.2.46
func (*Settings) GetDatabase_Host ¶ added in v1.2.46
func (*Settings) GetDatabase_Name ¶ added in v1.2.46
func (*Settings) GetDatabase_Password ¶ added in v1.2.46
func (*Settings) GetDatabase_Path ¶ added in v1.2.46
func (*Settings) GetDatabase_PoolSize ¶ added in v1.2.46
func (*Settings) GetDatabase_Port ¶ added in v1.2.46
func (*Settings) GetDatabase_PortString ¶ added in v1.2.46
func (*Settings) GetDatabase_Timeout ¶ added in v1.2.46
func (*Settings) GetDatabase_Type ¶ added in v1.2.46
func (*Settings) GetDatabase_User ¶ added in v1.2.46
func (*Settings) GetDatabase_Version ¶ added in v1.2.46
func (*Settings) GetDateFormat_Backup ¶ added in v1.2.46
func (*Settings) GetDateFormat_BackupDirectory ¶ added in v1.2.46
func (*Settings) GetDateFormat_DMY2 ¶ added in v1.2.46
func (*Settings) GetDateFormat_Date ¶ added in v1.2.46
func (*Settings) GetDateFormat_DateTime ¶ added in v1.2.46
func (*Settings) GetDateFormat_Human ¶ added in v1.2.46
func (*Settings) GetDateFormat_Internal ¶ added in v1.2.46
func (*Settings) GetDateFormat_Time ¶ added in v1.2.46
func (*Settings) GetDateFormat_YMD ¶ added in v1.2.46
func (*Settings) GetDefault_Delimiter ¶ added in v1.2.46
GetDefault_Delimiter returns the delimiter used to separate the display elements
func (*Settings) GetDisplayDelimiter ¶
GetDisplayDelimiter returns the delimiter used to separate the display elements Deprecated: Use GetDefault_Delimiter instead
func (*Settings) GetHistory_MaxHistoryEntries ¶ added in v1.2.46
func (*Settings) GetLocaleName ¶
func (*Settings) GetLogging_MaxAge ¶ added in v1.2.46
func (*Settings) GetLogging_MaxBackups ¶ added in v1.2.46
func (*Settings) GetLogging_MaxSize ¶ added in v1.2.46
func (*Settings) GetMessageKey_Action ¶ added in v1.2.46
func (*Settings) GetMessageKey_Content ¶ added in v1.2.46
func (*Settings) GetMessageKey_Title ¶ added in v1.2.46
func (*Settings) GetMessageKey_Type ¶ added in v1.2.46
func (*Settings) GetSecuritySessionKey_ExpiryPeriod ¶ added in v1.2.46
func (*Settings) GetSecuritySessionKey_Locale ¶ added in v1.2.66
func (*Settings) GetSecuritySessionKey_Session ¶ added in v1.2.46
func (*Settings) GetSecuritySessionKey_Theme ¶ added in v1.2.66
func (*Settings) GetSecuritySessionKey_Timezone ¶ added in v1.2.66
func (*Settings) GetSecuritySessionKey_Token ¶ added in v1.2.46
func (*Settings) GetSecuritySessionKey_UserCode ¶ added in v1.2.46
func (*Settings) GetSecuritySessionKey_UserKey ¶ added in v1.2.46
func (*Settings) GetSecuritySessionKey_UserRole ¶ added in v1.2.68
func (*Settings) GetSecuritySession_ExpiryPeriod ¶ added in v1.2.46
/ SECURITY SESSION
func (*Settings) GetServer_Compression ¶ added in v1.2.72
func (*Settings) GetServer_CompressionString ¶ added in v1.2.72
func (*Settings) GetServer_Environment ¶ added in v1.2.72
func (*Settings) GetServer_Host ¶ added in v1.2.46
func (*Settings) GetServer_Port ¶ added in v1.2.46
func (*Settings) GetServer_PortString ¶ added in v1.2.46
func (*Settings) GetServer_Protocol ¶ added in v1.2.46
func (*Settings) GetServiceUser_Name ¶ added in v1.2.46
/ SECURITY SESSION SERVICE USER
func (*Settings) GetServiceUser_UID ¶ added in v1.2.46
func (*Settings) GetServiceUser_UserCode ¶ added in v1.2.46
func (*Settings) GetStatusList ¶ added in v1.2.46
/ STATUS
func (*Settings) GetStatus_Error ¶
func (*Settings) GetStatus_Offline ¶
func (*Settings) GetStatus_Online ¶
func (*Settings) GetStatus_Unknown ¶
func (*Settings) GetStatus_Warning ¶
func (*Settings) GetTranslationServer_Host ¶ added in v1.2.46
func (*Settings) GetTranslationServer_Port ¶ added in v1.2.46
func (*Settings) GetTranslationServer_PortString ¶ added in v1.2.46
func (*Settings) GetTranslationServer_Protocol ¶ added in v1.2.46
func (*Settings) GetTranslation_Locale ¶ added in v1.2.46
func (*Settings) GetTranslation_PermittedLocales ¶ added in v1.2.46
func (*Settings) GetTranslation_PermittedOrigins ¶ added in v1.2.46
func (*Settings) GetValidHosts ¶
func (*Settings) GetWorkerPoolSize ¶ added in v1.20.0
func (*Settings) IsApiLoggingDisabled ¶
func (*Settings) IsApplicationMode ¶
func (*Settings) IsAuditLoggingDisabled ¶
func (*Settings) IsCacheLoggingDisabled ¶ added in v1.5.0
func (*Settings) IsCommunicationsLoggingDisabled ¶ added in v1.2.41
func (*Settings) IsDatabaseLoggingDisabled ¶
func (*Settings) IsEventLoggingDisabled ¶
func (*Settings) IsExportLoggingDisabled ¶ added in v1.2.32
func (*Settings) IsGeneralLoggingDisabled ¶
func (*Settings) IsImportLoggingDisabled ¶ added in v1.2.32
func (*Settings) IsLockLoggingDisabled ¶ added in v1.3.8
func (*Settings) IsLogCompressionEnabled ¶
func (*Settings) IsLoggingDisabled ¶ added in v1.2.46
func (*Settings) IsPermittedTranslationLocale ¶ added in v1.2.46
func (*Settings) IsPermittedTranslationOrigin ¶ added in v1.2.46
func (*Settings) IsSecurityLoggingDisabled ¶
func (*Settings) IsServiceLoggingDisabled ¶
func (*Settings) IsTimingLoggingDisabled ¶
func (*Settings) IsTraceLoggingDisabled ¶
func (*Settings) IsTranslationLoggingDisabled ¶
func (*Settings) IsWarningLoggingDisabled ¶
func (*Settings) IsWebLoggingDisabled ¶ added in v1.21.0
Click to show internal directories.
Click to hide internal directories.