mongo

package
v1.0.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PluginsRoot = root + ".plugins"
)

Variables

This section is empty.

Functions

func ConfigAdd

func ConfigAdd(path string)

Types

type ClientOptionsPlugin

type ClientOptionsPlugin func(context.Context, *options.ClientOptions) error

type ClientPlugin

type ClientPlugin func(context.Context, *mongo.Client) error

type Conn

type Conn struct {
	ClientOptions *options.ClientOptions
	Client        *mongo.Client
	Database      *mongo.Database
}

func NewConn

func NewConn(ctx context.Context, plugins ...Plugin) (*Conn, error)

func NewConnWithOptions

func NewConnWithOptions(ctx context.Context, o *Options, plugins ...Plugin) (conn *Conn, err error)

type Options

type Options struct {
	Uri  string
	Auth *options.Credential
}

func NewOptions

func NewOptions() (*Options, error)

func NewOptionsWithPath

func NewOptionsWithPath(path string) (opts *Options, err error)

Directories

Path Synopsis
examples
plugins

Jump to

Keyboard shortcuts

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