forked from TrueCloudLab/neoneo-go
9987afea4c
Lightweight thing to import anywhere, pkg/config should not be dependent on Level/Bolt/anything else.
21 lines
621 B
Go
21 lines
621 B
Go
/*
|
|
Package dbconfig is a micropackage that contains storage DB configuration options.
|
|
*/
|
|
package dbconfig
|
|
|
|
type (
|
|
// DBConfiguration describes configuration for DB. Supported: 'levelDB', 'boltDB'.
|
|
DBConfiguration struct {
|
|
Type string `yaml:"Type"`
|
|
LevelDBOptions LevelDBOptions `yaml:"LevelDBOptions"`
|
|
BoltDBOptions BoltDBOptions `yaml:"BoltDBOptions"`
|
|
}
|
|
// LevelDBOptions configuration for LevelDB.
|
|
LevelDBOptions struct {
|
|
DataDirectoryPath string `yaml:"DataDirectoryPath"`
|
|
}
|
|
// BoltDBOptions configuration for BoltDB.
|
|
BoltDBOptions struct {
|
|
FilePath string `yaml:"FilePath"`
|
|
}
|
|
)
|