Documentation ¶
Index ¶
- Variables
- func Command() []*cli.Command
- func ConnCluster(name string) (*redis.ClusterClient, error)
- func ConnSingle(name string) (*redis.Client, error)
- func Gorm(name ...string) *gorm.DB
- func GormCtx(ctx context.Context) *gorm.DB
- func GormInit()
- func GormMigrate(dst ...any)
- func Mongo(name ...string) *mongo.Database
- func MongoInit()
- func Redis(name ...string) *redis.Client
- func RedisCluster(name ...string) *redis.ClusterClient
- func RedisInit()
- func Register()
- func SwitchGorm(name string) error
- func SyncDatabase() error
- type GormService
- type Migrate
- type MongoService
- type RedisClusterService
- type RedisService
Constants ¶
This section is empty.
Variables ¶
View Source
var MigrateModel = make([]any, 0)
Functions ¶
func ConnCluster ¶
func ConnSingle ¶
func GormMigrate ¶
func GormMigrate(dst ...any)
func RedisCluster ¶
func RedisCluster(name ...string) *redis.ClusterClient
func SwitchGorm ¶
func SyncDatabase ¶
func SyncDatabase() error
Types ¶
type GormService ¶
type GormService struct {
// contains filtered or unexported fields
}
func NewGorm ¶
func NewGorm(name string) *GormService
func (*GormService) Shutdown ¶
func (s *GormService) Shutdown() error
type MongoService ¶
type MongoService struct {
// contains filtered or unexported fields
}
func NewMongo ¶
func NewMongo(name string) *MongoService
func (*MongoService) Shutdown ¶
func (s *MongoService) Shutdown() error
type RedisClusterService ¶
type RedisClusterService struct {
// contains filtered or unexported fields
}
func NewRedisCluster ¶
func NewRedisCluster(name string) *RedisClusterService
type RedisService ¶
type RedisService struct {
// contains filtered or unexported fields
}
func NewRedis ¶
func NewRedis(name string) *RedisService
func (*RedisService) Shutdown ¶
func (s *RedisService) Shutdown() error
Click to show internal directories.
Click to hide internal directories.