mongo

package
v0.4.17 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 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 `json:"driver"`
	Debug    bool             `json:"debug"`
	Hosts    []string         `json:"hosts"`
	Mode     mgo.Mode         `json:"mode"`
	Database string           `json:"database"`
}

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