Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureUserDataDir ¶
func EnsureUserDataDir() error
EnsureUserDataDir ensures the user data directory exists
func GetDefaultDBPath ¶
func GetDefaultDBPath() string
GetDefaultDBPath returns the default SQLite database path
func GetUserDataDir ¶
func GetUserDataDir() string
GetUserDataDir returns the user data directory for Knot - Linux/macOS: ~/.knot - Windows: %LOCALAPPDATA%/knot
func InitConfig ¶
func InitConfig() error
InitConfig initializes the configuration file with defaults
Types ¶
type Config ¶
type Config struct {
DatabaseType string `mapstructure:"databaseType"`
SQLitePath string `mapstructure:"sqlitePath"`
PostgresURL string `mapstructure:"postgresUrl"`
MySQLURL string `mapstructure:"mysqlUrl"`
Port int `mapstructure:"port"`
Host string `mapstructure:"host"`
EnableLogging bool `mapstructure:"enableLogging"`
}
Config holds the application configuration
func LoadConfig ¶
LoadConfig loads configuration from file and defaults
Click to show internal directories.
Click to hide internal directories.