Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildBaseResp ¶
func BuildRespAndLog ¶
func BuildSuccessResp ¶
func BuildTypeList ¶
func HandleJwchError ¶
HandleJwchError 对于jwch库返回的错误类型,需要使用 HandleJwchError 来保留 cookie 异常
Types ¶
type ClientSet ¶
type ClientSet struct { CacheClient *cache.Cache // Redis ESClient *elastic.Client // ElasticSearch DBClient *db.Database // Database SFClient *utils.Snowflake // Snowflake(DB initialize together) HzClient *client.Client // Hertz client // contains filtered or unexported fields }
ClientSet storage various client objects Notice: some or all of them maybe nil, we should check obj when use
func NewClientSet ¶
NewClientSet will be protected by sync.Once for ensure only 1 instance could be created in 1 lifecycle
type Option ¶
type Option func(clientSet *ClientSet)
func WithDBClient ¶
WithDBClient will create database object
func WithElasticSearch ¶
func WithElasticSearch() Option
func WithHzClient ¶
func WithHzClient() Option
func WithRedisClient ¶
WithRedisClient will create redis object
Click to show internal directories.
Click to hide internal directories.