package
0.0.0-20210118082621-7f33b96c2c55
Repository: https://github.com/mirisbowring/primboard.git
Documentation: pkg.go.dev
# Functions
CreateMatcherProjectPipeline creates a pipeline with a match and project.
CreatePermissionFilter creates a filter bson that matches the owner and it's groups.
CreatePermissionMatcher creates a matcher that checks for permissions.
CreatePermissionProjectPipeline creates a pipeline with permission for a specific user and model project.
GetColCtx returns the collection for the specified model and initializes a timeout context with passed duration.
ManageField executs a specific bson on a filter e.x.: filter := bson.M{"_id": bson.M{"$eq": objID}} value := bson.M{"$set": bson.M{"fieldint": 42}}
0 -> ok | 1 -> error when updating | 2 -> nothing modified in DB.
# Structs
DBConnection holds information about the collection and the context.