Documentation ¶
Index ¶
- func Bind(a any, b any)
- func Set(newCore *Core)
- type Core
- func (*Core) Bind(a any, b any)
- func (*Core) ConfigRegister() *config.Config
- func (*Core) GetDb() *gorm.DB
- func (*Core) GetEnv() string
- func (*Core) GetName() string
- func (*Core) GetPort() int
- func (*Core) GetVersion() string
- func (*Core) Init()
- func (*Core) MongoRegister(Uri ...string) *mongo.Client
- func (*Core) SetConfigFile(file string) *config.Config
- func (*Core) SetInfo(info *Info)
- type ICore
- type Info
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Core ¶
type Core struct { Db *gorm.DB Config *config.Config Info *Info Mongo *mongo.Client Etcd *clientv3.Client // contains filtered or unexported fields }
func (*Core) MongoRegister ¶
MongoRegister 注册Mongo
func (*Core) SetConfigFile ¶
ConfigRegister 注册 配置
type ICore ¶
type ICore interface { Init() GetEnv() string GetName() string GetVersion() string GetDb() *gorm.DB GetPort() int ConfigRegister() *config.Config SetConfigFile(file string) *config.Config MongoRegister(Uri ...string) *mongo.Client Bind(a any, b any) }
ICore 服务核心接口
Click to show internal directories.
Click to hide internal directories.