使用统一方法pgk进行调用

This commit is contained in:
ayflying
2025-03-04 18:58:10 +08:00
parent 6eeb5a57cd
commit 0e55698a47
24 changed files with 1452 additions and 112 deletions

30
pgk/pgk.go Normal file
View File

@@ -0,0 +1,30 @@
package pgk
import (
v1 "github.com/ayflying/utility_go/api/pgk/v1"
"github.com/ayflying/utility_go/pgk/aycache"
"github.com/ayflying/utility_go/pgk/notice"
"github.com/ayflying/utility_go/pgk/rank"
"github.com/ayflying/utility_go/pgk/s3"
"github.com/gogf/gf/v2/os/gcache"
)
var ()
// 统一调用
func Notice(typ v1.NoticeType, host string) notice.MessageV1 {
return notice.New(typ, host)
}
// 统一调用cache
func Cache(_name ...string) gcache.Adapter {
return aycache.New(_name...)
}
func S3(_name ...string) *s3.Mod {
return s3.New(_name...)
}
func Rank() *rank.Mod {
return rank.New()
}