Versions in this module Expand all Collapse all v1 v1.0.17 Aug 3, 2024 v1.0.16 Aug 2, 2024 v1.0.15 Aug 1, 2024 Changes in this version type Base + NotCache bool v1.0.14 Jul 31, 2024 v1.0.13 Jul 30, 2024 v1.0.12 Jul 30, 2024 Changes in this version + func CopyLimit(dst io.Writer, src io.Reader, length int64) (int64, error) v1.0.11 Jul 28, 2024 Changes in this version + const DEFAULT_QUEUE_NAME + const SET_IF_NOT_EXIST + const SET_WITH_EXPIRE_TIME + const START_QUEUE_NAME + func InitAsyncTask(funMap map[string]IAsync) + type AsyncParams map[string]any + func (p *AsyncParams) GetAny(key string) any + func (p *AsyncParams) GetFloat64(key string) float64 + func (p *AsyncParams) GetInt(key string) int + func (p *AsyncParams) GetInt64(key string) int64 + func (p *AsyncParams) GetString(key string) string type Base + func (b *Base) Exist() bool + func (b *Base) ExistBy(key string, val any) bool type DbManager + func (m *DbManager) GetRds1() redis.Conn + func (m *DbManager) GetRds2() redis.Conn + func (m *DbManager) GetRds3() redis.Conn + func (m *DbManager) GetRds4() redis.Conn + func (m *DbManager) GetSsdb0() redis.Conn + type DelayObj struct + Action string + Name string + Params *AsyncParams + func (m *DelayObj) Call(action string) + func (m *DelayObj) SetTm(t ...int) + func (m *DelayObj) WithParam(p *AsyncParams) *DelayObj + type IAsync interface + AsyncStart func(p *DelayObj) v1.0.10-alpha Jul 26, 2024 v1.0.9-alpha Jul 25, 2024 v1.0.8 Jul 24, 2024 v1.0.8-alpha Jul 24, 2024 v1.0.7 Jul 24, 2024 Changes in this version + const TABLE_ROW_CACHE type DbManager + Db *sql.DB v1.0.6 Jul 18, 2024 Changes in this version type RedisInstance + Con redis.Conn v1.0.5 Jul 18, 2024 Changes in this version + var DbHandler = DbManager + var TABLE_PREFIX string + func Lock(lock_key string, request_id string, fun func()) + func ParseDbConfigAndInit(path string) bool + func TryLock(lock_key string, request_id string, timeout int) bool + type Base struct + ChangeKey []string + GetEmptyModel func() IMode + GetId func() int64 + GetPInstance func() IPagination + GetSelfModel func() IMode + Name string + Obj MField + OutRes *bytes.Buffer + SetObjId func(id int64) + Tx *sql.Tx + func (b *Base) AppendChangeKey(field string) + func (b *Base) Delete() bool + func (b *Base) FindFirst() bool + func (b *Base) FindFirstBy(key string, id any) bool + func (b *Base) FindFirstById(id int) bool + func (b *Base) FindPagination() any + func (b *Base) GetObj() MField + func (b *Base) Order(order string) *Base + func (b *Base) Page(page int64) *Base + func (b *Base) PageLimit(page, pageSize int64) *Base + func (b *Base) Save() bool + func (b *Base) SetGetIdFun(f func() int64) + func (b *Base) SetName(name string) + func (b *Base) SetObj(p MField) int + func (b *Base) SetObjIdFun(f func(id int64)) + func (b *Base) Where(where string, bind ...any) *Base + func (b *Base) WithCond(y def.ICond) + func (b *Base) WithTx(tx *sql.Tx) + type Database struct + Adapter string + Db string + Host string + Pass string + Port string + Prefix string + User string + type DbConfig struct + Database *Database + Redis *Redis + Ssdb *Redis + type DbManager struct + Rdb *redis.Pool + Ssdb *redis.Pool + func (m *DbManager) Begin(f func(tx *sql.Tx) error) error + func (m *DbManager) GetRds() *RedisInstance + func (m *DbManager) GetSsdb() *RedisInstance + func (m *DbManager) InitDb(db *Database) error + func (m *DbManager) InitRds(conf *Redis) int + func (m *DbManager) InitSsdb(conf *Redis) + type DbResult struct + Key []string + Value []any + type IMode interface + GetObj func() MField + type IPagination interface + SetCount func(total, current, pageSize int64) + SetDao func(pf []any) + type MField interface + GetMapField func() map[string]string + type Redis struct + Db string + Host string + Idle int + Init int + MaxCon int + Port string + Psw string + type RedisInstance struct