Documentation ¶
Overview ¶
Package database provides database client initialization.
Index ¶
- Variables
- func CloseDB() error
- func CloseRedis() error
- func GetDB() *sgorm.DB
- func GetRedisCli() *goredis.Client
- func GetSnowId() snowflake.ID
- func GetSnowNode() *snowflake.Node
- func InitCache(cType string)
- func InitDB()
- func InitMysql() *sgorm.DB
- func InitPostgresql() *sgorm.DB
- func InitRedis()
- func InitSnowNode()
- func InitSqlite() *sgorm.DB
- type CacheType
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrCacheNotFound No hit cache ErrCacheNotFound = goredis.ErrRedisNotFound )
View Source
var (
ErrRecordNotFound = sgorm.ErrRecordNotFound
)
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.