2019-04-25 04:52:08 +07:00
|
|
|
package schema
|
|
|
|
|
|
|
|
// LocalStorageConfiguration represents the configuration when using local storage.
|
|
|
|
type LocalStorageConfiguration struct {
|
|
|
|
Path string `yaml:"path"`
|
|
|
|
}
|
|
|
|
|
2019-11-16 17:38:21 +07:00
|
|
|
// SQLStorageConfiguration represents the configuration of the SQL database
|
|
|
|
type SQLStorageConfiguration struct {
|
|
|
|
Host string `yaml:"host"`
|
|
|
|
Port int `yaml:"port"`
|
|
|
|
Database string `yaml:"database"`
|
|
|
|
Username string `yaml:"username"`
|
|
|
|
Password string `yaml:"password"`
|
|
|
|
}
|
|
|
|
|
2019-11-17 02:50:58 +07:00
|
|
|
// MySQLStorageConfiguration represents the configuration of a MySQL database
|
|
|
|
type MySQLStorageConfiguration struct {
|
|
|
|
SQLStorageConfiguration `yaml:",inline"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// PostgreSQLStorageConfiguration represents the configuration of a Postgres database
|
|
|
|
type PostgreSQLStorageConfiguration struct {
|
|
|
|
SQLStorageConfiguration `yaml:",inline"`
|
|
|
|
SSLMode string `yaml:"sslmode"`
|
|
|
|
}
|
|
|
|
|
2019-04-25 04:52:08 +07:00
|
|
|
// StorageConfiguration represents the configuration of the storage backend.
|
|
|
|
type StorageConfiguration struct {
|
2019-11-17 02:50:58 +07:00
|
|
|
Local *LocalStorageConfiguration `yaml:"local"`
|
|
|
|
MySQL *MySQLStorageConfiguration `yaml:"mysql"`
|
|
|
|
PostgreSQL *PostgreSQLStorageConfiguration `yaml:"postgres"`
|
2019-04-25 04:52:08 +07:00
|
|
|
}
|