Documentation
¶
Index ¶
- func DeleteAll(collectionName string, c *gin.Context) (er error)
- func DeleteOne(collectionName string, c *gin.Context) (er error)
- func FetchById(collectionName string, c *gin.Context, ...) (uu interface{}, er error)
- func FetchOne(collectionName string, c *gin.Context, ...) (uu interface{}, er error)
- func InsertAll(collectionName string, dbHandler func(*mgo.Collection) (interface{}, error)) (uu interface{}, er error)
- func InsertOne(collectionName string, dbHandler func(*mgo.Collection) (interface{}, error)) (uu interface{}, er error)
- func ReplaceAll(collectionName string, dbHandler func(*mgo.Collection) (interface{}, error)) (uu interface{}, er error)
- func ReplaceOne(collectionName string, dbHandler func(*mgo.Collection) (interface{}, error)) (uu interface{}, er error)
- func Update(collectionName string, c *gin.Context, updatedValues map[string]interface{}, ...) (uu interface{}, er error)
- func UpdateOneById(collectionName string, c *gin.Context, updatedValues map[string]interface{}) (uu interface{}, er error)
- type ApiModel
- type ApiModels
- type Result
- type Results
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InsertAll ¶
func InsertAll(collectionName string, dbHandler func(*mgo.Collection) (interface{}, error)) (uu interface{}, er error)
func InsertOne ¶
func InsertOne(collectionName string, dbHandler func(*mgo.Collection) (interface{}, error)) (uu interface{}, er error)
func ReplaceAll ¶
func ReplaceAll(collectionName string, dbHandler func(*mgo.Collection) (interface{}, error)) (uu interface{}, er error)
func ReplaceOne ¶
func ReplaceOne(collectionName string, dbHandler func(*mgo.Collection) (interface{}, error)) (uu interface{}, er error)
Types ¶
type ApiModel ¶
type ApiModel interface {
DbFetchOne(*mgo.Query) (interface{}, error)
DbInsertOne(*mgo.Collection) (interface{}, error)
DbUpdateOne(*mgo.Collection, bson.M, bson.M) (interface{}, error)
DbReplaceOne(*mgo.Collection) (interface{}, error)
DbDeleteOne(*mgo.Collection) (interface{}, error)
}
type ApiModels ¶
type ApiModels interface {
DbFetchAll(*mgo.Query) (interface{}, error)
DbInsertAll(*mgo.Collection) (interface{}, error)
DbUpdateAll(*mgo.Collection, bson.M, bson.M) (interface{}, error)
DbReplaceAll(*mgo.Collection) (interface{}, error)
DbDeleteAll(*mgo.Collection) (interface{}, error)
}
Click to show internal directories.
Click to hide internal directories.