db

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize(ctx contextx.Context)

Types

type IDbClient

type IDbClient interface {
	Insert(attrName string, attrID interface{}, data map[string]interface{}) error
	Save(attrName string, attrID interface{}, data map[string]interface{}, needReply bool) error
	Del(attrName string, attrID interface{}, needReply bool) error
	Load(attrName string, attrID interface{}, isSync ...interface{}) (map[string]interface{}, error)
	Exists(attrName string, attrID interface{}) (bool, error)
	ForEach(attrName string, callback func(attrID interface{}, data map[string]interface{}))

	LoadAll(attrName string) ([]interface {
		GetAttrID() interface{}
		GetData() map[string]interface{}
	}, error)
	// contains filtered or unexported methods
}

func GetOrNewDbClient

func GetOrNewDbClient(cfg IDbConfig) IDbClient

type IDbConfig

type IDbConfig interface {
	//GetType() string
	GetAddr() string
	GetDB() string
	GetUser() string
	GetPassword() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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