db

package
v0.0.0-...-44f477e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCacheDriver

func NewCacheDriver(cache cache.Cache, driver store.Driver) store.Driver

NewCacheDriver returns driver with cache

func NewDBCfgManager

func NewDBCfgManager() *config.CfgManager

NewDBCfgManager - create DB config manager

Types

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

Cache - Used to load/save configuration with cache

func (*Cache) Load

func (d *Cache) Load(ctx context.Context) (map[string]interface{}, error)

Load - load config from database, only user setting will be load from database.

func (*Cache) Save

func (d *Cache) Save(ctx context.Context, cfg map[string]interface{}) error

Save - Only save user config items in the cfgs map

type Database

type Database struct {
	// contains filtered or unexported fields
}

Database - Used to load/save configuration in database

func (*Database) Load

func (d *Database) Load(ctx context.Context) (map[string]interface{}, error)

Load - load config from database, only user setting will be load from database.

func (*Database) Save

func (d *Database) Save(ctx context.Context, cfgs map[string]interface{}) error

Save - Only save user config items in the cfgs map

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL