v1

package
v1.17.0 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: Apache-2.0 Imports: 46 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertCheckDispatchDebugInformation added in v1.16.2

func ConvertCheckDispatchDebugInformation(
	ctx context.Context,
	caveatContext map[string]any,
	metadata *dispatch.ResponseMeta,
	reader datastore.Reader,
) (*v1.DebugInformation, error)

ConvertCheckDispatchDebugInformation converts dispatch debug information found in the response metadata into DebugInformation returnable to the API.

func NewPermissionsServer

func NewPermissionsServer(
	dispatch dispatch.Dispatcher,
	config PermissionsServerConfig,
) 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(additiveOnly 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 ErrDuplicateRelationshipError added in v1.15.0

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

ErrDuplicateRelationshipError indicates that an update was attempted on the same relationship.

func NewDuplicateRelationshipErr added in v1.15.0

func NewDuplicateRelationshipErr(update *v1.RelationshipUpdate) ErrDuplicateRelationshipError

NewDuplicateRelationshipErr constructs a new invalid subject error.

func (ErrDuplicateRelationshipError) GRPCStatus added in v1.15.0

func (err ErrDuplicateRelationshipError) 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 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

	// StreamingAPITimeout is the timeout for streaming APIs when no response has been
	// recently received.
	StreamingAPITimeout time.Duration
}

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