mongodb

package
v0.0.41 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client

func Client() *mongo.Client

func Valid

func Valid() bool

Valid returns a bool valud to determine whether the connection is ready to use

Types

type MongoDB

type MongoDB struct {
	// contains filtered or unexported fields
}

func New

func New() *MongoDB

func (*MongoDB) Connect

func (m *MongoDB) Connect() error

func (*MongoDB) Destory

func (m *MongoDB) Destory()

func (*MongoDB) Load

func (m *MongoDB) Load(src []byte) error

func (MongoDB) Name

func (m MongoDB) Name() string

type Option

type Option struct {
	Address  string `json:"address"`
	Username string `json:"username"`
	Password string `json:"password"`
}

func (Option) URI

func (o Option) URI() string

Jump to

Keyboard shortcuts

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