mongo

package
v0.4.13 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Driver drivers.DBDriver = "mongo"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	Driver   drivers.DBDriver
	Debug    bool
	Hosts    []string
	Mode     mgo.Mode
	Database string
}

func (*Connection) GetDriver

func (i *Connection) GetDriver() drivers.DBDriver

func (*Connection) IsDebug

func (i *Connection) IsDebug() bool

func (*Connection) NewConnector

func (i *Connection) NewConnector(name string) (drivers.ConnectorInterface, error)

type MongoConnector

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

func NewMongoConnector

func NewMongoConnector(connection string, config *Connection) (*MongoConnector, error)

func (*MongoConnector) Connect

func (i *MongoConnector) Connect() error

func (*MongoConnector) GetConnection

func (i *MongoConnector) GetConnection() string

func (*MongoConnector) GetDB

func (i *MongoConnector) GetDB() any

func (*MongoConnector) GetDriver

func (i *MongoConnector) GetDriver() drivers.DriverInterface

Jump to

Keyboard shortcuts

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