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
Click to show internal directories.
Click to hide internal directories.