Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dao ¶
type Dao interface { GetDB() *gorm.DB Ping() error Close() error Create(ctx context.Context, tableName string, in interface{}) error Delete(ctx context.Context, tableName string, in interface{}, unscoped bool) error DeleteIds(ctx context.Context, tableName string, in interface{}, ids []uint, unscoped bool) error DeleteWhereAny(ctx context.Context, tableName string, in interface{}, unscoped bool, query interface{}, args ...interface{}) error First(ctx context.Context, tableName string, in interface{}, query interface{}, args ...interface{}) error Latest(ctx context.Context, tableName string, in interface{}, query interface{}, args ...interface{}) error Find(ctx context.Context, tableName string, in interface{}, query interface{}, args ...interface{}) error FindAndOrderByInterface(ctx context.Context, tableName string, orderBy string, in interface{}, query interface{}, args ...interface{}) error Update(ctx context.Context, tableName string, id uint, updates interface{}) error Count(ctx context.Context, tableName string, query interface{}, args ...interface{}) (int64, error) FindAndLimit(ctx context.Context, tableName string, limit, offset int, in interface{}, query interface{}, args ...interface{}) error FindAndLimitOrder(ctx context.Context, tableName, orderBy string, limit, offset int, in interface{}, query interface{}, args ...interface{}) error FindAndLimitAndSortInterface(ctx context.Context, tableName string, in interface{}, orderBy string, offset, limit int32, query interface{}, args ...interface{}) error DeleteWhereQuery(ctx context.Context, tableName string, in interface{}, unscoped bool, query interface{}, args ...interface{}) error UpdateWhereQuery(ctx context.Context, tableName string, updates interface{}, query interface{}, args ...interface{}) error }
type RedisDao ¶
type RedisDao interface { GetRD() *redis.Client Ping() error Close() error Set(key string, value interface{}) error SetCtx(ctx context.Context, key string, value interface{}) error SetEx(key string, value interface{}, seconds int) error SetExCtx(ctx context.Context, key string, value interface{}, seconds int) error Get(key string) (string, error) GetCtx(ctx context.Context, key string) (string, error) NewWatcher(channel string, fn func(msg *redis.Message)) error NewWatcherCtx(ctx context.Context, channel string, fn func(msg *redis.Message)) error Publish(channel string, msg string) error PublishCtx(ctx context.Context, channel string, msg string) error Ttl(key string) (int, error) TtlCtx(ctx context.Context, key string) (int, error) Del(keys ...string) (int, error) DelCtx(ctx context.Context, keys ...string) (int, error) Keys(pattern string) ([]string, error) KeysCtx(ctx context.Context, pattern string) ([]string, error) }
func NewRedisDao ¶
func NewRedisDao(rd *redis.Client) RedisDao
func NewRedisDaoWithRdConfig ¶
func NewRedisDaoWithRdConfig(rc *rexStore.RedisConfig) RedisDao
Click to show internal directories.
Click to hide internal directories.