Documentation ¶
Index ¶
- func Exclusion(start *v0.ObjectAndRelation, children ...*v0.RelationTupleTreeNode) *v0.RelationTupleTreeNode
- func HasThis(rewrite *v0.UsersetRewrite) bool
- func Intersection(start *v0.ObjectAndRelation, children ...*v0.RelationTupleTreeNode) *v0.RelationTupleTreeNode
- func Leaf(start *v0.ObjectAndRelation, children ...*v0.User) *v0.RelationTupleTreeNode
- func Simplify(node *v0.RelationTupleTreeNode) []*v0.User
- func SimplifyExclusion(children []*v0.RelationTupleTreeNode) []*v0.User
- func SimplifyIntersection(children []*v0.RelationTupleTreeNode) []*v0.User
- func SimplifyUnion(children []*v0.RelationTupleTreeNode) []*v0.User
- func Union(start *v0.ObjectAndRelation, children ...*v0.RelationTupleTreeNode) *v0.RelationTupleTreeNode
- func WalkRewrite(rewrite *v0.UsersetRewrite, handler WalkHandler) interface{}
- type UserSet
- type WalkHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Exclusion ¶
func Exclusion(start *v0.ObjectAndRelation, children ...*v0.RelationTupleTreeNode) *v0.RelationTupleTreeNode
func HasThis ¶
func HasThis(rewrite *v0.UsersetRewrite) bool
HasThis returns true if there exists a `_this` node anywhere within the given rewrite. If the rewrite is nil, returns false.
func Intersection ¶
func Intersection(start *v0.ObjectAndRelation, children ...*v0.RelationTupleTreeNode) *v0.RelationTupleTreeNode
func Leaf ¶
func Leaf(start *v0.ObjectAndRelation, children ...*v0.User) *v0.RelationTupleTreeNode
func SimplifyExclusion ¶
func SimplifyExclusion(children []*v0.RelationTupleTreeNode) []*v0.User
func SimplifyIntersection ¶
func SimplifyIntersection(children []*v0.RelationTupleTreeNode) []*v0.User
func SimplifyUnion ¶
func SimplifyUnion(children []*v0.RelationTupleTreeNode) []*v0.User
func Union ¶
func Union(start *v0.ObjectAndRelation, children ...*v0.RelationTupleTreeNode) *v0.RelationTupleTreeNode
func WalkRewrite ¶
func WalkRewrite(rewrite *v0.UsersetRewrite, handler WalkHandler) interface{}
WalkRewrite walks a userset rewrite tree, invoking the handler found on each node of the tree until the handler returns a non-nil value, which is in turn returned from this function. Returns nil if no valid value was found. If the rewrite is nil, returns nil.
Types ¶
type WalkHandler ¶
type WalkHandler func(childOneof *v0.SetOperation_Child) interface{}
WalkHandler is a function invoked for each node in the rewrite tree. If it returns non-nil, that value is returned from the walk. Otherwise, the walk continues.
Click to show internal directories.
Click to hide internal directories.