Documentation
¶
Index ¶
- func NewBSON(data interface{}, mode string) (interface{}, *Hermes.Log)
- type Connection
- func (c *Connection) CheckConnection() bool
- func (c *Connection) Create(data interface{})
- func (c *Connection) CreateMany(data []interface{})
- func (c *Connection) Delete(filter bson.D)
- func (c *Connection) DeleteCollection()
- func (c *Connection) DeleteDatabase()
- func (c *Connection) DeleteMany(filter bson.D)
- func (c *Connection) Disconnect()
- func (c *Connection) Find(data, filter interface{})
- func (c *Connection) FindMany(data, filter interface{}) (results []interface{})
- func (c *Connection) RetrieveCollections(filter bson.M) []string
- func (c *Connection) RetrieveDatabases(filter bson.M) []string
- func (c *Connection) SetConnectionCollection(collection string, filter bson.M)
- func (c *Connection) SetConnectionDatabase(database string, filter bson.M)
- func (c *Connection) SetConnectionFilter(keys []string, values ...interface{})
- func (c *Connection) SetConnectionOptions(comment string, limit, skip int64, maxTime time.Duration, returnKey bool)
- func (c *Connection) SetConnectionSort(field string, ascending bool)
- func (c *Connection) Update(data interface{}, filter, update bson.D)
- func (c *Connection) UpdateMany(data []interface{}, filter, update bson.D)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Connection ¶
type Connection struct { AccessLevel int64 Client *mongo.Client Context context.Context Cancel context.CancelFunc Log *Hermes.LogBook Database *mongo.Database Collection *mongo.Collection Selection bson.D Sort bson.M Options *options.FindOptions Information map[string]string }
func NewConnection ¶
func NewConnection(service, username, password, cluster, url, customURL string, logbook *Hermes.LogBook) *Connection
func (*Connection) CheckConnection ¶
func (c *Connection) CheckConnection() bool
func (*Connection) Create ¶
func (c *Connection) Create(data interface{})
func (*Connection) CreateMany ¶
func (c *Connection) CreateMany(data []interface{})
func (*Connection) Delete ¶
func (c *Connection) Delete(filter bson.D)
func (*Connection) DeleteCollection ¶
func (c *Connection) DeleteCollection()
func (*Connection) DeleteDatabase ¶
func (c *Connection) DeleteDatabase()
func (*Connection) DeleteMany ¶
func (c *Connection) DeleteMany(filter bson.D)
func (*Connection) Disconnect ¶
func (c *Connection) Disconnect()
func (*Connection) Find ¶
func (c *Connection) Find(data, filter interface{})
func (*Connection) FindMany ¶
func (c *Connection) FindMany(data, filter interface{}) (results []interface{})
func (*Connection) RetrieveCollections ¶
func (c *Connection) RetrieveCollections(filter bson.M) []string
func (*Connection) RetrieveDatabases ¶
func (c *Connection) RetrieveDatabases(filter bson.M) []string
func (*Connection) SetConnectionCollection ¶
func (c *Connection) SetConnectionCollection(collection string, filter bson.M)
func (*Connection) SetConnectionDatabase ¶
func (c *Connection) SetConnectionDatabase(database string, filter bson.M)
func (*Connection) SetConnectionFilter ¶
func (c *Connection) SetConnectionFilter(keys []string, values ...interface{})
func (*Connection) SetConnectionOptions ¶
func (*Connection) SetConnectionSort ¶
func (c *Connection) SetConnectionSort(field string, ascending bool)
func (*Connection) Update ¶
func (c *Connection) Update(data interface{}, filter, update bson.D)
func (*Connection) UpdateMany ¶
func (c *Connection) UpdateMany(data []interface{}, filter, update bson.D)
Click to show internal directories.
Click to hide internal directories.