package
Version:
v0.1.1
Opens a new window with list of versions in this module.
Published: Apr 10, 2023
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
func SetConfig(configFile string)
type App struct {
Name string `yaml:"name"`
NameSlug string `yaml:"nameSlug"`
}
type Config struct {
Env string `yaml:"env"`
App App `yaml:"app"`
HttpServer HttpServer `yaml:"httpServer"`
Log Log `yaml:"log"`
Scheduler Scheduler `yaml:"scheduler"`
Schedules []Schedule `yaml:"schedules"`
Postgres Postgres `yaml:"postgres"`
Redis Redis `yaml:"redis"`
Sentry Sentry `yaml:"sentry"`
}
type HttpServer struct {
Port int `yaml:"port"`
}
type Label struct {
En string `json:"en"`
Th string `json:"th"`
}
type Log struct {
Level string `yaml:"level"`
StacktraceLevel string `yaml:"stacktraceLevel"`
FileEnabled bool `yaml:"fileEnabled"`
FileSize int `yaml:"fileSize"`
FilePath string `yaml:"filePath"`
FileCompress bool `yaml:"fileCompress"`
MaxAge int `yaml:"maxAge"`
MaxBackups int `yaml:"maxBackups"`
}
type Postgres struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
Username string `yaml:"username"`
Password string `yaml:"password"`
Database string `yaml:"database"`
Schema string `yaml:"schema"`
MaxConnections int32 `yaml:"maxConnections"`
MaxConnIdleTime int32 `yaml:"maxConnIdleTime"`
}
type Redis struct {
Host string `yaml:"host"`
Port int `yaml:"port"`
Password string `yaml:"password"`
Database int `yaml:"database"`
}
type Schedule struct {
Job string `yaml:"job"`
Cron string `yaml:"cron"`
IsEnabled bool `yaml:"isEnabled"`
}
type Scheduler struct {
Timezone string `yaml:"timezone"`
}
type Sentry struct {
Dsn string `yaml:"dsn"`
Environment string `yaml:"environment"`
Release string `yaml:"release"`
Debug bool `yaml:"debug"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.