Documentation
¶
Index ¶
- Variables
- func EnsureNoRelationshipsExist(ctx context.Context, rwt datastore.ReadWriteTransaction, namespaceName string) error
- func ErrorIfTupleIteratorReturnsTuples(ctx context.Context, qy datastore.RelationshipIterator, qyErr error, ...) error
- func SanityCheckCaveatChanges(ctx context.Context, rwt datastore.ReadWriteTransaction, ...) error
- func SanityCheckNamespaceChanges(ctx context.Context, rwt datastore.ReadWriteTransaction, ...) (*namespace.Diff, error)
- type WithServiceSpecificInterceptors
- type WithStreamServiceSpecificInterceptor
- type WithUnaryServiceSpecificInterceptor
Constants ¶
This section is empty.
Variables ¶
var ErrServiceReadOnly = mustMakeStatusReadonly()
ErrServiceReadOnly is an extended GRPC error returned when a service is in read-only mode.
Functions ¶
func EnsureNoRelationshipsExist ¶
func EnsureNoRelationshipsExist(ctx context.Context, rwt datastore.ReadWriteTransaction, namespaceName string) error
EnsureNoRelationshipsExist ensures that no relationships exist within the namespace with the given name.
func ErrorIfTupleIteratorReturnsTuples ¶ added in v1.3.0
func ErrorIfTupleIteratorReturnsTuples(ctx context.Context, qy datastore.RelationshipIterator, qyErr error, message string, args ...interface{}) error
ErrorIfTupleIteratorReturnsTuples takes a tuple iterator and any error that was generated when the original iterator was created, and returns an error if iterator contains any tuples.
func SanityCheckCaveatChanges ¶ added in v1.14.0
func SanityCheckCaveatChanges( ctx context.Context, rwt datastore.ReadWriteTransaction, caveatDef *core.CaveatDefinition, existingDefs map[string]*core.CaveatDefinition, ) error
SanityCheckCaveatChanges ensures that a caveat definition being written does not break the types of the parameters that may already exist on relationships.
func SanityCheckNamespaceChanges ¶ added in v1.14.0
func SanityCheckNamespaceChanges( ctx context.Context, rwt datastore.ReadWriteTransaction, nsdef *core.NamespaceDefinition, existingDefs map[string]*core.NamespaceDefinition, ) (*namespace.Diff, error)
SanityCheckNamespaceChanges ensures that a namespace definition being written does not result in breaking changes, such as relationships without associated defined schema object definitions and relations.
Types ¶
type WithServiceSpecificInterceptors ¶
type WithServiceSpecificInterceptors struct {
Unary grpc.UnaryServerInterceptor
Stream grpc.StreamServerInterceptor
}
WithServiceSpecificInterceptors is a helper to add both a unary and stream interceptor or interceptor chain to a service.
func (WithServiceSpecificInterceptors) StreamInterceptor ¶
func (wssi WithServiceSpecificInterceptors) StreamInterceptor() grpc.StreamServerInterceptor
StreamInterceptor implements servicespecific.ExtraStreamInterceptor
func (WithServiceSpecificInterceptors) UnaryInterceptor ¶
func (wssi WithServiceSpecificInterceptors) UnaryInterceptor() grpc.UnaryServerInterceptor
UnaryInterceptor implements servicespecific.ExtraUnaryInterceptor
type WithStreamServiceSpecificInterceptor ¶
type WithStreamServiceSpecificInterceptor struct {
Stream grpc.StreamServerInterceptor
}
WithStreamServiceSpecificInterceptor is a helper to add a stream interceptor or interceptor chain to a service.
func (WithStreamServiceSpecificInterceptor) StreamInterceptor ¶
func (wsssi WithStreamServiceSpecificInterceptor) StreamInterceptor() grpc.StreamServerInterceptor
StreamInterceptor implements servicespecific.ExtraStreamInterceptor
type WithUnaryServiceSpecificInterceptor ¶
type WithUnaryServiceSpecificInterceptor struct {
Unary grpc.UnaryServerInterceptor
}
WithUnaryServiceSpecificInterceptor is a helper to add a unary interceptor or interceptor chain to a service.
func (WithUnaryServiceSpecificInterceptor) UnaryInterceptor ¶
func (wussi WithUnaryServiceSpecificInterceptor) UnaryInterceptor() grpc.UnaryServerInterceptor
UnaryInterceptor implements servicespecific.ExtraUnaryInterceptor