Documentation ¶ Index ¶ func Module() fx.Option type Config func NewConfig(s *setting.Setting) (*Config, error) type MongoDB func New(config *Config, appProvider *app.App, probesProvider *probes.Probes) *MongoDB func (p *MongoDB) Close() error func (p *MongoDB) Init() error Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func Module ¶ func Module() fx.Option Types ¶ type Config ¶ type Config struct { URI string `yaml:"uri"` Timeout int `yaml:"timeout"` MaxPoolSize int `yaml:"maxPoolSize"` MaxConnIdleTime int `yaml:"maxConnIdleTime"` HeartBeatInterval int `yaml:"heartBeatInterval"` Database string `yaml:"database"` } func NewConfig ¶ func NewConfig(s *setting.Setting) (*Config, error) type MongoDB ¶ type MongoDB struct { module.DefaultProvider Config *Config Client *mongo.Client Database *mongo.Database // contains filtered or unexported fields } func New ¶ func New(config *Config, appProvider *app.App, probesProvider *probes.Probes) *MongoDB func (*MongoDB) Close ¶ func (p *MongoDB) Close() error func (*MongoDB) Init ¶ func (p *MongoDB) Init() error Source Files ¶ View all Source files config.go module.go mongodb.go Directories ¶ Show internal Expand all Path Synopsis infra migrate Click to show internal directories. Click to hide internal directories.