configuration

package
v0.0.0-...-6f463b7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 1, 2021 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

func LoadMongo

func LoadMongo(config *Mongo) (database.Database, error)

func SetMongoConnect

func SetMongoConnect(fn MongoConnectFn)

Types

type Mongo

type Mongo struct {
	Host     string `toml:"host,omitempty" json:"host,omitempty"`
	Port     string `toml:"port,omitempty" json:"port,omitempty"`
	User     string `toml:"user,omitempty" json:"user,omitempty"`
	Password string `toml:"password,omitempty" json:"password,omitempty"`
	Database string `toml:"database,omitempty" json:"database,omitempty"`
}

type MongoConnectFn

type MongoConnectFn func(ctx context.Context, opts ...*options.ClientOptions) (*mongo.Client, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL