Versions in this module Expand all Collapse all v1 v1.1.0 Jul 10, 2026 v1.0.0 Jul 6, 2026 Changes in this version + const PermRead + const PermWrite + type AccessEvent struct + ActorID string + DocumentID string + Sensitivity Sensitivity + VersionNo int + type AccessHook func(context.Context, AccessEvent) error + type Class struct + AllowedMIME []string + DefaultSensitivity Sensitivity + Key string + MaxBytes int64 + Module string + Retention time.Duration + type ConfirmInput struct + DeclaredChecksum string + DeclaredMIME string + DeclaredSize int64 + DocumentID uuid.UUID + StorageKey string + VersionNo int + type CreateInput struct + Class string + Resource resource.Ref + Sensitivity Sensitivity + Title string + type Download struct + MIME string + URL storage.PresignedURL + VersionNo int + type DownloadInput struct + DocumentID uuid.UUID + VersionNo int + type GrantInput struct + Access string + DocumentID uuid.UUID + GranteeKind string + GranteeRef string + ValidTo *time.Time + type Hooks struct + func NewHooks() *Hooks + func (h *Hooks) OnDocumentAccess(fn AccessHook) + func (h *Hooks) OnFileUpload(fn UploadHook) + type Registry struct + func NewRegistry() *Registry + func (r *Registry) Err() error + func (r *Registry) Get(key string) (Class, bool) + func (r *Registry) Keys() []string + func (r *Registry) Register(module string, c Class) + type Sensitivity string + const SensitivityConfidential + const SensitivityInternal + const SensitivityPublic + const SensitivityRestricted + type Service struct + func New(reg *Registry, store storage.Adapter, ev authz.Evaluator, ob outbox.Writer, ...) *Service + func (s *Service) ConfirmUpload(ctx context.Context, db database.TenantDB, in ConfirmInput) (uuid.UUID, error) + func (s *Service) Create(ctx context.Context, db database.TenantDB, in CreateInput) (uuid.UUID, error) + func (s *Service) Download(ctx context.Context, db database.TenantDB, actor authz.Actor, in DownloadInput) (Download, error) + func (s *Service) Grant(ctx context.Context, db database.TenantDB, in GrantInput) (uuid.UUID, error) + func (s *Service) InitiateUpload(ctx context.Context, db database.TenantDB, docID uuid.UUID) (UploadSession, error) + func (s *Service) Revoke(ctx context.Context, db database.TenantDB, grantID uuid.UUID) error + func (s *Service) SweepRetention(ctx context.Context, plat database.TxManager, tenantID uuid.UUID, at time.Time) (int, error) + func (s *Service) UpdateScanStatus(ctx context.Context, plat database.TxManager, tenantID, versionID uuid.UUID, ...) error + type UploadEvent struct + Class string + DocumentID string + MIME string + Sensitivity Sensitivity + SizeBytes int64 + StorageKey string + VersionNo int + type UploadHook func(context.Context, UploadEvent) error + type UploadSession struct + DocumentID uuid.UUID + StorageKey string + Upload storage.PresignedURL + VersionNo int