mongowrapper

package module
v0.0.0-...-82ebd26 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2020 License: MIT Imports: 5 Imported by: 0

README

mongowrapper

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDefaultURL

func NewDefaultURL(hostname string, port uint) url.URL

Types

type Driver

type Driver struct {
	URL url.URL
	// contains filtered or unexported fields
}

func NewDriver

func NewDriver(url url.URL, database string) *Driver

func (*Driver) Client

func (driver *Driver) Client() *mongo.Client

func (*Driver) Database

func (driver *Driver) Database() string

func (*Driver) DisconnectGracefully

func (driver *Driver) DisconnectGracefully(ctx context.Context) error

func (*Driver) IsAlive

func (driver *Driver) IsAlive(ctx context.Context) bool

func (*Driver) OpenConnection

func (driver *Driver) OpenConnection(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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