mongodb

package
v0.0.0-...-352fc9d Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Host string
}

type DB

type DB struct {
	Logger *otelzap.Logger

	Timeout time.Duration
	// contains filtered or unexported fields
}

func New

func New(config Config, database string, logger *otelzap.Logger, dbOpts ...Option) *DB

func (DB) Close

func (d DB) Close()

func (DB) Collection

func (d DB) Collection(collection string) *mongo.Collection

type Option

type Option func(*DB)

func WithTimeout

func WithTimeout(t time.Duration) Option

Jump to

Keyboard shortcuts

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