Documentation ¶
Overview ¶
Package config provides the configuration specification.
Index ¶
Constants ¶
const ConfigEnvVar = "SEMANTIC_SENSEI_CONFIG_PATH"
ConfigEnvVar is the environment variable that can be used to set the path to the configuration file.
const DefaultConfigPath = "/app/config.yaml"
DefaultConfigPath is the default path to the configuration file.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Database Database `yaml:"database"`
}
Config represents the configuration settings for the application.
func New ¶
New creates a new instance of Config by reading the configuration file. It first checks if the config path environment variable is set, and if so, uses that as the path to the configuration file. If the environment variable is not set, it uses the default path. Then the config file is read, and unmarshalled. Returns a pointer to the Config struct and any error encountered during the process.
type Database ¶
type Database struct { DB string `yaml:"db"` Host string `yaml:"host"` Password string `yaml:"password"` SSL string `yaml:"ssl"` User string `yaml:"user"` }
Database represents the configuration for the database connection.
func (Database) ConnectionString ¶
ConnectionString returns the connection string for the database.