builtins

package
v0.0.0-...-046da75 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DeleteRelationshipsBuiltinDecl = &rego.Function{
	Name: "spicedb.delete_relationships",
	Decl: types.NewFunction(
		types.Args(types.S, types.S, types.A, types.S, types.S),
		types.NewObject(nil, types.NewDynamicProperty(types.S, types.A))),
}
View Source
var ReadRelationshipsBuiltinDecl = &rego.Function{
	Name: "spicedb.read_relationships",
	Decl: types.NewFunction(
		types.Args(types.S, types.S, types.A, types.S, types.S),
		types.NewObject(nil, types.NewDynamicProperty(types.S, types.A))),
}

Functions

func DeleteRelationshipsBuiltinImpl

func DeleteRelationshipsBuiltinImpl(bctx rego.BuiltinContext, terms []*ast.Term) (*ast.Term, error)

LookupResourcesBuiltinImpl checks the given permission requests against spicedb.

func ReadRelationshipsBuiltinImpl

func ReadRelationshipsBuiltinImpl(bctx rego.BuiltinContext, terms []*ast.Term) (*ast.Term, error)

LookupResourcesBuiltinImpl checks the given permission requests against spicedb.

func Register

func Register()

func WriteRelationshipsBuiltinImpl

func WriteRelationshipsBuiltinImpl(bctx rego.BuiltinContext, writesTerm, touchesTerm, deletesTerm *ast.Term) (*ast.Term, error)

WriteRelationshipsBuiltinImpl writes/updates a set of given relationships against spicedb.

Types

type DeleteRelationshipsCacheKeyType

type DeleteRelationshipsCacheKeyType string

Use a custom cache key type to avoid collisions with other builtins caching data!!

type ErrorStruct

type ErrorStruct struct {
	Error string `json:"error"`
	Desc  string `json:"desc"`
}

type ReadRelationshipsCacheKeyType

type ReadRelationshipsCacheKeyType string

Use a custom cache key type to avoid collisions with other builtins caching data!!

type Relationship

type Relationship struct {
	ResourceType string `json:"resourceType"`
	ResourceId   string `json:"resourceId"`
	Relationship string `json:"relationship"`
	SubjectType  string `json:"subjectType"`
	SubjectId    string `json:"subjectId"`
}

type ZedToken

type ZedToken string

Jump to

Keyboard shortcuts

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