stores

package module
v0.0.0-...-a4f77ab Latest Latest
Warning

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

Go to latest
Published: May 29, 2019 License: MIT Imports: 5 Imported by: 0

README

stores

stores dirver

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NotFoundError = errors.New("key not found")
View Source
var NotPrtError = errors.New("输出对象必须是指针结构")
View Source
var NotSliceError = errors.New("输出对象必须是Slice结构")

Functions

func IPtrToValue

func IPtrToValue(iptr interface{}) reflect.Value

func IsPath

func IsPath(key string) bool

func MakeSlice

func MakeSlice(v reflect.Value, count int) (*reflect.Value, error)

func SplitKeys

func SplitKeys(key string) (path string, subkey string)

func VaildListStruct

func VaildListStruct(v reflect.Value) error

func ValidPtr

func ValidPtr(v reflect.Value) error

Types

type Queryer

type Queryer interface {
	Find(interface{}, interface{}) error
}

type SqlExecutor

type SqlExecutor interface {
	Exec(string, ...interface{}) (sql.Result, error)
	Query(string, ...interface{}) (*sql.Rows, error)
}

type Store

type Store interface {
	Write(string, interface{}) error
	// Read2(string, *interface{}) error
	Read(string, interface{}) error // key, out set value interface{} like &user is point interface{}
	// ReadAll2(*[]interface{}) error
	ReadAll(interface{}) error //out set value interface{} like &[]users is array struct
	Keys(...string) []string   //out set value interface{} like &[]users is array struct
	Perfix() string
}

Store 存储接口

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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