Documentation ¶
Overview ¶
Deprecated: As of corepkgv2 tag 1.2.15 onwards no longer maintained,simply use coremongo and in future it will be removed.
Index ¶
- func DeleteSession(hostName string) error
- func GetMongoConnection(hostName string) (*mgo.Session, error)
- func Init(tomlFilepath, defaultHostName string) error
- func InitNewSession(hostDetails MongoHost) error
- func InitUsingJSON(configs []MongoHost) error
- type MongoDAO
- func (mg *MongoDAO) BulkDeleteData(data []interface{}) error
- func (mg *MongoDAO) BulkSaveData(data []interface{}) error
- func (mg *MongoDAO) BulkUpdateData(data []interface{}) error
- func (mg *MongoDAO) BulkUpsertData(data []interface{}) error
- func (mg *MongoDAO) CustomUpdate(selector map[string]interface{}, data interface{}) error
- func (mg *MongoDAO) CustomUpdateOne(selector map[string]interface{}, data interface{}) error
- func (mg *MongoDAO) DeleteAll(selector map[string]interface{}) error
- func (mg *MongoDAO) DeleteData(selector map[string]interface{}) error
- func (mg *MongoDAO) GetAggregateData(selector interface{}) (*gjson.Result, error)
- func (mg *MongoDAO) GetData(selector map[string]interface{}) (*gjson.Result, error)
- func (mg *MongoDAO) GetProjectedData(selector map[string]interface{}, projector map[string]interface{}) (*gjson.Result, error)
- func (mg *MongoDAO) PushData(selector map[string]interface{}, data interface{}) error
- func (mg *MongoDAO) SaveData(data interface{}) error
- func (mg *MongoDAO) Update(selector map[string]interface{}, data interface{}) error
- func (mg *MongoDAO) UpdateAll(selector map[string]interface{}, data interface{}) error
- func (mg *MongoDAO) Upsert(selector map[string]interface{}, data interface{}) error
- type MongoHost
- type TomlConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetMongoConnection ¶
GetMongoConnection method
func InitNewSession ¶
InitNewSession - InitNewSession
func InitUsingJSON ¶
InitUsingJSON initializes Mongo Connections for give JSON data
Types ¶
type MongoDAO ¶
type MongoDAO struct {
// contains filtered or unexported fields
}
MongoDAO mongo DAO struct
func GetMongoDAO ¶
GetMongoDAO return mongo DAO instance
func GetMongoDAOWithHost ¶
GetMongoDAOWithHost return mongo DAO instance
func (*MongoDAO) BulkDeleteData ¶
BulkDeleteData delete data in mongo db in bulk
func (*MongoDAO) BulkSaveData ¶
BulkSaveData ata Save data in mongo db in bulk
func (*MongoDAO) BulkUpdateData ¶
BulkUpdateData update data in mongo db in bulk
func (*MongoDAO) BulkUpsertData ¶
BulkUpsertData Upsert data in mongo db in bulk
func (*MongoDAO) CustomUpdate ¶
CustomUpdate - CustomUpdate
func (*MongoDAO) CustomUpdateOne ¶
CustomUpdateOne - CustomUpdateOne
func (*MongoDAO) DeleteData ¶
DeleteData will delete data given for selector
func (*MongoDAO) GetAggregateData ¶
GetAggregateData - return result using aggregation query
func (*MongoDAO) GetProjectedData ¶
func (mg *MongoDAO) GetProjectedData(selector map[string]interface{}, projector map[string]interface{}) (*gjson.Result, error)
GetProjectedData will return query for selector and projector
type MongoHost ¶
type MongoHost struct { HostName string `json:"hostName"` Server string `json:"server"` Port int `json:"port"` Username string `json:"username"` Password string `json:"password"` Database string `json:"database"` IsDefault bool `json:"isDefault"` MaxIdleConns int `json:"maxIdleConns" ` MaxOpenConns int `json:"maxOpenConns"` ConnMaxLifetime time.Duration `json:"connMaxLifetime" ` IsDisabled bool `json:"isDisabled" ` }
MongoHost -MongoHost
type TomlConfig ¶
TomlConfig - TomlConfig