Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterExperimentalServiceServer(s grpc.ServiceRegistrar, srv ExperimentalServiceServer)
- func RegisterPermissionsServiceServer(s grpc.ServiceRegistrar, srv PermissionsServiceServer)
- func RegisterSchemaServiceServer(s grpc.ServiceRegistrar, srv SchemaServiceServer)
- func RegisterWatchServiceServer(s grpc.ServiceRegistrar, srv WatchServiceServer)
- type ExperimentalServiceClient
- type ExperimentalServiceServer
- type ExperimentalService_BulkExportRelationshipsClient
- type ExperimentalService_BulkExportRelationshipsServer
- type ExperimentalService_BulkImportRelationshipsClient
- type ExperimentalService_BulkImportRelationshipsServer
- type PermissionsServiceClient
- type PermissionsServiceServer
- type PermissionsService_ExportBulkRelationshipsClient
- type PermissionsService_ExportBulkRelationshipsServer
- type PermissionsService_ImportBulkRelationshipsClient
- type PermissionsService_ImportBulkRelationshipsServer
- type PermissionsService_LookupResourcesClient
- type PermissionsService_LookupResourcesServer
- type PermissionsService_LookupSubjectsClient
- type PermissionsService_LookupSubjectsServer
- type PermissionsService_ReadRelationshipsClient
- type PermissionsService_ReadRelationshipsServer
- type SchemaServiceClient
- type SchemaServiceServer
- type UnimplementedExperimentalServiceServer
- func (UnimplementedExperimentalServiceServer) BulkCheckPermission(context.Context, *v1.BulkCheckPermissionRequest) (*v1.BulkCheckPermissionResponse, error)
- func (UnimplementedExperimentalServiceServer) BulkExportRelationships(*v1.BulkExportRelationshipsRequest, ...) error
- func (UnimplementedExperimentalServiceServer) BulkImportRelationships(...) error
- func (UnimplementedExperimentalServiceServer) ExperimentalComputablePermissions(context.Context, *v1.ExperimentalComputablePermissionsRequest) (*v1.ExperimentalComputablePermissionsResponse, error)
- func (UnimplementedExperimentalServiceServer) ExperimentalCountRelationships(context.Context, *v1.ExperimentalCountRelationshipsRequest) (*v1.ExperimentalCountRelationshipsResponse, error)
- func (UnimplementedExperimentalServiceServer) ExperimentalDependentRelations(context.Context, *v1.ExperimentalDependentRelationsRequest) (*v1.ExperimentalDependentRelationsResponse, error)
- func (UnimplementedExperimentalServiceServer) ExperimentalDiffSchema(context.Context, *v1.ExperimentalDiffSchemaRequest) (*v1.ExperimentalDiffSchemaResponse, error)
- func (UnimplementedExperimentalServiceServer) ExperimentalReflectSchema(context.Context, *v1.ExperimentalReflectSchemaRequest) (*v1.ExperimentalReflectSchemaResponse, error)
- func (UnimplementedExperimentalServiceServer) ExperimentalRegisterRelationshipCounter(context.Context, *v1.ExperimentalRegisterRelationshipCounterRequest) (*v1.ExperimentalRegisterRelationshipCounterResponse, error)
- func (UnimplementedExperimentalServiceServer) ExperimentalUnregisterRelationshipCounter(context.Context, *v1.ExperimentalUnregisterRelationshipCounterRequest) (*v1.ExperimentalUnregisterRelationshipCounterResponse, error)
- type UnimplementedPermissionsServiceServer
- func (UnimplementedPermissionsServiceServer) CheckBulkPermissions(context.Context, *v1.CheckBulkPermissionsRequest) (*v1.CheckBulkPermissionsResponse, error)
- func (UnimplementedPermissionsServiceServer) CheckPermission(context.Context, *v1.CheckPermissionRequest) (*v1.CheckPermissionResponse, error)
- func (UnimplementedPermissionsServiceServer) DeleteRelationships(context.Context, *v1.DeleteRelationshipsRequest) (*v1.DeleteRelationshipsResponse, error)
- func (UnimplementedPermissionsServiceServer) ExpandPermissionTree(context.Context, *v1.ExpandPermissionTreeRequest) (*v1.ExpandPermissionTreeResponse, error)
- func (UnimplementedPermissionsServiceServer) ExportBulkRelationships(*v1.ExportBulkRelationshipsRequest, ...) error
- func (UnimplementedPermissionsServiceServer) ImportBulkRelationships(...) error
- func (UnimplementedPermissionsServiceServer) LookupResources(*v1.LookupResourcesRequest, ...) error
- func (UnimplementedPermissionsServiceServer) LookupSubjects(*v1.LookupSubjectsRequest, ...) error
- func (UnimplementedPermissionsServiceServer) ReadRelationships(*v1.ReadRelationshipsRequest, ...) error
- func (UnimplementedPermissionsServiceServer) WriteRelationships(context.Context, *v1.WriteRelationshipsRequest) (*v1.WriteRelationshipsResponse, error)
- type UnimplementedSchemaServiceServer
- func (UnimplementedSchemaServiceServer) ComputablePermissions(context.Context, *v1.ComputablePermissionsRequest) (*v1.ComputablePermissionsResponse, error)
- func (UnimplementedSchemaServiceServer) DependentRelations(context.Context, *v1.DependentRelationsRequest) (*v1.DependentRelationsResponse, error)
- func (UnimplementedSchemaServiceServer) DiffSchema(context.Context, *v1.DiffSchemaRequest) (*v1.DiffSchemaResponse, error)
- func (UnimplementedSchemaServiceServer) ReadSchema(context.Context, *v1.ReadSchemaRequest) (*v1.ReadSchemaResponse, error)
- func (UnimplementedSchemaServiceServer) ReflectSchema(context.Context, *v1.ReflectSchemaRequest) (*v1.ReflectSchemaResponse, error)
- func (UnimplementedSchemaServiceServer) WriteSchema(context.Context, *v1.WriteSchemaRequest) (*v1.WriteSchemaResponse, error)
- type UnimplementedWatchServiceServer
- type UnsafeExperimentalServiceServer
- type UnsafePermissionsServiceServer
- type UnsafeSchemaServiceServer
- type UnsafeWatchServiceServer
- type WatchServiceClient
- type WatchServiceServer
- type WatchService_WatchClient
- type WatchService_WatchServer
Constants ¶
const ( ExperimentalService_BulkImportRelationships_FullMethodName = "/authzed.api.v1.ExperimentalService/BulkImportRelationships" ExperimentalService_BulkExportRelationships_FullMethodName = "/authzed.api.v1.ExperimentalService/BulkExportRelationships" ExperimentalService_BulkCheckPermission_FullMethodName = "/authzed.api.v1.ExperimentalService/BulkCheckPermission" ExperimentalService_ExperimentalReflectSchema_FullMethodName = "/authzed.api.v1.ExperimentalService/ExperimentalReflectSchema" ExperimentalService_ExperimentalComputablePermissions_FullMethodName = "/authzed.api.v1.ExperimentalService/ExperimentalComputablePermissions" ExperimentalService_ExperimentalDependentRelations_FullMethodName = "/authzed.api.v1.ExperimentalService/ExperimentalDependentRelations" ExperimentalService_ExperimentalDiffSchema_FullMethodName = "/authzed.api.v1.ExperimentalService/ExperimentalDiffSchema" ExperimentalService_ExperimentalRegisterRelationshipCounter_FullMethodName = "/authzed.api.v1.ExperimentalService/ExperimentalRegisterRelationshipCounter" ExperimentalService_ExperimentalCountRelationships_FullMethodName = "/authzed.api.v1.ExperimentalService/ExperimentalCountRelationships" ExperimentalService_ExperimentalUnregisterRelationshipCounter_FullMethodName = "/authzed.api.v1.ExperimentalService/ExperimentalUnregisterRelationshipCounter" )
const ( PermissionsService_ReadRelationships_FullMethodName = "/authzed.api.v1.PermissionsService/ReadRelationships" PermissionsService_WriteRelationships_FullMethodName = "/authzed.api.v1.PermissionsService/WriteRelationships" PermissionsService_DeleteRelationships_FullMethodName = "/authzed.api.v1.PermissionsService/DeleteRelationships" PermissionsService_CheckPermission_FullMethodName = "/authzed.api.v1.PermissionsService/CheckPermission" PermissionsService_CheckBulkPermissions_FullMethodName = "/authzed.api.v1.PermissionsService/CheckBulkPermissions" PermissionsService_ExpandPermissionTree_FullMethodName = "/authzed.api.v1.PermissionsService/ExpandPermissionTree" PermissionsService_LookupResources_FullMethodName = "/authzed.api.v1.PermissionsService/LookupResources" PermissionsService_LookupSubjects_FullMethodName = "/authzed.api.v1.PermissionsService/LookupSubjects" PermissionsService_ImportBulkRelationships_FullMethodName = "/authzed.api.v1.PermissionsService/ImportBulkRelationships" PermissionsService_ExportBulkRelationships_FullMethodName = "/authzed.api.v1.PermissionsService/ExportBulkRelationships" )
const ( SchemaService_ReadSchema_FullMethodName = "/authzed.api.v1.SchemaService/ReadSchema" SchemaService_WriteSchema_FullMethodName = "/authzed.api.v1.SchemaService/WriteSchema" SchemaService_ReflectSchema_FullMethodName = "/authzed.api.v1.SchemaService/ReflectSchema" SchemaService_ComputablePermissions_FullMethodName = "/authzed.api.v1.SchemaService/ComputablePermissions" SchemaService_DependentRelations_FullMethodName = "/authzed.api.v1.SchemaService/DependentRelations" SchemaService_DiffSchema_FullMethodName = "/authzed.api.v1.SchemaService/DiffSchema" )
const (
WatchService_Watch_FullMethodName = "/authzed.api.v1.WatchService/Watch"
)
Variables ¶
var ExperimentalService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "authzed.api.v1.ExperimentalService", HandlerType: (*ExperimentalServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "BulkCheckPermission", Handler: _ExperimentalService_BulkCheckPermission_Handler, }, { MethodName: "ExperimentalReflectSchema", Handler: _ExperimentalService_ExperimentalReflectSchema_Handler, }, { MethodName: "ExperimentalComputablePermissions", Handler: _ExperimentalService_ExperimentalComputablePermissions_Handler, }, { MethodName: "ExperimentalDependentRelations", Handler: _ExperimentalService_ExperimentalDependentRelations_Handler, }, { MethodName: "ExperimentalDiffSchema", Handler: _ExperimentalService_ExperimentalDiffSchema_Handler, }, { MethodName: "ExperimentalRegisterRelationshipCounter", Handler: _ExperimentalService_ExperimentalRegisterRelationshipCounter_Handler, }, { MethodName: "ExperimentalCountRelationships", Handler: _ExperimentalService_ExperimentalCountRelationships_Handler, }, { MethodName: "ExperimentalUnregisterRelationshipCounter", Handler: _ExperimentalService_ExperimentalUnregisterRelationshipCounter_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "BulkImportRelationships", Handler: _ExperimentalService_BulkImportRelationships_Handler, ClientStreams: true, }, { StreamName: "BulkExportRelationships", Handler: _ExperimentalService_BulkExportRelationships_Handler, ServerStreams: true, }, }, Metadata: "authzed/api/v1/experimental_service.proto", }
ExperimentalService_ServiceDesc is the grpc.ServiceDesc for ExperimentalService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var PermissionsService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "authzed.api.v1.PermissionsService", HandlerType: (*PermissionsServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "WriteRelationships", Handler: _PermissionsService_WriteRelationships_Handler, }, { MethodName: "DeleteRelationships", Handler: _PermissionsService_DeleteRelationships_Handler, }, { MethodName: "CheckPermission", Handler: _PermissionsService_CheckPermission_Handler, }, { MethodName: "CheckBulkPermissions", Handler: _PermissionsService_CheckBulkPermissions_Handler, }, { MethodName: "ExpandPermissionTree", Handler: _PermissionsService_ExpandPermissionTree_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "ReadRelationships", Handler: _PermissionsService_ReadRelationships_Handler, ServerStreams: true, }, { StreamName: "LookupResources", Handler: _PermissionsService_LookupResources_Handler, ServerStreams: true, }, { StreamName: "LookupSubjects", Handler: _PermissionsService_LookupSubjects_Handler, ServerStreams: true, }, { StreamName: "ImportBulkRelationships", Handler: _PermissionsService_ImportBulkRelationships_Handler, ClientStreams: true, }, { StreamName: "ExportBulkRelationships", Handler: _PermissionsService_ExportBulkRelationships_Handler, ServerStreams: true, }, }, Metadata: "authzed/api/v1/permission_service.proto", }
PermissionsService_ServiceDesc is the grpc.ServiceDesc for PermissionsService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var SchemaService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "authzed.api.v1.SchemaService", HandlerType: (*SchemaServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ReadSchema", Handler: _SchemaService_ReadSchema_Handler, }, { MethodName: "WriteSchema", Handler: _SchemaService_WriteSchema_Handler, }, { MethodName: "ReflectSchema", Handler: _SchemaService_ReflectSchema_Handler, }, { MethodName: "ComputablePermissions", Handler: _SchemaService_ComputablePermissions_Handler, }, { MethodName: "DependentRelations", Handler: _SchemaService_DependentRelations_Handler, }, { MethodName: "DiffSchema", Handler: _SchemaService_DiffSchema_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "authzed/api/v1/schema_service.proto", }
SchemaService_ServiceDesc is the grpc.ServiceDesc for SchemaService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var WatchService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "authzed.api.v1.WatchService", HandlerType: (*WatchServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Watch", Handler: _WatchService_Watch_Handler, ServerStreams: true, }, }, Metadata: "authzed/api/v1/watch_service.proto", }
WatchService_ServiceDesc is the grpc.ServiceDesc for WatchService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterExperimentalServiceServer ¶
func RegisterExperimentalServiceServer(s grpc.ServiceRegistrar, srv ExperimentalServiceServer)
func RegisterPermissionsServiceServer ¶
func RegisterPermissionsServiceServer(s grpc.ServiceRegistrar, srv PermissionsServiceServer)
func RegisterSchemaServiceServer ¶
func RegisterSchemaServiceServer(s grpc.ServiceRegistrar, srv SchemaServiceServer)
func RegisterWatchServiceServer ¶
func RegisterWatchServiceServer(s grpc.ServiceRegistrar, srv WatchServiceServer)
Types ¶
type ExperimentalServiceClient ¶
type ExperimentalServiceClient interface {
// Deprecated: Do not use.
// DEPRECATED: Promoted to ImportBulkRelationships in the stable API.
BulkImportRelationships(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[v1.BulkImportRelationshipsRequest, v1.BulkImportRelationshipsResponse], error)
// Deprecated: Do not use.
// DEPRECATED: Promoted to ExportBulkRelationships in the stable API.
BulkExportRelationships(ctx context.Context, in *v1.BulkExportRelationshipsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[v1.BulkExportRelationshipsResponse], error)
// Deprecated: Do not use.
// DEPRECATED: Promoted to CheckBulkPermission in the stable API.
BulkCheckPermission(ctx context.Context, in *v1.BulkCheckPermissionRequest, opts ...grpc.CallOption) (*v1.BulkCheckPermissionResponse, error)
// Deprecated: Do not use.
// DEPRECATED: Promoted to ReflectSchema in the stable API.
ExperimentalReflectSchema(ctx context.Context, in *v1.ExperimentalReflectSchemaRequest, opts ...grpc.CallOption) (*v1.ExperimentalReflectSchemaResponse, error)
// Deprecated: Do not use.
// DEPRECATED: Promoted to ComputablePermissions in the stable API.
ExperimentalComputablePermissions(ctx context.Context, in *v1.ExperimentalComputablePermissionsRequest, opts ...grpc.CallOption) (*v1.ExperimentalComputablePermissionsResponse, error)
// Deprecated: Do not use.
// DEPRECATED: Promoted to DependentRelations in the stable API.
ExperimentalDependentRelations(ctx context.Context, in *v1.ExperimentalDependentRelationsRequest, opts ...grpc.CallOption) (*v1.ExperimentalDependentRelationsResponse, error)
// Deprecated: Do not use.
// DEPRECATED: Promoted to DiffSchema in the stable API.
ExperimentalDiffSchema(ctx context.Context, in *v1.ExperimentalDiffSchemaRequest, opts ...grpc.CallOption) (*v1.ExperimentalDiffSchemaResponse, error)
// EXPERIMENTAL: RegisterRelationshipCounter registers a new filter for counting relationships. A filter must be registered before
// a count can be requested.
ExperimentalRegisterRelationshipCounter(ctx context.Context, in *v1.ExperimentalRegisterRelationshipCounterRequest, opts ...grpc.CallOption) (*v1.ExperimentalRegisterRelationshipCounterResponse, error)
// EXPERIMENTAL: CountRelationships returns the count of relationships for *pre-registered* filter.
ExperimentalCountRelationships(ctx context.Context, in *v1.ExperimentalCountRelationshipsRequest, opts ...grpc.CallOption) (*v1.ExperimentalCountRelationshipsResponse, error)
// EXPERIMENTAL: UnregisterRelationshipCounter unregisters an existing filter for counting relationships.
ExperimentalUnregisterRelationshipCounter(ctx context.Context, in *v1.ExperimentalUnregisterRelationshipCounterRequest, opts ...grpc.CallOption) (*v1.ExperimentalUnregisterRelationshipCounterResponse, error)
}
ExperimentalServiceClient is the client API for ExperimentalService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
ExperimentalService exposes a number of APIs that are currently being prototyped and tested for future inclusion in the stable API.
func NewExperimentalServiceClient ¶
func NewExperimentalServiceClient(cc grpc.ClientConnInterface) ExperimentalServiceClient
type ExperimentalServiceServer ¶
type ExperimentalServiceServer interface {
// Deprecated: Do not use.
// DEPRECATED: Promoted to ImportBulkRelationships in the stable API.
BulkImportRelationships(grpc.ClientStreamingServer[v1.BulkImportRelationshipsRequest, v1.BulkImportRelationshipsResponse]) error
// Deprecated: Do not use.
// DEPRECATED: Promoted to ExportBulkRelationships in the stable API.
BulkExportRelationships(*v1.BulkExportRelationshipsRequest, grpc.ServerStreamingServer[v1.BulkExportRelationshipsResponse]) error
// Deprecated: Do not use.
// DEPRECATED: Promoted to CheckBulkPermission in the stable API.
BulkCheckPermission(context.Context, *v1.BulkCheckPermissionRequest) (*v1.BulkCheckPermissionResponse, error)
// Deprecated: Do not use.
// DEPRECATED: Promoted to ReflectSchema in the stable API.
ExperimentalReflectSchema(context.Context, *v1.ExperimentalReflectSchemaRequest) (*v1.ExperimentalReflectSchemaResponse, error)
// Deprecated: Do not use.
// DEPRECATED: Promoted to ComputablePermissions in the stable API.
ExperimentalComputablePermissions(context.Context, *v1.ExperimentalComputablePermissionsRequest) (*v1.ExperimentalComputablePermissionsResponse, error)
// Deprecated: Do not use.
// DEPRECATED: Promoted to DependentRelations in the stable API.
ExperimentalDependentRelations(context.Context, *v1.ExperimentalDependentRelationsRequest) (*v1.ExperimentalDependentRelationsResponse, error)
// Deprecated: Do not use.
// DEPRECATED: Promoted to DiffSchema in the stable API.
ExperimentalDiffSchema(context.Context, *v1.ExperimentalDiffSchemaRequest) (*v1.ExperimentalDiffSchemaResponse, error)
// EXPERIMENTAL: RegisterRelationshipCounter registers a new filter for counting relationships. A filter must be registered before
// a count can be requested.
ExperimentalRegisterRelationshipCounter(context.Context, *v1.ExperimentalRegisterRelationshipCounterRequest) (*v1.ExperimentalRegisterRelationshipCounterResponse, error)
// EXPERIMENTAL: CountRelationships returns the count of relationships for *pre-registered* filter.
ExperimentalCountRelationships(context.Context, *v1.ExperimentalCountRelationshipsRequest) (*v1.ExperimentalCountRelationshipsResponse, error)
// EXPERIMENTAL: UnregisterRelationshipCounter unregisters an existing filter for counting relationships.
ExperimentalUnregisterRelationshipCounter(context.Context, *v1.ExperimentalUnregisterRelationshipCounterRequest) (*v1.ExperimentalUnregisterRelationshipCounterResponse, error)
}
ExperimentalServiceServer is the server API for ExperimentalService service. All implementations should embed UnimplementedExperimentalServiceServer for forward compatibility.
ExperimentalService exposes a number of APIs that are currently being prototyped and tested for future inclusion in the stable API.
type ExperimentalService_BulkExportRelationshipsClient ¶
type ExperimentalService_BulkExportRelationshipsClient = grpc.ServerStreamingClient[v1.BulkExportRelationshipsResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type ExperimentalService_BulkExportRelationshipsServer ¶
type ExperimentalService_BulkExportRelationshipsServer = grpc.ServerStreamingServer[v1.BulkExportRelationshipsResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type ExperimentalService_BulkImportRelationshipsClient ¶
type ExperimentalService_BulkImportRelationshipsClient = grpc.ClientStreamingClient[v1.BulkImportRelationshipsRequest, v1.BulkImportRelationshipsResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type ExperimentalService_BulkImportRelationshipsServer ¶
type ExperimentalService_BulkImportRelationshipsServer = grpc.ClientStreamingServer[v1.BulkImportRelationshipsRequest, v1.BulkImportRelationshipsResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PermissionsServiceClient ¶
type PermissionsServiceClient interface {
// ReadRelationships reads a set of the relationships matching one or more
// filters.
ReadRelationships(ctx context.Context, in *v1.ReadRelationshipsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[v1.ReadRelationshipsResponse], error)
// WriteRelationships atomically writes and/or deletes a set of specified
// relationships. An optional set of preconditions can be provided that must
// be satisfied for the operation to commit.
WriteRelationships(ctx context.Context, in *v1.WriteRelationshipsRequest, opts ...grpc.CallOption) (*v1.WriteRelationshipsResponse, error)
// DeleteRelationships atomically bulk deletes all relationships matching the
// provided filter. If no relationships match, none will be deleted and the
// operation will succeed. An optional set of preconditions can be provided that must
// be satisfied for the operation to commit.
DeleteRelationships(ctx context.Context, in *v1.DeleteRelationshipsRequest, opts ...grpc.CallOption) (*v1.DeleteRelationshipsResponse, error)
// CheckPermission determines for a given resource whether a subject computes
// to having a permission or is a direct member of a particular relation.
CheckPermission(ctx context.Context, in *v1.CheckPermissionRequest, opts ...grpc.CallOption) (*v1.CheckPermissionResponse, error)
// CheckBulkPermissions evaluates the given list of permission checks
// and returns the list of results.
CheckBulkPermissions(ctx context.Context, in *v1.CheckBulkPermissionsRequest, opts ...grpc.CallOption) (*v1.CheckBulkPermissionsResponse, error)
// ExpandPermissionTree reveals the graph structure for a resource's
// permission or relation. This RPC does not recurse infinitely deep and may
// require multiple calls to fully unnest a deeply nested graph.
ExpandPermissionTree(ctx context.Context, in *v1.ExpandPermissionTreeRequest, opts ...grpc.CallOption) (*v1.ExpandPermissionTreeResponse, error)
// LookupResources returns all the resources of a given type that a subject
// can access whether via a computed permission or relation membership.
LookupResources(ctx context.Context, in *v1.LookupResourcesRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[v1.LookupResourcesResponse], error)
// LookupSubjects returns all the subjects of a given type that
// have access whether via a computed permission or relation membership.
LookupSubjects(ctx context.Context, in *v1.LookupSubjectsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[v1.LookupSubjectsResponse], error)
// ImportBulkRelationships is a faster path to writing a large number of
// relationships at once. It is both batched and streaming. For maximum
// performance, the caller should attempt to write relationships in as close
// to relationship sort order as possible: (resource.object_type,
// resource.object_id, relation, subject.object.object_type,
// subject.object.object_id, subject.optional_relation). All relationships
// written are done so under a single transaction.
ImportBulkRelationships(ctx context.Context, opts ...grpc.CallOption) (grpc.ClientStreamingClient[v1.ImportBulkRelationshipsRequest, v1.ImportBulkRelationshipsResponse], error)
// ExportBulkRelationships is the fastest path available to exporting
// relationships from the server. It is resumable, and will return results
// in an order determined by the server.
ExportBulkRelationships(ctx context.Context, in *v1.ExportBulkRelationshipsRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[v1.ExportBulkRelationshipsResponse], error)
}
PermissionsServiceClient is the client API for PermissionsService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
PermissionsService implements a set of RPCs that perform operations on relationships and permissions.
func NewPermissionsServiceClient ¶
func NewPermissionsServiceClient(cc grpc.ClientConnInterface) PermissionsServiceClient
type PermissionsServiceServer ¶
type PermissionsServiceServer interface {
// ReadRelationships reads a set of the relationships matching one or more
// filters.
ReadRelationships(*v1.ReadRelationshipsRequest, grpc.ServerStreamingServer[v1.ReadRelationshipsResponse]) error
// WriteRelationships atomically writes and/or deletes a set of specified
// relationships. An optional set of preconditions can be provided that must
// be satisfied for the operation to commit.
WriteRelationships(context.Context, *v1.WriteRelationshipsRequest) (*v1.WriteRelationshipsResponse, error)
// DeleteRelationships atomically bulk deletes all relationships matching the
// provided filter. If no relationships match, none will be deleted and the
// operation will succeed. An optional set of preconditions can be provided that must
// be satisfied for the operation to commit.
DeleteRelationships(context.Context, *v1.DeleteRelationshipsRequest) (*v1.DeleteRelationshipsResponse, error)
// CheckPermission determines for a given resource whether a subject computes
// to having a permission or is a direct member of a particular relation.
CheckPermission(context.Context, *v1.CheckPermissionRequest) (*v1.CheckPermissionResponse, error)
// CheckBulkPermissions evaluates the given list of permission checks
// and returns the list of results.
CheckBulkPermissions(context.Context, *v1.CheckBulkPermissionsRequest) (*v1.CheckBulkPermissionsResponse, error)
// ExpandPermissionTree reveals the graph structure for a resource's
// permission or relation. This RPC does not recurse infinitely deep and may
// require multiple calls to fully unnest a deeply nested graph.
ExpandPermissionTree(context.Context, *v1.ExpandPermissionTreeRequest) (*v1.ExpandPermissionTreeResponse, error)
// LookupResources returns all the resources of a given type that a subject
// can access whether via a computed permission or relation membership.
LookupResources(*v1.LookupResourcesRequest, grpc.ServerStreamingServer[v1.LookupResourcesResponse]) error
// LookupSubjects returns all the subjects of a given type that
// have access whether via a computed permission or relation membership.
LookupSubjects(*v1.LookupSubjectsRequest, grpc.ServerStreamingServer[v1.LookupSubjectsResponse]) error
// ImportBulkRelationships is a faster path to writing a large number of
// relationships at once. It is both batched and streaming. For maximum
// performance, the caller should attempt to write relationships in as close
// to relationship sort order as possible: (resource.object_type,
// resource.object_id, relation, subject.object.object_type,
// subject.object.object_id, subject.optional_relation). All relationships
// written are done so under a single transaction.
ImportBulkRelationships(grpc.ClientStreamingServer[v1.ImportBulkRelationshipsRequest, v1.ImportBulkRelationshipsResponse]) error
// ExportBulkRelationships is the fastest path available to exporting
// relationships from the server. It is resumable, and will return results
// in an order determined by the server.
ExportBulkRelationships(*v1.ExportBulkRelationshipsRequest, grpc.ServerStreamingServer[v1.ExportBulkRelationshipsResponse]) error
}
PermissionsServiceServer is the server API for PermissionsService service. All implementations should embed UnimplementedPermissionsServiceServer for forward compatibility.
PermissionsService implements a set of RPCs that perform operations on relationships and permissions.
type PermissionsService_ExportBulkRelationshipsClient ¶
type PermissionsService_ExportBulkRelationshipsClient = grpc.ServerStreamingClient[v1.ExportBulkRelationshipsResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PermissionsService_ExportBulkRelationshipsServer ¶
type PermissionsService_ExportBulkRelationshipsServer = grpc.ServerStreamingServer[v1.ExportBulkRelationshipsResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PermissionsService_ImportBulkRelationshipsClient ¶
type PermissionsService_ImportBulkRelationshipsClient = grpc.ClientStreamingClient[v1.ImportBulkRelationshipsRequest, v1.ImportBulkRelationshipsResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PermissionsService_ImportBulkRelationshipsServer ¶
type PermissionsService_ImportBulkRelationshipsServer = grpc.ClientStreamingServer[v1.ImportBulkRelationshipsRequest, v1.ImportBulkRelationshipsResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PermissionsService_LookupResourcesClient ¶
type PermissionsService_LookupResourcesClient = grpc.ServerStreamingClient[v1.LookupResourcesResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PermissionsService_LookupResourcesServer ¶
type PermissionsService_LookupResourcesServer = grpc.ServerStreamingServer[v1.LookupResourcesResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PermissionsService_LookupSubjectsClient ¶
type PermissionsService_LookupSubjectsClient = grpc.ServerStreamingClient[v1.LookupSubjectsResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PermissionsService_LookupSubjectsServer ¶
type PermissionsService_LookupSubjectsServer = grpc.ServerStreamingServer[v1.LookupSubjectsResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PermissionsService_ReadRelationshipsClient ¶
type PermissionsService_ReadRelationshipsClient = grpc.ServerStreamingClient[v1.ReadRelationshipsResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type PermissionsService_ReadRelationshipsServer ¶
type PermissionsService_ReadRelationshipsServer = grpc.ServerStreamingServer[v1.ReadRelationshipsResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type SchemaServiceClient ¶
type SchemaServiceClient interface {
// Read returns the current Object Definitions for a Permissions System.
//
// Errors include:
// - INVALID_ARGUMENT: a provided value has failed to semantically validate
// - NOT_FOUND: no schema has been defined
ReadSchema(ctx context.Context, in *v1.ReadSchemaRequest, opts ...grpc.CallOption) (*v1.ReadSchemaResponse, error)
// Write overwrites the current Object Definitions for a Permissions System.
WriteSchema(ctx context.Context, in *v1.WriteSchemaRequest, opts ...grpc.CallOption) (*v1.WriteSchemaResponse, error)
// ReflectSchema reflects the current schema stored in SpiceDB, returning a structural
// form of the schema for use by client tooling.
ReflectSchema(ctx context.Context, in *v1.ReflectSchemaRequest, opts ...grpc.CallOption) (*v1.ReflectSchemaResponse, error)
// ComputablePermissions returns the set of permissions that compute based off a relation
// in the current schema. For example, if the schema has a relation `viewer` and a permission
// `view` defined as `permission view = viewer + editor`, then the
// computable permissions for the relation `viewer` will include `view`.
ComputablePermissions(ctx context.Context, in *v1.ComputablePermissionsRequest, opts ...grpc.CallOption) (*v1.ComputablePermissionsResponse, error)
// DependentRelations returns the set of relations and permissions that used
// to compute a permission, recursively, in the current schema. It is the
// inverse of the ComputablePermissions API.
DependentRelations(ctx context.Context, in *v1.DependentRelationsRequest, opts ...grpc.CallOption) (*v1.DependentRelationsResponse, error)
// DiffSchema returns the difference between the specified schema and the current
// schema stored in SpiceDB.
DiffSchema(ctx context.Context, in *v1.DiffSchemaRequest, opts ...grpc.CallOption) (*v1.DiffSchemaResponse, error)
}
SchemaServiceClient is the client API for SchemaService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
SchemaService implements operations on a Permissions System's Schema.
func NewSchemaServiceClient ¶
func NewSchemaServiceClient(cc grpc.ClientConnInterface) SchemaServiceClient
type SchemaServiceServer ¶
type SchemaServiceServer interface {
// Read returns the current Object Definitions for a Permissions System.
//
// Errors include:
// - INVALID_ARGUMENT: a provided value has failed to semantically validate
// - NOT_FOUND: no schema has been defined
ReadSchema(context.Context, *v1.ReadSchemaRequest) (*v1.ReadSchemaResponse, error)
// Write overwrites the current Object Definitions for a Permissions System.
WriteSchema(context.Context, *v1.WriteSchemaRequest) (*v1.WriteSchemaResponse, error)
// ReflectSchema reflects the current schema stored in SpiceDB, returning a structural
// form of the schema for use by client tooling.
ReflectSchema(context.Context, *v1.ReflectSchemaRequest) (*v1.ReflectSchemaResponse, error)
// ComputablePermissions returns the set of permissions that compute based off a relation
// in the current schema. For example, if the schema has a relation `viewer` and a permission
// `view` defined as `permission view = viewer + editor`, then the
// computable permissions for the relation `viewer` will include `view`.
ComputablePermissions(context.Context, *v1.ComputablePermissionsRequest) (*v1.ComputablePermissionsResponse, error)
// DependentRelations returns the set of relations and permissions that used
// to compute a permission, recursively, in the current schema. It is the
// inverse of the ComputablePermissions API.
DependentRelations(context.Context, *v1.DependentRelationsRequest) (*v1.DependentRelationsResponse, error)
// DiffSchema returns the difference between the specified schema and the current
// schema stored in SpiceDB.
DiffSchema(context.Context, *v1.DiffSchemaRequest) (*v1.DiffSchemaResponse, error)
}
SchemaServiceServer is the server API for SchemaService service. All implementations should embed UnimplementedSchemaServiceServer for forward compatibility.
SchemaService implements operations on a Permissions System's Schema.
type UnimplementedExperimentalServiceServer ¶
type UnimplementedExperimentalServiceServer struct{}
UnimplementedExperimentalServiceServer should be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedExperimentalServiceServer) BulkCheckPermission ¶
func (UnimplementedExperimentalServiceServer) BulkCheckPermission(context.Context, *v1.BulkCheckPermissionRequest) (*v1.BulkCheckPermissionResponse, error)
func (UnimplementedExperimentalServiceServer) BulkExportRelationships ¶
func (UnimplementedExperimentalServiceServer) BulkExportRelationships(*v1.BulkExportRelationshipsRequest, grpc.ServerStreamingServer[v1.BulkExportRelationshipsResponse]) error
func (UnimplementedExperimentalServiceServer) BulkImportRelationships ¶
func (UnimplementedExperimentalServiceServer) BulkImportRelationships(grpc.ClientStreamingServer[v1.BulkImportRelationshipsRequest, v1.BulkImportRelationshipsResponse]) error
func (UnimplementedExperimentalServiceServer) ExperimentalComputablePermissions ¶
func (UnimplementedExperimentalServiceServer) ExperimentalComputablePermissions(context.Context, *v1.ExperimentalComputablePermissionsRequest) (*v1.ExperimentalComputablePermissionsResponse, error)
func (UnimplementedExperimentalServiceServer) ExperimentalCountRelationships ¶
func (UnimplementedExperimentalServiceServer) ExperimentalCountRelationships(context.Context, *v1.ExperimentalCountRelationshipsRequest) (*v1.ExperimentalCountRelationshipsResponse, error)
func (UnimplementedExperimentalServiceServer) ExperimentalDependentRelations ¶
func (UnimplementedExperimentalServiceServer) ExperimentalDependentRelations(context.Context, *v1.ExperimentalDependentRelationsRequest) (*v1.ExperimentalDependentRelationsResponse, error)
func (UnimplementedExperimentalServiceServer) ExperimentalDiffSchema ¶
func (UnimplementedExperimentalServiceServer) ExperimentalDiffSchema(context.Context, *v1.ExperimentalDiffSchemaRequest) (*v1.ExperimentalDiffSchemaResponse, error)
func (UnimplementedExperimentalServiceServer) ExperimentalReflectSchema ¶
func (UnimplementedExperimentalServiceServer) ExperimentalReflectSchema(context.Context, *v1.ExperimentalReflectSchemaRequest) (*v1.ExperimentalReflectSchemaResponse, error)
func (UnimplementedExperimentalServiceServer) ExperimentalRegisterRelationshipCounter ¶
func (UnimplementedExperimentalServiceServer) ExperimentalRegisterRelationshipCounter(context.Context, *v1.ExperimentalRegisterRelationshipCounterRequest) (*v1.ExperimentalRegisterRelationshipCounterResponse, error)
func (UnimplementedExperimentalServiceServer) ExperimentalUnregisterRelationshipCounter ¶
func (UnimplementedExperimentalServiceServer) ExperimentalUnregisterRelationshipCounter(context.Context, *v1.ExperimentalUnregisterRelationshipCounterRequest) (*v1.ExperimentalUnregisterRelationshipCounterResponse, error)
type UnimplementedPermissionsServiceServer ¶
type UnimplementedPermissionsServiceServer struct{}
UnimplementedPermissionsServiceServer should be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedPermissionsServiceServer) CheckBulkPermissions ¶
func (UnimplementedPermissionsServiceServer) CheckBulkPermissions(context.Context, *v1.CheckBulkPermissionsRequest) (*v1.CheckBulkPermissionsResponse, error)
func (UnimplementedPermissionsServiceServer) CheckPermission ¶
func (UnimplementedPermissionsServiceServer) CheckPermission(context.Context, *v1.CheckPermissionRequest) (*v1.CheckPermissionResponse, error)
func (UnimplementedPermissionsServiceServer) DeleteRelationships ¶
func (UnimplementedPermissionsServiceServer) DeleteRelationships(context.Context, *v1.DeleteRelationshipsRequest) (*v1.DeleteRelationshipsResponse, error)
func (UnimplementedPermissionsServiceServer) ExpandPermissionTree ¶
func (UnimplementedPermissionsServiceServer) ExpandPermissionTree(context.Context, *v1.ExpandPermissionTreeRequest) (*v1.ExpandPermissionTreeResponse, error)
func (UnimplementedPermissionsServiceServer) ExportBulkRelationships ¶
func (UnimplementedPermissionsServiceServer) ExportBulkRelationships(*v1.ExportBulkRelationshipsRequest, grpc.ServerStreamingServer[v1.ExportBulkRelationshipsResponse]) error
func (UnimplementedPermissionsServiceServer) ImportBulkRelationships ¶
func (UnimplementedPermissionsServiceServer) ImportBulkRelationships(grpc.ClientStreamingServer[v1.ImportBulkRelationshipsRequest, v1.ImportBulkRelationshipsResponse]) error
func (UnimplementedPermissionsServiceServer) LookupResources ¶
func (UnimplementedPermissionsServiceServer) LookupResources(*v1.LookupResourcesRequest, grpc.ServerStreamingServer[v1.LookupResourcesResponse]) error
func (UnimplementedPermissionsServiceServer) LookupSubjects ¶
func (UnimplementedPermissionsServiceServer) LookupSubjects(*v1.LookupSubjectsRequest, grpc.ServerStreamingServer[v1.LookupSubjectsResponse]) error
func (UnimplementedPermissionsServiceServer) ReadRelationships ¶
func (UnimplementedPermissionsServiceServer) ReadRelationships(*v1.ReadRelationshipsRequest, grpc.ServerStreamingServer[v1.ReadRelationshipsResponse]) error
func (UnimplementedPermissionsServiceServer) WriteRelationships ¶
func (UnimplementedPermissionsServiceServer) WriteRelationships(context.Context, *v1.WriteRelationshipsRequest) (*v1.WriteRelationshipsResponse, error)
type UnimplementedSchemaServiceServer ¶
type UnimplementedSchemaServiceServer struct{}
UnimplementedSchemaServiceServer should be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedSchemaServiceServer) ComputablePermissions ¶
func (UnimplementedSchemaServiceServer) ComputablePermissions(context.Context, *v1.ComputablePermissionsRequest) (*v1.ComputablePermissionsResponse, error)
func (UnimplementedSchemaServiceServer) DependentRelations ¶
func (UnimplementedSchemaServiceServer) DependentRelations(context.Context, *v1.DependentRelationsRequest) (*v1.DependentRelationsResponse, error)
func (UnimplementedSchemaServiceServer) DiffSchema ¶
func (UnimplementedSchemaServiceServer) DiffSchema(context.Context, *v1.DiffSchemaRequest) (*v1.DiffSchemaResponse, error)
func (UnimplementedSchemaServiceServer) ReadSchema ¶
func (UnimplementedSchemaServiceServer) ReadSchema(context.Context, *v1.ReadSchemaRequest) (*v1.ReadSchemaResponse, error)
func (UnimplementedSchemaServiceServer) ReflectSchema ¶
func (UnimplementedSchemaServiceServer) ReflectSchema(context.Context, *v1.ReflectSchemaRequest) (*v1.ReflectSchemaResponse, error)
func (UnimplementedSchemaServiceServer) WriteSchema ¶
func (UnimplementedSchemaServiceServer) WriteSchema(context.Context, *v1.WriteSchemaRequest) (*v1.WriteSchemaResponse, error)
type UnimplementedWatchServiceServer ¶
type UnimplementedWatchServiceServer struct{}
UnimplementedWatchServiceServer should be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedWatchServiceServer) Watch ¶
func (UnimplementedWatchServiceServer) Watch(*v1.WatchRequest, grpc.ServerStreamingServer[v1.WatchResponse]) error
type UnsafeExperimentalServiceServer ¶
type UnsafeExperimentalServiceServer interface {
// contains filtered or unexported methods
}
UnsafeExperimentalServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ExperimentalServiceServer will result in compilation errors.
type UnsafePermissionsServiceServer ¶
type UnsafePermissionsServiceServer interface {
// contains filtered or unexported methods
}
UnsafePermissionsServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to PermissionsServiceServer will result in compilation errors.
type UnsafeSchemaServiceServer ¶
type UnsafeSchemaServiceServer interface {
// contains filtered or unexported methods
}
UnsafeSchemaServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SchemaServiceServer will result in compilation errors.
type UnsafeWatchServiceServer ¶
type UnsafeWatchServiceServer interface {
// contains filtered or unexported methods
}
UnsafeWatchServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to WatchServiceServer will result in compilation errors.
type WatchServiceClient ¶
type WatchServiceClient interface {
// Watch returns a stream of events that occurred in the datastore in ascending timestamp order.
// The events can be relationship updates, schema updates, or checkpoints.
Watch(ctx context.Context, in *v1.WatchRequest, opts ...grpc.CallOption) (grpc.ServerStreamingClient[v1.WatchResponse], error)
}
WatchServiceClient is the client API for WatchService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewWatchServiceClient ¶
func NewWatchServiceClient(cc grpc.ClientConnInterface) WatchServiceClient
type WatchServiceServer ¶
type WatchServiceServer interface {
// Watch returns a stream of events that occurred in the datastore in ascending timestamp order.
// The events can be relationship updates, schema updates, or checkpoints.
Watch(*v1.WatchRequest, grpc.ServerStreamingServer[v1.WatchResponse]) error
}
WatchServiceServer is the server API for WatchService service. All implementations should embed UnimplementedWatchServiceServer for forward compatibility.
type WatchService_WatchClient ¶
type WatchService_WatchClient = grpc.ServerStreamingClient[v1.WatchResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
type WatchService_WatchServer ¶
type WatchService_WatchServer = grpc.ServerStreamingServer[v1.WatchResponse]
This type alias is provided for backwards compatibility with existing code that references the prior non-generic stream type by name.
Source Files
¶
- experimental_service_grpc.pb.go
- permission_service_grpc.pb.go
- schema_service_grpc.pb.go
- watch_service_grpc.pb.go