Documentation
¶
Index ¶
- Variables
- func UseDatabase(client *mongo.Client, values *common.Values) (db *mongo.Database)
- func UseJetStream(nc *nats.Conn) (nats.JetStreamContext, error)
- func UseMongoDB(values *common.Values) (*mongo.Client, error)
- func UseNats(values *common.Values) (nc *nats.Conn, err error)
- func UseRedis(values *common.Values) (client *redis.Client, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var Provides = wire.NewSet( UseMongoDB, UseDatabase, UseRedis, UseNats, UseJetStream, )
Functions ¶
func UseDatabase ¶
UseDatabase 初始化数据库
func UseJetStream ¶
func UseJetStream(nc *nats.Conn) (nats.JetStreamContext, error)
UseJetStream 初始化流
func UseMongoDB ¶
UseMongoDB 初始化 MongoDB 配置文档 https://www.mongodb.com/docs/drivers/go/current/
func UseNats ¶
UseNats 初始化 Nats 配置文档 https://docs.nats.io/using-nats/developer SDK https://github.com/nats-io/nats.go
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.