Documentation
¶
Index ¶
- Variables
- func Drop(collName string) error
- func RestfulAPICount(collName string, filter bson.M) (int64, error)
- func RestfulAPIDeleteMany(collName string, filter bson.M) error
- func RestfulAPIDeleteOne(collName string, filter bson.M) error
- func RestfulAPIGetMany(collName string, filter bson.M) ([]map[string]interface{}, error)
- func RestfulAPIGetOne(collName string, filter bson.M) (map[string]interface{}, error)
- func RestfulAPIJSONPatch(collName string, filter bson.M, patchJSON []byte) error
- func RestfulAPIJSONPatchExtend(collName string, filter bson.M, patchJSON []byte, dataName string) error
- func RestfulAPIMergePatch(collName string, filter bson.M, patchData map[string]interface{}) error
- func RestfulAPIPost(collName string, filter bson.M, postData map[string]interface{}) (bool, error)
- func RestfulAPIPostMany(collName string, filter bson.M, postDataArray []interface{}) error
- func RestfulAPIPullOne(collName string, filter bson.M, putData map[string]interface{}) error
- func RestfulAPIPutMany(collName string, filterArray []bson.M, putDataArray []map[string]interface{}) error
- func RestfulAPIPutOne(collName string, filter bson.M, putData map[string]interface{}) (bool, error)
- func RestfulAPIPutOneNotUpdate(collName string, filter bson.M, putData map[string]interface{}) (bool, error)
- func SetMongoDB(setdbName string, url string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Client *mongo.Client = nil
)
Functions ¶
func RestfulAPICount ¶ added in v1.0.1
func RestfulAPIGetMany ¶
func RestfulAPIGetOne ¶
func RestfulAPIJSONPatch ¶
func RestfulAPIMergePatch ¶
func RestfulAPIPost ¶
func RestfulAPIPostMany ¶
func RestfulAPIPullOne ¶ added in v1.0.2
func RestfulAPIPutMany ¶
func RestfulAPIPutOne ¶
if no error happened, return true means data existed and false means data not existed
func RestfulAPIPutOneNotUpdate ¶
func RestfulAPIPutOneNotUpdate(collName string, filter bson.M, putData map[string]interface{}) (bool, error)
if no error happened, return true means data existed (not updated) and false means data not existed
func SetMongoDB ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.