Documentation ¶
Overview ¶
TODO: Make public?
Index ¶
Constants ¶
View Source
const RequireExplicitDSNType = "require"
Variables ¶
View Source
var ( ErrInvalidDSN = errors.New("invalid DSN") ErrUnknownType = errors.New("unknown DSN type") )
Functions ¶
Types ¶
type Config ¶
type Config struct { // If `Type` is empty, `DSN` must be in the form of "type:actual_dsn". // If both `Type` and `DSN` are empty, `Type` will be considered "sqlite" // with an empty DSN, which will make sqlite use a temporary database // (see https://www.sqlite.org/inmemorydb.html). // If `Type` is "require" (RequireExplicitDSNType), `DSN` must be specified. Type string `koanf:"type"` DSN string `koanf:"dsn"` Debug bool `koanf:"debug"` SlowQueryThreshold time.Duration `koanf:"slow_query_threshold"` // If true, DB migrations will run automatically. // If false, the server will fail to start if a migration is required, // and the user has to run 'ak server migrate' explicitly. AutoMigrate bool `koanf:"auto_migrate"` }
Click to show internal directories.
Click to hide internal directories.