Documentation ¶
Index ¶
- func NewPermissionsServer(dispatch dispatch.Dispatcher, config PermissionsServerConfig, ...) v1.PermissionsServiceServer
- func NewPreconditionFailedErr(precondition *v1.Precondition) error
- func NewSchemaServer(additiveOnly, caveatsEnabled bool) v1.SchemaServiceServer
- func NewWatchServer() v1.WatchServiceServer
- func TranslateExpansionTree(node *core.RelationTupleTreeNode) *v1.PermissionRelationshipTree
- func TranslateRelationshipTree(tree *v1.PermissionRelationshipTree) *core.RelationTupleTreeNode
- type ErrDuplicateRelationshipError
- type ErrExceedsMaximumPreconditions
- type ErrExceedsMaximumUpdates
- type ErrPreconditionFailed
- type PermissionsServerConfig
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(additiveOnly, 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 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 }
PermissionsServerConfig is configuration for the permissions server.