Documentation ¶
Index ¶
- func GetStatus(err error) codes.Code
- func InterceptorLogger(l *slog.Logger) logging.Logger
- type BundleServer
- func (r *BundleServer) Delete(ctx context.Context, request *v1.BundleDeleteRequest) (*v1.BundleDeleteResponse, error)
- func (r *BundleServer) Read(ctx context.Context, request *v1.BundleReadRequest) (*v1.BundleReadResponse, error)
- func (r *BundleServer) Write(ctx context.Context, request *v1.BundleWriteRequest) (*v1.BundleWriteResponse, error)
- type Container
- type DataServer
- func (r *DataServer) Delete(ctx context.Context, request *v1.DataDeleteRequest) (*v1.DataDeleteResponse, error)
- func (r *DataServer) DeleteRelationships(ctx context.Context, request *v1.RelationshipDeleteRequest) (*v1.RelationshipDeleteResponse, error)
- func (r *DataServer) ReadAttributes(ctx context.Context, request *v1.AttributeReadRequest) (*v1.AttributeReadResponse, error)
- func (r *DataServer) ReadRelationships(ctx context.Context, request *v1.RelationshipReadRequest) (*v1.RelationshipReadResponse, error)
- func (r *DataServer) RunBundle(ctx context.Context, request *v1.BundleRunRequest) (*v1.BundleRunResponse, error)
- func (r *DataServer) Write(ctx context.Context, request *v1.DataWriteRequest) (*v1.DataWriteResponse, error)
- func (r *DataServer) WriteRelationships(ctx context.Context, request *v1.RelationshipWriteRequest) (*v1.RelationshipWriteResponse, error)
- type HealthServer
- func (s *HealthServer) AuthFuncOverride(ctx context.Context, fullMethodName string) (context.Context, error)
- func (s *HealthServer) Check(_ context.Context, _ *health.HealthCheckRequest) (*health.HealthCheckResponse, error)
- func (s *HealthServer) Watch(_ *health.HealthCheckRequest, _ health.Health_WatchServer) error
- type PermissionServer
- func (r *PermissionServer) Check(ctx context.Context, request *v1.PermissionCheckRequest) (*v1.PermissionCheckResponse, error)
- func (r *PermissionServer) Expand(ctx context.Context, request *v1.PermissionExpandRequest) (*v1.PermissionExpandResponse, error)
- func (r *PermissionServer) LookupEntity(ctx context.Context, request *v1.PermissionLookupEntityRequest) (*v1.PermissionLookupEntityResponse, error)
- func (r *PermissionServer) LookupEntityStream(request *v1.PermissionLookupEntityRequest, ...) error
- func (r *PermissionServer) LookupSubject(ctx context.Context, request *v1.PermissionLookupSubjectRequest) (*v1.PermissionLookupSubjectResponse, error)
- func (r *PermissionServer) SubjectPermission(ctx context.Context, request *v1.PermissionSubjectPermissionRequest) (*v1.PermissionSubjectPermissionResponse, error)
- type SchemaServer
- func (r *SchemaServer) List(ctx context.Context, request *v1.SchemaListRequest) (*v1.SchemaListResponse, error)
- func (r *SchemaServer) PartialWrite(ctx context.Context, request *v1.SchemaPartialWriteRequest) (*v1.SchemaPartialWriteResponse, error)
- func (r *SchemaServer) Read(ctx context.Context, request *v1.SchemaReadRequest) (*v1.SchemaReadResponse, error)
- func (r *SchemaServer) Write(ctx context.Context, request *v1.SchemaWriteRequest) (*v1.SchemaWriteResponse, error)
- type TenancyServer
- func (t *TenancyServer) Create(ctx context.Context, request *v1.TenantCreateRequest) (*v1.TenantCreateResponse, error)
- func (t *TenancyServer) Delete(ctx context.Context, request *v1.TenantDeleteRequest) (*v1.TenantDeleteResponse, error)
- func (t *TenancyServer) List(ctx context.Context, request *v1.TenantListRequest) (*v1.TenantListResponse, error)
- type WatchServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BundleServer ¶ added in v0.6.0
type BundleServer struct { v1.UnimplementedBundleServer // contains filtered or unexported fields }
BundleServer handles bundle operations.
func NewBundleServer ¶ added in v0.6.0
func NewBundleServer( br storage.BundleReader, bw storage.BundleWriter, ) *BundleServer
func (*BundleServer) Delete ¶ added in v0.6.0
func (r *BundleServer) Delete(ctx context.Context, request *v1.BundleDeleteRequest) (*v1.BundleDeleteResponse, error)
Delete handles the deletion of bundles.
func (*BundleServer) Read ¶ added in v0.6.0
func (r *BundleServer) Read(ctx context.Context, request *v1.BundleReadRequest) (*v1.BundleReadResponse, error)
Read handles the reading of bundles.
func (*BundleServer) Write ¶ added in v0.6.0
func (r *BundleServer) Write(ctx context.Context, request *v1.BundleWriteRequest) (*v1.BundleWriteResponse, error)
Write handles the writing of bundles.
type Container ¶ added in v0.4.0
type Container struct { // Invoker for performing permission-related operations Invoker invoke.Invoker // DataReader for reading data from storage DR storage.DataReader // DataWriter for writing data to storage DW storage.DataWriter // BundleReader for reading bundle from storage BR storage.BundleReader // BundleWriter for writing bundle to storage BW storage.BundleWriter // SchemaReader for reading schemas from storage SR storage.SchemaReader // SchemaWriter for writing schemas to storage SW storage.SchemaWriter // TenantReader for reading tenant information from storage TR storage.TenantReader // TenantWriter for writing tenant information to storage TW storage.TenantWriter W storage.Watcher }
Container is a struct that holds the invoker and various storage for permission-related operations. It serves as a central point of access for interacting with the underlying data and services.
func NewContainer ¶ added in v0.4.0
func NewContainer( invoker invoke.Invoker, dr storage.DataReader, dw storage.DataWriter, br storage.BundleReader, bw storage.BundleWriter, sr storage.SchemaReader, sw storage.SchemaWriter, tr storage.TenantReader, tw storage.TenantWriter, w storage.Watcher, ) *Container
NewContainer is a constructor for the Container struct. It takes an Invoker, RelationshipReader, RelationshipWriter, SchemaReader, SchemaWriter, TenantReader, and TenantWriter as arguments, and returns a pointer to a Container instance.
func (*Container) Run ¶ added in v0.4.0
func (s *Container) Run( ctx context.Context, srv *config.Server, logger *slog.Logger, dst *config.Distributed, authentication *config.Authn, profiler *config.Profiler, localInvoker invoke.Invoker, ) error
Run is a method that starts the Container and its services, including the gRPC server, an optional HTTP server, and an optional profiler server. It also sets up authentication, TLS configurations, and interceptors as needed.
type DataServer ¶ added in v0.5.0
type DataServer struct { v1.UnimplementedDataServer // contains filtered or unexported fields }
DataServer - Structure for Data Server
func NewDataServer ¶ added in v0.5.0
func NewDataServer( dr storage.DataReader, dw storage.DataWriter, br storage.BundleReader, sr storage.SchemaReader, ) *DataServer
NewDataServer - Creates new Data Server
func (*DataServer) Delete ¶ added in v0.5.0
func (r *DataServer) Delete(ctx context.Context, request *v1.DataDeleteRequest) (*v1.DataDeleteResponse, error)
Delete - Delete relationships and attributes from writeDB
func (*DataServer) DeleteRelationships ¶ added in v0.5.0
func (r *DataServer) DeleteRelationships(ctx context.Context, request *v1.RelationshipDeleteRequest) (*v1.RelationshipDeleteResponse, error)
DeleteRelationships - Delete relationships from writeDB
func (*DataServer) ReadAttributes ¶ added in v0.5.0
func (r *DataServer) ReadAttributes(ctx context.Context, request *v1.AttributeReadRequest) (*v1.AttributeReadResponse, error)
ReadAttributes - Allows directly querying the stored engines data to display and filter stored attribute tuples
func (*DataServer) ReadRelationships ¶ added in v0.5.0
func (r *DataServer) ReadRelationships(ctx context.Context, request *v1.RelationshipReadRequest) (*v1.RelationshipReadResponse, error)
ReadRelationships - Allows directly querying the stored engines data to display and filter stored relational tuples
func (*DataServer) RunBundle ¶ added in v0.6.0
func (r *DataServer) RunBundle(ctx context.Context, request *v1.BundleRunRequest) (*v1.BundleRunResponse, error)
RunBundle executes a bundle and returns its snapshot token.
func (*DataServer) Write ¶ added in v0.5.0
func (r *DataServer) Write(ctx context.Context, request *v1.DataWriteRequest) (*v1.DataWriteResponse, error)
Write - Write relationships and attributes to writeDB
func (*DataServer) WriteRelationships ¶ added in v0.5.0
func (r *DataServer) WriteRelationships(ctx context.Context, request *v1.RelationshipWriteRequest) (*v1.RelationshipWriteResponse, error)
WriteRelationships - Write relation tuples to writeDB
type HealthServer ¶
type HealthServer struct {
health.UnimplementedHealthServer
}
HealthServer - Structure for Health Server
func NewHealthServer ¶
func NewHealthServer() *HealthServer
NewHealthServer - Creates new HealthServer Server
func (*HealthServer) AuthFuncOverride ¶ added in v0.7.4
func (s *HealthServer) AuthFuncOverride(ctx context.Context, fullMethodName string) (context.Context, error)
AuthFuncOverride is called instead of authn.
func (*HealthServer) Check ¶
func (s *HealthServer) Check(_ context.Context, _ *health.HealthCheckRequest) (*health.HealthCheckResponse, error)
Check - Return health check status response
func (*HealthServer) Watch ¶
func (s *HealthServer) Watch(_ *health.HealthCheckRequest, _ health.Health_WatchServer) error
Watch - TO:DO
type PermissionServer ¶
type PermissionServer struct { v1.UnimplementedPermissionServer // contains filtered or unexported fields }
PermissionServer - Structure for Permission Server
func NewPermissionServer ¶
func NewPermissionServer(i invoke.Invoker) *PermissionServer
NewPermissionServer - Creates new Permission Server
func (*PermissionServer) Check ¶
func (r *PermissionServer) Check(ctx context.Context, request *v1.PermissionCheckRequest) (*v1.PermissionCheckResponse, error)
Check - Performs Authorization Check
func (*PermissionServer) Expand ¶
func (r *PermissionServer) Expand(ctx context.Context, request *v1.PermissionExpandRequest) (*v1.PermissionExpandResponse, error)
Expand - Get schema actions in a tree structure
func (*PermissionServer) LookupEntity ¶
func (r *PermissionServer) LookupEntity(ctx context.Context, request *v1.PermissionLookupEntityRequest) (*v1.PermissionLookupEntityResponse, error)
LookupEntity -
func (*PermissionServer) LookupEntityStream ¶
func (r *PermissionServer) LookupEntityStream(request *v1.PermissionLookupEntityRequest, server v1.Permission_LookupEntityStreamServer) error
LookupEntityStream -
func (*PermissionServer) LookupSubject ¶ added in v0.4.1
func (r *PermissionServer) LookupSubject(ctx context.Context, request *v1.PermissionLookupSubjectRequest) (*v1.PermissionLookupSubjectResponse, error)
LookupSubject -
func (*PermissionServer) SubjectPermission ¶ added in v0.4.7
func (r *PermissionServer) SubjectPermission(ctx context.Context, request *v1.PermissionSubjectPermissionRequest) (*v1.PermissionSubjectPermissionResponse, error)
SubjectPermission -
type SchemaServer ¶
type SchemaServer struct { v1.UnimplementedSchemaServer // contains filtered or unexported fields }
SchemaServer - Structure for Schema Server
func NewSchemaServer ¶
func NewSchemaServer(sw storage.SchemaWriter, sr storage.SchemaReader) *SchemaServer
NewSchemaServer - Creates new Schema Server
func (*SchemaServer) List ¶ added in v0.7.5
func (r *SchemaServer) List(ctx context.Context, request *v1.SchemaListRequest) (*v1.SchemaListResponse, error)
List - List Schemas
func (*SchemaServer) PartialWrite ¶ added in v0.7.9
func (r *SchemaServer) PartialWrite(ctx context.Context, request *v1.SchemaPartialWriteRequest) (*v1.SchemaPartialWriteResponse, error)
PartialWrite applies incremental updates to the schema of a specific tenant based on the provided request.
func (*SchemaServer) Read ¶
func (r *SchemaServer) Read(ctx context.Context, request *v1.SchemaReadRequest) (*v1.SchemaReadResponse, error)
Read - Read created Schema
func (*SchemaServer) Write ¶
func (r *SchemaServer) Write(ctx context.Context, request *v1.SchemaWriteRequest) (*v1.SchemaWriteResponse, error)
Write - Configure new Permify Schema to Permify
type TenancyServer ¶ added in v0.3.0
type TenancyServer struct { v1.UnimplementedTenancyServer // contains filtered or unexported fields }
TenancyServer - Structure for Tenancy Server
func NewTenancyServer ¶ added in v0.3.0
func NewTenancyServer(tr storage.TenantReader, tw storage.TenantWriter) *TenancyServer
NewTenancyServer - Creates new Tenancy Server
func (*TenancyServer) Create ¶ added in v0.3.0
func (t *TenancyServer) Create(ctx context.Context, request *v1.TenantCreateRequest) (*v1.TenantCreateResponse, error)
Create - Create new Tenant
func (*TenancyServer) Delete ¶ added in v0.3.0
func (t *TenancyServer) Delete(ctx context.Context, request *v1.TenantDeleteRequest) (*v1.TenantDeleteResponse, error)
Delete - Delete a Tenant
func (*TenancyServer) List ¶ added in v0.3.0
func (t *TenancyServer) List(ctx context.Context, request *v1.TenantListRequest) (*v1.TenantListResponse, error)
List - List Tenants
type WatchServer ¶ added in v0.4.4
type WatchServer struct { v1.UnimplementedWatchServer // contains filtered or unexported fields }
func NewWatchServer ¶ added in v0.4.4
func NewWatchServer( w storage.Watcher, dr storage.DataReader, ) *WatchServer
func (*WatchServer) Watch ¶ added in v0.4.4
func (r *WatchServer) Watch(request *v1.WatchRequest, server v1.Watch_WatchServer) error
Watch function sets up a stream for the client to receive changes.