Documentation ¶
Index ¶
Constants ¶
View Source
const ( ActionInsert = "insert" ActionFind = "find" ActionUpdate = "update" ActionUpsert = "upsert" ActionRemove = "remove" )
Variables ¶
This section is empty.
Functions ¶
func GetMongoDbConnection ¶
NewMongoDbConn, get a new db connection
Types ¶
type AuditModel ¶ added in v0.4.3
type AuditModel struct { TimeStamp time.Time `json:"timestamp" bson:"timestamp"` Collection string `json:"collection" bson:"collection"` Action string `json:"action" bson:"action"` User interface{} `json:"user" bson:"user"` Data interface{} `json:"data" bson:"data"` }
func (*AuditModel) ToJson ¶ added in v0.4.3
func (am *AuditModel) ToJson() string
ToJson, convert model to json string for log
type ChangeInfo ¶
type ChangeInfo struct { Updated int // Number of documents updated Removed int // Number of documents removed Matched int // Number of documents matched but not necessarily changed }
ChangeInfo holds details about the outcome of an update operation.
Click to show internal directories.
Click to hide internal directories.