db

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exit

func Exit(db *config.Database)

func ExitCache

func ExitCache(db *config.Database)

func Init

func Init(db *config.Database)

Init function can perform some initialization work of different databases.

func InitCache

func InitCache(db *config.Database)

Init function can perform some initialization work of different databases.

Types

type CacheAdapter

type CacheAdapter interface {
	StoreData(ctx context.Context, backends []*model.MetaBackend, query interface{}) error
	FetchData(ctx context.Context, query interface{}) ([]*model.MetaBackend, error)
}
var Cacheadapter CacheAdapter

type DBAdapter

type DBAdapter interface {
	CreateMetadata(ctx context.Context, metaBackend model.MetaBackend) error
	ListMetadata(ctx context.Context, query []bson.D) ([]*model.MetaBackend, error)
}
var DbAdapter DBAdapter

DbAdapter is a global variable that controls database module.

Directories

Path Synopsis
drivers

Jump to

Keyboard shortcuts

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