v1

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: Apache-2.0 Imports: 44 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPermissionsServer

func NewPermissionsServer(
	dispatch dispatch.Dispatcher,
	config PermissionsServerConfig,
	caveatsEnabled bool,
) v1.PermissionsServiceServer

NewPermissionsServer creates a PermissionsServiceServer instance.

func NewPreconditionFailedErr added in v1.14.0

func NewPreconditionFailedErr(precondition *v1.Precondition) error

NewPreconditionFailedErr constructs a new precondition failed error.

func NewSchemaServer

func NewSchemaServer(caveatsEnabled bool) v1.SchemaServiceServer

NewSchemaServer creates a SchemaServiceServer instance.

func NewWatchServer added in v1.2.0

func NewWatchServer() v1.WatchServiceServer

NewWatchServer creates an instance of the watch server.

func TranslateExpansionTree added in v1.5.0

func TranslateExpansionTree(node *core.RelationTupleTreeNode) *v1.PermissionRelationshipTree

func TranslateRelationshipTree added in v1.2.0

func TranslateRelationshipTree(tree *v1.PermissionRelationshipTree) *core.RelationTupleTreeNode

TranslateRelationshipTree translates a V1 PermissionRelationshipTree into a RelationTupleTreeNode.

Types

type ErrCaveatNotFound added in v1.14.0

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

ErrCaveatNotFound indicates that a caveat referenced in a relationship update was not found.

func NewCaveatNotFoundError added in v1.14.0

func NewCaveatNotFoundError(update *v1.RelationshipUpdate) ErrCaveatNotFound

NewCaveatNotFoundError constructs a new caveat not found error.

func (ErrCaveatNotFound) GRPCStatus added in v1.14.0

func (err ErrCaveatNotFound) GRPCStatus() *status.Status

GRPCStatus implements retrieving the gRPC status for the error.

type ErrExceedsMaximumPreconditions added in v1.14.0

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

ErrExceedsMaximumPreconditions occurs when too many preconditions are given to a call.

func NewExceedsMaximumPreconditionsErr added in v1.14.0

func NewExceedsMaximumPreconditionsErr(preconditionCount uint16, maxCountAllowed uint16) ErrExceedsMaximumPreconditions

NewExceedsMaximumPreconditionsErr creates a new error representing that too many preconditions were given to a call.

func (ErrExceedsMaximumPreconditions) GRPCStatus added in v1.14.0

func (err ErrExceedsMaximumPreconditions) GRPCStatus() *status.Status

GRPCStatus implements retrieving the gRPC status for the error.

func (ErrExceedsMaximumPreconditions) MarshalZerologObject added in v1.14.0

func (err ErrExceedsMaximumPreconditions) MarshalZerologObject(e *zerolog.Event)

MarshalZerologObject implements zerolog object marshalling.

type ErrExceedsMaximumUpdates added in v1.14.0

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

ErrExceedsMaximumUpdates occurs when too many updates are given to a call.

func NewExceedsMaximumUpdatesErr added in v1.14.0

func NewExceedsMaximumUpdatesErr(updateCount uint16, maxCountAllowed uint16) ErrExceedsMaximumUpdates

NewExceedsMaximumUpdatesErr creates a new error representing that too many updates were given to a WriteRelationships call.

func (ErrExceedsMaximumUpdates) GRPCStatus added in v1.14.0

func (err ErrExceedsMaximumUpdates) GRPCStatus() *status.Status

GRPCStatus implements retrieving the gRPC status for the error.

func (ErrExceedsMaximumUpdates) MarshalZerologObject added in v1.14.0

func (err ErrExceedsMaximumUpdates) MarshalZerologObject(e *zerolog.Event)

MarshalZerologObject implements zerolog object marshalling.

type ErrInvalidSubject added in v1.14.0

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

ErrInvalidSubject indicates that the subject type given to an update is invalid.

func NewInvalidSubjectErr added in v1.14.0

func NewInvalidSubjectErr(update *v1.RelationshipUpdate, relationToCheck *core.AllowedRelation) ErrInvalidSubject

NewInvalidSubjectErr constructs a new invalid subject error.

func (ErrInvalidSubject) GRPCStatus added in v1.14.0

func (err ErrInvalidSubject) GRPCStatus() *status.Status

GRPCStatus implements retrieving the gRPC status for the error.

type ErrPreconditionFailed added in v1.14.0

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

ErrPreconditionFailed occurs when the precondition to a write tuple call does not match.

func (ErrPreconditionFailed) GRPCStatus added in v1.14.0

func (err ErrPreconditionFailed) GRPCStatus() *status.Status

GRPCStatus implements retrieving the gRPC status for the error.

func (ErrPreconditionFailed) MarshalZerologObject added in v1.14.0

func (err ErrPreconditionFailed) MarshalZerologObject(e *zerolog.Event)

MarshalZerologObject implements zerolog object marshalling.

type PermissionsServerConfig added in v1.12.0

type PermissionsServerConfig struct {
	// MaxUpdatesPerWrite holds the maximum number of updates allowed per
	// WriteRelationships call.
	MaxUpdatesPerWrite uint16

	// MaxPreconditionsCount holds the maximum number of preconditions allowed
	// on a WriteRelationships or DeleteRelationships call.
	MaxPreconditionsCount uint16

	// MaximumAPIDepth is the default/starting depth remaining for API calls made
	// to the permissions server.
	MaximumAPIDepth uint32
}

PermissionsServerConfig is configuration for the permissions server.

Jump to

Keyboard shortcuts

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