Documentation ¶
Index ¶
- Constants
- func CloseMysql()
- func Delete(deleteStr string, args ...interface{}) (int64, error)
- func GetMysql() *sql.DB
- func Insert(insertStr string, args ...interface{}) (int64, error)
- func NewMysql(path string)
- func Query(queryStr string, args ...interface{}) (map[int]map[string]string, error)
- func Update(updateStr string, args ...interface{}) (int64, error)
- type Cache
- func (cache *Cache) ClearAll() error
- func (cache *Cache) Decr(key string) error
- func (cache *Cache) Delete(key string) error
- func (cache *Cache) Do(commandName string, args ...interface{}) (reply interface{}, err error)
- func (cache *Cache) Get(key string) interface{}
- func (cache *Cache) GetMulti(keys []string) []interface{}
- func (cache *Cache) Hget(key string, filed interface{}) interface{}
- func (cache *Cache) HgetMulti(key string, fileds []interface{}) []interface{}
- func (cache *Cache) Hset(key string, filed interface{}, val interface{}) error
- func (cache *Cache) Incr(key string) error
- func (cache *Cache) IsExist(key string) bool
- func (cache *Cache) IsExistHash(key, filed string) bool
- func (cache *Cache) Put(key string, val interface{}, timeout time.Duration) error
- func (cache *Cache) Send(commandName string, args ...interface{}) error
- func (cache *Cache) Transaction(check checkback, exec execback, key ...string) (code int, err error)
- type CallBack
- type Mysql
- type MysqlTransaction
- func (t *MysqlTransaction) Commit() error
- func (t *MysqlTransaction) Delete(deleteStr string, args ...interface{}) (int64, error)
- func (t *MysqlTransaction) Insert(insertStr string, args ...interface{}) (int64, error)
- func (t *MysqlTransaction) Query(queryStr string, args ...interface{}) (map[int]map[string]string, error)
- func (t *MysqlTransaction) Rollback() error
- func (t *MysqlTransaction) Update(updateStr string, args ...interface{}) (int64, error)
- type Redis
- type Ret
Constants ¶
View Source
const (
IMAGEKEY = "GSERVERKEY"
)
View Source
const (
INFINITE = (1 << 32) * time.Second
)
Variables ¶
This section is empty.
Functions ¶
func CloseMysql ¶
func CloseMysql()
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
func (*Cache) IsExistHash ¶
检查指定key是否存在(hash表)
type Mysql ¶
type Mysql struct { User string Password string Host string Db string MaxOpenConns int MaxIdleConns int }
配置
type MysqlTransaction ¶
func (*MysqlTransaction) Delete ¶
func (t *MysqlTransaction) Delete(deleteStr string, args ...interface{}) (int64, error)
删除
func (*MysqlTransaction) Insert ¶
func (t *MysqlTransaction) Insert(insertStr string, args ...interface{}) (int64, error)
插入
Click to show internal directories.
Click to hide internal directories.