driver

package
v1.0.0-release Latest Latest
Warning

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

Go to latest
Published: May 13, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckUri

func CheckUri(name string, uri string) error

func Drivers

func Drivers() []map[string]string

func GetDocs

func GetDocs() map[string]string

func Register

func Register(name string, driver Driver)

Types

type ConnFun

type ConnFun interface {
	GetConnStatus() string
	SetConnStatus(status string)
	Connect() bool
	ReConnect() bool
	HeartCheck()
	Close() bool
	Insert(key string, data interface{}) (bool, error)
	Update(key string, data interface{}) (bool, error)
	Del(key string) (bool, error)
	SendToList(key string, data interface{}) (bool, error)
	SetExpir(Expir int)
	SetMustBeSuccess(b bool)
}

func Open

func Open(name string, uri string) ConnFun

type Driver

type Driver interface {
	Open(uri string) ConnFun
	//GetTypeList() []string
	GetUriExample() string
	CheckUri(uri string) error
	GetTypeAndRule() TypeAndRule
	GetDoc() string
}

type TypeAndRule

type TypeAndRule struct {
	DataTypeList []string
	TypeList     map[string]TypeRule
}

func GetTypeAndRule

func GetTypeAndRule(name string) TypeAndRule

type TypeRule

type TypeRule struct {
	Key        string
	KeyExample string
	Val        string
}

Jump to

Keyboard shortcuts

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