Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Configuration ¶
type Configuration struct {
Env string `yaml:"env"`
API ApiConfig `yaml:"api"`
Mail MailConfig `yaml:"mail"`
Redis RedisConfig `yaml:"redis"`
Postgres PostgresConfig `yaml:"postgres"`
Mailjet MailjetConfig `yaml:"mailjet"`
GCP GCPConfig `yaml:"gcp"`
Log LogConfig `yaml:"log"`
JWTSecret string `yaml:"jwt_secret" envconfig:"JWT_SECRET"`
}
Configuration provide package level configuration for vendtron by reading from config.yaml first then overwrite if any with env (Default read from .env)
func Build ¶
func Build(yamlPath, envPrefix string) (*Configuration, error)
type MailConfig ¶
type MailConfig struct {
Port int `yaml:"port" envconfig:"MAIL_PORT"`
Host string `yaml:"host" envconfig:"MAIL_HOST"`
Sender string `yaml:"sender" envconfig:"MAIL_SENDER"`
Queue string `yaml:"queue" envconfig:"MAIL_QUEUE"`
AuthUser string `yaml:"auth_user" envconfig:"MAIL_AUTH_USER"`
AuthPassword string `yaml:"auth_password" envconfig:"MAIL_AUTH_PASSWORD"`
WorkerSpace string `yaml:"worker_space" envconfig:"MAIL_WORKER_SPACE"`
}
type MailjetConfig ¶
type PostgresConfig ¶
type PostgresConfig struct {
Port int `yaml:"port" envconfig:"POSTGRES_PORT"`
Host string `yaml:"host" envconfig:"POSTGRES_HOST"`
User string `yaml:"user" envconfig:"POSTGRES_USER"`
Password string `yaml:"password" envconfig:"POSTGRES_PASSWORD"`
DBName string `yaml:"dbname" envconfig:"POSTGRES_DBNAME"`
SSLMode string `yaml:"sslmode" envconfig:"POSTGRES_SSLMODE"`
}
Click to show internal directories.
Click to hide internal directories.