Documentation
¶
Index ¶
- Variables
- func GetObjIDFromString(id string) interface{}
- type MongoConf
- type MongoDB
- func (m *MongoDB) DeleteMultiple(f map[string]interface{}, collection_name string) (int64, int, error)
- func (m *MongoDB) DeleteOne(id string, collection_name string) (int64, int, error)
- func (m *MongoDB) Init(collections []string, config MongoConf)
- func (m *MongoDB) LoadAll(collection_name string) (*mongo.Cursor, int, error)
- func (m *MongoDB) LoadFilter(filter map[string]interface{}, collection_name string) (*mongo.Cursor, int, error)
- func (m *MongoDB) LoadOne(id string, collection_name string) (*mongo.SingleResult, int, error)
- func (m *MongoDB) Search(filters *dbs.Filters, collection_name string) (*mongo.Cursor, int, error)
- func (m *MongoDB) StoreOne(obj interface{}, id string, collection_name string) (string, int, error)
- func (m *MongoDB) TestCollections(config MongoConf, neededCols []string) error
- func (m *MongoDB) TestDB(config MongoConf) error
- func (m *MongoDB) UpdateMultiple(set interface{}, filter map[string]interface{}, collection_name string) (int64, int, error)
- func (m *MongoDB) UpdateOne(set interface{}, id string, collection_name string) (string, int, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( MngoCtx context.Context ResourceMap map[string]interface{} )
View Source
var CollectionMap map[string]*mongo.Collection
Will store the created collection object for a faster access
View Source
var IndexesMap map[string][]mongo.IndexModel
View Source
var MONGOService = MongoDB{}
Functions ¶
func GetObjIDFromString ¶
func GetObjIDFromString(id string) interface{}
Types ¶
type MongoDB ¶
func (*MongoDB) DeleteMultiple ¶
func (*MongoDB) LoadFilter ¶
func (*MongoDB) TestCollections ¶
func (*MongoDB) UpdateMultiple ¶
Click to show internal directories.
Click to hide internal directories.