Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
// Server
HostAndPort string `env:"RANGI_HOST_AND_PORT,default=:6532"`
// Log
LogLevel string `env:"RANGI_LOG_LEVEL,default=info" validate:"oneof=debug info warn error"`
LogFormat string `env:"RANGI_LOG_FROMAT,default=text" validate:"oneof=text json"`
// Templates
EnableTemplateDevelopment bool `env:"RANGI_ENABLE_TEMPLATE_DEVELOPMENT,default=false"`
// Blueprints
BlueprintsPath string `env:"RANGI_BLUEPRINTS_PATH"`
// Database
DatabaseType string `env:"RANGI_DATABASE_TYPE,default=sqlite3" validate:"oneof=sqlite3 postgresql"`
// Sqlite3
// Used to override the default file path
Sqlite3DatabaseFile string `env:"RANGI_SQLITE3_DATABASE_FILE"`
// Admin interface
AdminItemsLimit int `env:"RANGI_ADMIN_ITEMS_LIMIT,default=50" validate:"gte=1,lte=200"`
// Used to reference assets that are stored relative to the binary. TODO: Do we want to store everything relative to the binary as default behavior?
ExecutableDir string
Logger *slog.Logger
DatabaseInstance *database.DB
Validate *validator.Validate
}
Click to show internal directories.
Click to hide internal directories.