mongodb

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetClient

func GetClient() *qmgo.Client

GetClient get mongodb client.

func New

func New(ctx context.Context, opts ...Option) (*qmgo.Client, error)

New init mongodb client.

Types

type Option

type Option func(*Options)

func WithAddress

func WithAddress(address string) Option

WithAddress set mongodb address.

func WithPassword

func WithPassword(password string) Option

WithPassword set mongodb password.

func WithUser

func WithUser(user string) Option

WithUser set mongodb user.

type Options

type Options struct {
	Address  string
	User     string
	Password string
}

Jump to

Keyboard shortcuts

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