Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IDb ¶
type IDb interface { Set(prefix []byte, key []byte, value []byte) error Get(prefix []byte, key []byte) (Obj, bool, error) Delete(prefix []byte, key []byte) error GetAllByCollection(prefix []byte) ([]Obj, error) CountByCollection(prefix []byte) (int64, error) RemoveAllByCollection(prefix []byte) error Close() }
IDb interface for all db kind
type Options ¶
type Options struct { Type string `yaml:"Type" env:"DB_TYPE" env-default:"badger-db" env-description:"Type of db badger-db or badger-memory"` Path string `yaml:"Path" env:"DB_PATH" env-default:"./data/db" env-description:"Path for storage"` Reporting bool `yaml:"Reporting" env:"DB_REPORTING" env-default:"false" env-description:"Flag to run on-off db size reporting"` Logger *zap.Logger Ctx context.Context }
Options for creating all db type
Click to show internal directories.
Click to hide internal directories.