Documentation ¶
Index ¶
- Constants
- func ClearPathCache()
- func CrateConfigPath() (string, error)
- func CrateDatabasePath() (string, error)
- func CrateDirectory() (string, error)
- func CrateLoggingPath() (string, error)
- func InitializeConfigFile(path string) error
- func InitializeCrateDirectory(path string) error
- func PathExists(path string) (bool, error)
- type Config
Constants ¶
View Source
const ( Windows = "windows" WindowsAppData = "AppData" WindowsRoaming = "Roaming" WindowsCrateName = "Crate" UnixCrateName = ".crate" DatabaseName = "filemeta.db" ConfigName = "config.yaml" LogDirName = "logs" LogFileName = "events.log" )
Variables ¶
This section is empty.
Functions ¶
func CrateConfigPath ¶
Returns the config path and performs initialization if not done
func CrateDatabasePath ¶
Returns the database path and performs initialization if not done.
func CrateDirectory ¶
Figures out the configuration and data path and returns it or an error Configuration and data are in the HOME directory of the current user
func CrateLoggingPath ¶
Returns the logging path and performs initialization if not exists
func InitializeConfigFile ¶
Creates a Config YAML file with the default settings at the specified path
func InitializeCrateDirectory ¶
Creates the Crate directory and initializes it with default files
func PathExists ¶
Helper function to check if a path exists on the file system
Types ¶
type Config ¶
type Config struct { Debug bool `yaml:debug,omitempty` // default false Notify []string `yaml:notify,omitempty` // default [] Level string `yaml:level,omitempty` // default INFO }
Click to show internal directories.
Click to hide internal directories.