Versions in this module Expand all Collapse all v1 v1.0.1 Nov 23, 2023 Changes in this version + var Database *gorm.DB + var Gin *gin.Engine + var Valid *validator.Validate + func CloseRedis() + func ConnectionDatabase(config *DatabaseConnetStu) error + func ConnectionRedis(config *RedisConnetionStu) + func CreateGin(isProd bool) + func DBTransaction(call func(tx *gorm.DB) error) error + func GetDB(tx ...*gorm.DB) *gorm.DB + func RdbDel(key string) error + func RdbGet(key string) (string, error) + func RdbKeys() ([]string, error) + func RdbPublish(ctx context.Context, ch, msg string) error + func RdbSAdd(key string, members ...interface{}) error + func RdbSCard(key string) (int64, error) + func RdbSIsMember(key string, val interface{}) (bool, error) + func RdbSMembers(key string) ([]string, error) + func RdbSRem(key string, members ...interface{}) (int64, error) + func RdbSet(key string, val interface{}, ttl time.Duration) error + func RdbSubscribe(ctx context.Context, ch string) (string, error) + func RedisPing(ctx context.Context) (string, error) + func RegisterValidate() + type DatabaseConnetStu struct + DbHost string + DbMaxIdleConns int + DbMaxLifetime time.Duration + DbMaxOpenConns int + DbName string + DbPassword string + DbPort string + DbType string + DbUsername string + type RedisConnetionStu struct + DialTimeout time.Duration + ReadTimeout time.Duration + RedisHost string + RedisPass string + RedisPort string v1.0.0 Nov 23, 2023 Changes in this version + func TestDemo()