Documentation ¶
Index ¶
Constants ¶
View Source
const (
PluginsRoot = root + ".plugins"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientOptionsPlugin ¶
type ClientOptionsPlugin func(context.Context, *options.ClientOptions) error
ClientOptionsPlugin defines a mongo client options plugin signature.
type ClientPlugin ¶
ClientPlugin defines a mongo client plugin signature.
type Conn ¶
type Conn struct { ClientOptions *options.ClientOptions Client *mongo.Client Database *mongo.Database Options *Options Plugins []Plugin }
Conn represents a mongo connection.
func NewConnWithConfigPath ¶
NewConnWithConfigPath returns a new connection with options from config path.
type Options ¶
type Options struct { Uri string Auth *options.Credential }
Options represents mongo client options.
func NewOptions ¶
NewOptions returns options from config file or environment vars.
func NewOptionsWithPath ¶
NewOptionsWithPath unmarshals options based a given key path.
type Plugin ¶
type Plugin func(context.Context) (ClientOptionsPlugin, ClientPlugin)
Plugin defines a function to process plugin.
Click to show internal directories.
Click to hide internal directories.