nsbuilder

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 10, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package nsbuilder implements a builder-pattern for defining Authzed Namespaces.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComputedUserset

func ComputedUserset(relation string) *v0.SetOperation_Child

ComputedUserset creates a child for a set operation that follows a relation on the given starting object.

func Exclusion

func Exclusion(firstChild *v0.SetOperation_Child, rest ...*v0.SetOperation_Child) *v0.UsersetRewrite

Exclusion creates a rewrite definition that starts with the usersets of the first child and iteratively removes usersets that appear in the remaining children.

func Intersection

func Intersection(firstChild *v0.SetOperation_Child, rest ...*v0.SetOperation_Child) *v0.UsersetRewrite

Intersection creates a rewrite definition that returns/considers only usersets present in all children.

func Namespace

func Namespace(name string, relations ...*v0.Relation) *v0.NamespaceDefinition

Namespace creates a namespace definition with one or more defined relations.

func Relation

func Relation(name string, rewrite *v0.UsersetRewrite) *v0.Relation

Relation creates a relation definition with an optional rewrite definition.

func This

func This() *v0.SetOperation_Child

This creates a child for a set operation that references only direct usersets with the parent relation.

func TupleToUserset

func TupleToUserset(tuplesetRelation, usersetRelation string) *v0.SetOperation_Child

TupleToUserset creates a child which first loads all tuples with the specific relation, and then unions all children on the usersets found by following a relation on those loaded tuples.

func Union

func Union(firstChild *v0.SetOperation_Child, rest ...*v0.SetOperation_Child) *v0.UsersetRewrite

Union creates a rewrite definition that combines/considers usersets in all children.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL