mongoconn

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2021 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connector

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

Connector - MongoDB 连接 适配器

func NewConn

func NewConn(url string, timeout time.Duration) (*Connector, error)

NewConn - 连接 适配器 工厂

func (*Connector) Close

func (c *Connector) Close() error

Close - Disconnect

func (*Connector) GetColl

func (c *Connector) GetColl(collname string) *mongo.Collection

GetColl - Get spec collection

func (*Connector) Ping

func (c *Connector) Ping() error

Ping - 建立与数据库的连接

Jump to

Keyboard shortcuts

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