Documentation
¶
Index ¶
- func ComputeCheck(ctx context.Context, d dispatch.Dispatcher, params CheckParameters) (*v1.ResourceCheckResult, *v1.ResponseMeta, error)
- func NewDispatcher(redispatcher dispatch.Dispatcher, concurrencyLimit uint16) dispatch.Dispatcher
- func NewLocalOnlyDispatcher(concurrencyLimit uint16) dispatch.Dispatcher
- func NewNamespaceNotFoundErr(nsName string) error
- func NewRelationNotFoundErr(nsName string, relationName string) error
- type CheckParameters
- type ErrNamespaceNotFound
- type ErrRelationNotFound
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeCheck ¶ added in v1.13.0
func ComputeCheck( ctx context.Context, d dispatch.Dispatcher, params CheckParameters, ) (*v1.ResourceCheckResult, *v1.ResponseMeta, error)
ComputeCheck computes a check result for the given resource and subject, computing any caveat expressions found.
func NewDispatcher ¶
func NewDispatcher(redispatcher dispatch.Dispatcher, concurrencyLimit uint16) dispatch.Dispatcher
NewDispatcher creates a dispatcher that consults with the graph and redispatches subproblems to the provided redispatcher.
func NewLocalOnlyDispatcher ¶
func NewLocalOnlyDispatcher(concurrencyLimit uint16) dispatch.Dispatcher
NewLocalOnlyDispatcher creates a dispatcher that consults with the graph to formulate a response.
func NewNamespaceNotFoundErr ¶
NewNamespaceNotFoundErr constructs a new namespace not found error.
func NewRelationNotFoundErr ¶
NewRelationNotFoundErr constructs a new relation not found error.
Types ¶
type CheckParameters ¶ added in v1.13.0
type CheckParameters struct { ResourceType *core.RelationReference ResourceID string Subject *core.ObjectAndRelation CaveatContext map[string]any AtRevision datastore.Revision MaximumDepth uint32 IsDebuggingEnabled bool }
CheckParameters are the parameters for the ComputeCheck call. *All* are required.
type ErrNamespaceNotFound ¶
type ErrNamespaceNotFound struct {
// contains filtered or unexported fields
}
ErrNamespaceNotFound occurs when a namespace was not found.
func (ErrNamespaceNotFound) DetailsMetadata ¶ added in v1.14.0
func (err ErrNamespaceNotFound) DetailsMetadata() map[string]string
DetailsMetadata returns the metadata for details for this error.
func (ErrNamespaceNotFound) MarshalZerologObject ¶
func (err ErrNamespaceNotFound) MarshalZerologObject(e *zerolog.Event)
MarshalZerologObject implements zerolog.LogObjectMarshaler
func (ErrNamespaceNotFound) NotFoundNamespaceName ¶
func (err ErrNamespaceNotFound) NotFoundNamespaceName() string
NotFoundNamespaceName returns the name of the namespace that was not found.
type ErrRelationNotFound ¶
type ErrRelationNotFound struct {
// contains filtered or unexported fields
}
ErrRelationNotFound occurs when a relation was not found under a namespace.
func (ErrRelationNotFound) DetailsMetadata ¶ added in v1.14.0
func (err ErrRelationNotFound) DetailsMetadata() map[string]string
DetailsMetadata returns the metadata for details for this error.
func (ErrRelationNotFound) MarshalZerologObject ¶
func (err ErrRelationNotFound) MarshalZerologObject(e *zerolog.Event)
MarshalZerologObject implements zerolog.LogObjectMarshaler
func (ErrRelationNotFound) NamespaceName ¶
func (err ErrRelationNotFound) NamespaceName() string
NamespaceName returns the name of the namespace in which the relation was not found.
func (ErrRelationNotFound) NotFoundRelationName ¶
func (err ErrRelationNotFound) NotFoundRelationName() string
NotFoundRelationName returns the name of the relation not found.