biz

package
v0.0.0-...-4095cf5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

README

Biz

Documentation

Index

Constants

View Source
const (
	MaxStreamingCount uint32 = 1000
)

Variables

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

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

type GetResourcesUsecase

type GetResourcesUsecase struct {
	// contains filtered or unexported fields
}

func NewGetResourcesUseCase

func NewGetResourcesUseCase(repo ZanzibarRepository) *GetResourcesUsecase

func (*GetResourcesUsecase) Get

type GetSubjectsUsecase

type GetSubjectsUsecase struct {
	// contains filtered or unexported fields
}

func NewGetSubjectsUseCase

func NewGetSubjectsUseCase(repo ZanzibarRepository) *GetSubjectsUsecase

func (*GetSubjectsUsecase) Get

type ImportBulkTuplesUsecase

type ImportBulkTuplesUsecase struct {
	// contains filtered or unexported fields
}

func NewImportBulkTuplesUsecase

func NewImportBulkTuplesUsecase(repo ZanzibarRepository, logger log.Logger) *ImportBulkTuplesUsecase

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
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL