connectedobjects

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package connectedobjects contains the code that handles the ConnectedObjects API

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConditionalResultStatus

type ConditionalResultStatus int
const (
	RequiresFurtherEvalStatus ConditionalResultStatus = iota
	NoFurtherEvalStatus
)

type ConnectedObjectsQuery

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

func (*ConnectedObjectsQuery) Execute

func (c *ConnectedObjectsQuery) Execute(
	ctx context.Context,
	req *ConnectedObjectsRequest,
	resultChan chan<- *ConnectedObjectsResult,
) error

Execute yields all the objects of the provided objectType that the given user has a specific relation with. The results will be limited by the request maxResults. If a 0 maxResults is provided then all objects of the provided objectType will be returned.

type ConnectedObjectsQueryOption

type ConnectedObjectsQueryOption func(d *ConnectedObjectsQuery)

func WithMaxResults

func WithMaxResults(maxResults uint32) ConnectedObjectsQueryOption

func WithResolveNodeBreadthLimit

func WithResolveNodeBreadthLimit(limit uint32) ConnectedObjectsQueryOption

func WithResolveNodeLimit

func WithResolveNodeLimit(limit uint32) ConnectedObjectsQueryOption

type ConnectedObjectsRequest

type ConnectedObjectsRequest struct {
	StoreID          string
	ObjectType       string
	Relation         string
	User             IsUserRef
	ContextualTuples []*openfgav1.TupleKey
}

type ConnectedObjectsResult

type ConnectedObjectsResult struct {
	Object       string
	ResultStatus ConditionalResultStatus
}

type IsUserRef

type IsUserRef interface {
	GetObjectType() string
	String() string
	// contains filtered or unexported methods
}

type UserRef

type UserRef struct {

	// Types that are assignable to Ref
	//  *UserRef_Object
	//  *UserRef_TypedWildcard
	//  *UserRef_ObjectRelation
	Ref IsUserRef
}

type UserRefObject

type UserRefObject struct {
	Object *openfgav1.Object
}

func (*UserRefObject) GetObjectType

func (u *UserRefObject) GetObjectType() string

func (*UserRefObject) String

func (u *UserRefObject) String() string

type UserRefObjectRelation

type UserRefObjectRelation struct {
	ObjectRelation *openfgav1.ObjectRelation
}

func (*UserRefObjectRelation) GetObjectType

func (u *UserRefObjectRelation) GetObjectType() string

func (*UserRefObjectRelation) String

func (u *UserRefObjectRelation) String() string

type UserRefTypedWildcard

type UserRefTypedWildcard struct {
	Type string
}

func (*UserRefTypedWildcard) GetObjectType

func (u *UserRefTypedWildcard) GetObjectType() string

func (*UserRefTypedWildcard) String

func (u *UserRefTypedWildcard) String() string

Jump to

Keyboard shortcuts

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