Documentation
¶
Index ¶
- func LoadStaticValues() (values *common.Values, err error)
- func NewAPI() (*api.API, error)
- func UseDatabase(values *common.Values, client *mongo.Client) (db *mongo.Database)
- func UseHertz(values *common.Values) (h *server.Hertz, err error)
- 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)
- func UseTransfer(values *common.Values, js nats.JetStreamContext) (*transfer.Transfer, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadStaticValues ¶
LoadStaticValues 加载静态配置 默认配置路径 ./config/config.yml
func UseDatabase ¶
UseDatabase 初始化数据库 配置文档 https://www.mongodb.com/docs/drivers/go/current/ https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo
func UseHertz ¶
UseHertz 使用 Hertz 配置文档 https://www.cloudwego.io/zh/docs/hertz/reference/config
func UseJetStream ¶
func UseJetStream(nc *nats.Conn) (nats.JetStreamContext, error)
UseJetStream 初始化流 说明 https://docs.nats.io/using-nats/developer/develop_jetstream
func UseMongoDB ¶
UseMongoDB 初始化 MongoDB 配置文档 https://www.mongodb.com/docs/drivers/go/current/ https://pkg.go.dev/go.mongodb.org/mongo-driver/mongo
func UseNats ¶
UseNats 初始化 Nats 配置文档 https://docs.nats.io/using-nats/developer SDK https://github.com/nats-io/nats.go
func UseRedis ¶
UseRedis 初始化 Redis 配置文档 https://github.com/go-redis/redis
func UseTransfer ¶
UseTransfer 初始日志传输 https://github.com/weplanx/transfer
Types ¶
This section is empty.