authelia/internal/configuration/schema/storage.go

34 lines
1.2 KiB
Go
Raw Normal View History

package schema
// LocalStorageConfiguration represents the configuration when using local storage.
type LocalStorageConfiguration struct {
Path string `mapstructure:"path"`
}
// SQLStorageConfiguration represents the configuration of the SQL database.
type SQLStorageConfiguration struct {
Host string `mapstructure:"host"`
Port int `mapstructure:"port"`
Database string `mapstructure:"database"`
Username string `mapstructure:"username"`
Password string `mapstructure:"password"`
}
// MySQLStorageConfiguration represents the configuration of a MySQL database.
2019-11-16 19:50:58 +00:00
type MySQLStorageConfiguration struct {
SQLStorageConfiguration `mapstructure:",squash"`
2019-11-16 19:50:58 +00:00
}
// PostgreSQLStorageConfiguration represents the configuration of a Postgres database.
2019-11-16 19:50:58 +00:00
type PostgreSQLStorageConfiguration struct {
SQLStorageConfiguration `mapstructure:",squash"`
SSLMode string `mapstructure:"sslmode"`
2019-11-16 19:50:58 +00:00
}
// StorageConfiguration represents the configuration of the storage backend.
type StorageConfiguration struct {
Local *LocalStorageConfiguration `mapstructure:"local"`
MySQL *MySQLStorageConfiguration `mapstructure:"mysql"`
PostgreSQL *PostgreSQLStorageConfiguration `mapstructure:"postgres"`
}