mongodb

package
v0.0.0-...-25e0b32 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangeStream

type ChangeStream interface {
	Next(ctx context.Context) bool
	Decode(val interface{}) error
}

ChangeStream matches the interface exposed by mongo.ChangeStream.

type Client

type Client interface {
	Connect(ctx context.Context) error
	Disconnect(ctx context.Context) error
	ListDatabaseNames(ctx context.Context, filter interface{}, opts ...*options.ListDatabasesOptions) ([]string, error)
	Database(name string, opts ...*options.DatabaseOptions) Database
}

Client matches the interface exposed by mongo.Client.

func NewClient

func NewClient(opts ...*options.ClientOptions) (Client, error)

NewClient creates a new wrapped Mongo client.

type CreateFn

type CreateFn func(opts ...*options.ClientOptions) (Client, error)

CreateFn is a factory function to create a Mongo client.

type Database

type Database interface {
	ListCollectionNames(ctx context.Context, filter interface{}, opts ...*options.ListCollectionsOptions) ([]string, error)
}

Database matches the interface exposed by mongo.Database.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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