forked from TrueCloudLab/neoneo-go
59f72429b4
The list of three supported types (`Type`) in the `DBConfiguration` struct has been added. Signed-off-by: Tatiana Nesterenko <tatiana@nspcc.io>
24 lines
767 B
Go
24 lines
767 B
Go
/*
|
|
Package dbconfig is a micropackage that contains storage DB configuration options.
|
|
*/
|
|
package dbconfig
|
|
|
|
type (
|
|
// DBConfiguration describes configuration for DB. Supported types:
|
|
// [LevelDB], [BoltDB] or [InMemoryDB] (not recommended for production usage).
|
|
DBConfiguration struct {
|
|
Type string `yaml:"Type"`
|
|
LevelDBOptions LevelDBOptions `yaml:"LevelDBOptions"`
|
|
BoltDBOptions BoltDBOptions `yaml:"BoltDBOptions"`
|
|
}
|
|
// LevelDBOptions configuration for LevelDB.
|
|
LevelDBOptions struct {
|
|
DataDirectoryPath string `yaml:"DataDirectoryPath"`
|
|
ReadOnly bool `yaml:"ReadOnly"`
|
|
}
|
|
// BoltDBOptions configuration for BoltDB.
|
|
BoltDBOptions struct {
|
|
FilePath string `yaml:"FilePath"`
|
|
ReadOnly bool `yaml:"ReadOnly"`
|
|
}
|
|
)
|