Documentation ¶
Index ¶
- Constants
- Variables
- type CheckUsecase
- type ContinuationToken
- type CreateRelationshipsUsecase
- type DeleteRelationshipsUsecase
- type GetResourcesUsecase
- type GetSubjectsUsecase
- type ImportBulkTuplesUsecase
- type IsBackendAvaliableUsecase
- type ReadRelationshipsUsecase
- type RelationshipResult
- type ResourceResult
- type SubjectResult
- type TouchSemantics
- type ZanzibarRepository
Constants ¶
View Source
const (
MaxStreamingCount uint32 = 1000
)
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewCreateRelationshipsUsecase, NewReadRelationshipsUsecase, NewDeleteRelationshipsUsecase, NewCheckUsecase, NewGetSubjectsUseCase, NewGetResourcesUseCase, NewIsBackendAvailableUsecase, NewImportBulkTuplesUsecase)
ProviderSet is biz providers.
Functions ¶
This section is empty.
Types ¶
type CheckUsecase ¶
type CheckUsecase struct {
// contains filtered or unexported fields
}
func NewCheckUsecase ¶
func NewCheckUsecase(repo ZanzibarRepository, logger log.Logger) *CheckUsecase
func (*CheckUsecase) Check ¶
func (rc *CheckUsecase) Check(ctx context.Context, check *v1beta1.CheckRequest) (*v1beta1.CheckResponse, error)
type ContinuationToken ¶
type ContinuationToken string
type CreateRelationshipsUsecase ¶
type CreateRelationshipsUsecase struct {
// contains filtered or unexported fields
}
func NewCreateRelationshipsUsecase ¶
func NewCreateRelationshipsUsecase(repo ZanzibarRepository, logger log.Logger) *CreateRelationshipsUsecase
func (*CreateRelationshipsUsecase) CreateRelationships ¶
func (rc *CreateRelationshipsUsecase) CreateRelationships(ctx context.Context, r []*v1beta1.Relationship, touch bool) error
type DeleteRelationshipsUsecase ¶
type DeleteRelationshipsUsecase struct {
// contains filtered or unexported fields
}
func NewDeleteRelationshipsUsecase ¶
func NewDeleteRelationshipsUsecase(repo ZanzibarRepository, logger log.Logger) *DeleteRelationshipsUsecase
func (*DeleteRelationshipsUsecase) DeleteRelationships ¶
func (rc *DeleteRelationshipsUsecase) DeleteRelationships(ctx context.Context, r *v1beta1.RelationTupleFilter) error
type GetResourcesUsecase ¶
type GetResourcesUsecase struct {
// contains filtered or unexported fields
}
func NewGetResourcesUseCase ¶
func NewGetResourcesUseCase(repo ZanzibarRepository) *GetResourcesUsecase
func (*GetResourcesUsecase) Get ¶
func (r *GetResourcesUsecase) Get(ctx context.Context, req *v1beta1.LookupResourcesRequest) (chan *ResourceResult, chan error, error)
type GetSubjectsUsecase ¶
type GetSubjectsUsecase struct {
// contains filtered or unexported fields
}
func NewGetSubjectsUseCase ¶
func NewGetSubjectsUseCase(repo ZanzibarRepository) *GetSubjectsUsecase
func (*GetSubjectsUsecase) Get ¶
func (s *GetSubjectsUsecase) Get(ctx context.Context, req *v1beta1.LookupSubjectsRequest) (chan *SubjectResult, chan error, error)
type ImportBulkTuplesUsecase ¶
type ImportBulkTuplesUsecase struct {
// contains filtered or unexported fields
}
func NewImportBulkTuplesUsecase ¶
func NewImportBulkTuplesUsecase(repo ZanzibarRepository, logger log.Logger) *ImportBulkTuplesUsecase
func (*ImportBulkTuplesUsecase) ImportBulkTuples ¶
func (rc *ImportBulkTuplesUsecase) ImportBulkTuples(client grpc.ClientStreamingServer[v1beta1.ImportBulkTuplesRequest, v1beta1.ImportBulkTuplesResponse]) error
type IsBackendAvaliableUsecase ¶
type IsBackendAvaliableUsecase struct {
// contains filtered or unexported fields
}
func NewIsBackendAvailableUsecase ¶
func NewIsBackendAvailableUsecase(repo ZanzibarRepository) *IsBackendAvaliableUsecase
func (*IsBackendAvaliableUsecase) IsBackendAvailable ¶
func (rc *IsBackendAvaliableUsecase) IsBackendAvailable() error
type ReadRelationshipsUsecase ¶
type ReadRelationshipsUsecase struct {
// contains filtered or unexported fields
}
func NewReadRelationshipsUsecase ¶
func NewReadRelationshipsUsecase(repo ZanzibarRepository, logger log.Logger) *ReadRelationshipsUsecase
func (*ReadRelationshipsUsecase) ReadRelationships ¶
func (rc *ReadRelationshipsUsecase) ReadRelationships(ctx context.Context, req *v1beta1.ReadTuplesRequest) (chan *RelationshipResult, chan error, error)
type RelationshipResult ¶
type RelationshipResult struct { Relationship *v1beta1.Relationship Continuation ContinuationToken }
type ResourceResult ¶
type ResourceResult struct { Resource *v1beta1.ObjectReference Continuation ContinuationToken }
type SubjectResult ¶
type SubjectResult struct { Subject *v1beta1.SubjectReference Continuation ContinuationToken }
type TouchSemantics ¶
type TouchSemantics bool
relationship domain objects re-used from the api layer for now, but otherwise would be defined here
type ZanzibarRepository ¶
type ZanzibarRepository interface { Check(ctx context.Context, request *v1beta1.CheckRequest) (*v1beta1.CheckResponse, error) CreateRelationships(context.Context, []*v1beta1.Relationship, TouchSemantics) error ReadRelationships(ctx context.Context, filter *v1beta1.RelationTupleFilter, limit uint32, continuation ContinuationToken) (chan *RelationshipResult, chan error, error) DeleteRelationships(context.Context, *v1beta1.RelationTupleFilter) error LookupSubjects(ctx context.Context, subjectType *v1beta1.ObjectType, subject_relation, relation string, resource *v1beta1.ObjectReference, limit uint32, continuation ContinuationToken) (chan *SubjectResult, chan error, error) LookupResources(ctx context.Context, resouce_type *v1beta1.ObjectType, relation string, subject *v1beta1.SubjectReference, limit uint32, continuation ContinuationToken) (chan *ResourceResult, chan error, error) IsBackendAvailable() error ImportBulkTuples(stream grpc.ClientStreamingServer[v1beta1.ImportBulkTuplesRequest, v1beta1.ImportBulkTuplesResponse]) error }
Click to show internal directories.
Click to hide internal directories.