Documentation
¶
Index ¶
Constants ¶
View Source
const ( Debug LogLevel = "debug" // Detailed debug information Info LogLevel = "info" // General operational information Warn LogLevel = "warn" // Warning messages for potentially harmful situations Error LogLevel = "error" // Error messages for serious problems // Log Formats define how log messages are structured Text LogFormat = "text" // Human-readable text format // Default configuration values DefaultVersion = "1.0.0" // Initial version number DefaultTimeFormat = "RFC3339" // Standard time format (Not in use right now) DefaultRefreshRate = 5 // Dashboard refresh rate in seconds )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JotlConfig ¶
type JotlConfig struct {
Version string `yaml:"version" json:"version"` // Configuration version
Project Project `yaml:"project" json:"project"` // Project settings
Database Database `yaml:"database" json:"database"` // Database settings
Logging Logging `yaml:"logging" json:"logging"` // Logging settings
Dashboard Dashboard `yaml:"dashboard" json:"dashboard"` // Dashboard settings
}
JotlConfig is the root configuration structure containing all settings
func LoadConfig ¶
func LoadConfig(startDir string) (*JotlConfig, error)
LoadConfig reads and parses user YAML configuration file. This may be called every time you run `... dev` to verify user configs
func NewConfig ¶
func NewConfig(name, loglevel, dbPath string) *JotlConfig
NewConfig creates a new configuration with default values.
func (*JotlConfig) SaveConfig ¶
func (c *JotlConfig) SaveConfig(path string) error
func (*JotlConfig) SetDescription ¶
func (c *JotlConfig) SetDescription(desc string)
SetDescription updates the project description.
func (*JotlConfig) SetLogLevel ¶
func (c *JotlConfig) SetLogLevel(level string) error
SetLogLevel updates the logging level if valid.
func (*JotlConfig) SetProjectName ¶
func (c *JotlConfig) SetProjectName(name string)
SetProjectName updates the project name.
type PostgresConfig ¶
type PostgresConfig struct {
ContainerName string
DBName string
User string
Password string
Port string
Volume string
}
func DefaultPostgresConfig ¶
func DefaultPostgresConfig() PostgresConfig
func (*PostgresConfig) CreateDockerCompose ¶
func (pc *PostgresConfig) CreateDockerCompose(currentDir string, config PostgresConfig) error
Click to show internal directories.
Click to hide internal directories.