Documentation ¶
Index ¶
- func Get(location LocationEnum) string
- func GetBaseDir(baseDir BaseDirEnum) string
- func GetTimestamped(key LocationEnum) string
- func ListExpandedPaths() map[string]string
- func PrettyPaths() string
- func Set(locationName LocationEnum, path string) error
- func SetBaseDir(baseDirName BaseDirEnum, path string) error
- type BaseDirEnum
- type LocationEnum
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get ¶
func Get(location LocationEnum) string
func GetBaseDir ¶
func GetBaseDir(baseDir BaseDirEnum) string
func GetTimestamped ¶
func GetTimestamped(key LocationEnum) string
func ListExpandedPaths ¶ added in v1.21.0
ListExpandedPaths returns a machine-readable mapping of the currently configured locations.
func PrettyPaths ¶ added in v1.21.0
func PrettyPaths() string
PrettyPaths returns a nicely formatted, human-readable listing
func Set ¶ added in v1.21.0
func Set(locationName LocationEnum, path string) error
Set overrides a location to the given path, making sure to it points to an absolute path first. Only the special "-" value will be used verbatim.
func SetBaseDir ¶
func SetBaseDir(baseDirName BaseDirEnum, path string) error
Types ¶
type BaseDirEnum ¶
type BaseDirEnum string
const ( // Overridden by --home flag ConfigBaseDir BaseDirEnum = "config" DataBaseDir BaseDirEnum = "data" // User's home directory, *not* --home flag UserHomeBaseDir BaseDirEnum = "userHome" LevelDBDir = "index-v0.14.0.db" )
type LocationEnum ¶
type LocationEnum string
const ( ConfigFile LocationEnum = "config" CertFile LocationEnum = "certFile" KeyFile LocationEnum = "keyFile" HTTPSCertFile LocationEnum = "httpsCertFile" HTTPSKeyFile LocationEnum = "httpsKeyFile" Database LocationEnum = "database" LogFile LocationEnum = "logFile" CsrfTokens LocationEnum = "csrfTokens" PanicLog LocationEnum = "panicLog" AuditLog LocationEnum = "auditLog" GUIAssets LocationEnum = "guiAssets" DefFolder LocationEnum = "defFolder" )
Use strings as keys to make printout and serialization of the locations map more meaningful.
Click to show internal directories.
Click to hide internal directories.