contextualtuples

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContextualTuples

type ContextualTuples struct {
	// contains filtered or unexported fields
}

func New

func New(typesys *typesystem.TypeSystem, tupleKeys []*openfgapb.TupleKey) (*ContextualTuples, error)

New validates the input tuples against the typesystem and, if valid, returns those tuples as ContextualTuples

func (*ContextualTuples) Read

Read returns the list of contextual tuples that match 'object#relation'

func (*ContextualTuples) ReadUserTuple

func (c *ContextualTuples) ReadUserTuple(tk *openfgapb.TupleKey) (*openfgapb.TupleKey, bool)

ReadUserTuple returns, if found, a contextual tuple that matches the input 'object#relation@user' and a bool indicating whether such tuple was found.

func (*ContextualTuples) ReadUsersetTuples

func (c *ContextualTuples) ReadUsersetTuples(tk *openfgapb.TupleKey) []*openfgapb.TupleKey

ReadUsersetTuples returns the list of tuples that match the input 'object#relation' and whose user is a userset

Jump to

Keyboard shortcuts

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