Documentation
¶
Index ¶
- func ValidateAdministratorReason(reason string, publicAssetBaseURL *url.URL) error
- type AdministratorHooks
- func (h *AdministratorHooks) GetUsage(ctx context.Context, ownerID string) (domain.UploadUsage, error)
- func (h *AdministratorHooks) ListUploads(ctx context.Context, actorID string, filters domain.AdminUploadFilters, ...) (domain.UploadList, string, error)
- func (h *AdministratorHooks) RemoveUpload(ctx context.Context, actorID, uploadID string, reason domain.RemovalReason, ...) (domain.Upload, error)
- type CursorCodec
- func (c *CursorCodec) Decode(token, owner string, states []domain.UploadState, submission string, ...) (domain.UploadCursor, error)
- func (c *CursorCodec) DecodeAdministrator(token, actor string, filters domain.AdminUploadFilters, now time.Time) (domain.UploadCursor, error)
- func (c *CursorCodec) Encode(owner string, states []domain.UploadState, submission string, ...) (string, error)
- func (c *CursorCodec) EncodeAdministrator(actor string, filters domain.AdminUploadFilters, cursor domain.UploadCursor, ...) (string, error)
- type Service
- func (s *Service) Create(ctx context.Context, ownerID string, target domain.UploadTarget, size uint64, ...) (domain.UploadReservation, error)
- func (s *Service) Delete(ctx context.Context, ownerID, uploadID string) (domain.Upload, error)
- func (s *Service) Finalize(ctx context.Context, ownerID string, binding domain.UploadBinding) (domain.Upload, error)
- func (s *Service) List(ctx context.Context, ownerID string, states []domain.UploadState, ...) (domain.UploadList, string, error)
- func (s *Service) PublicURL(publicID string) string
- func (s *Service) PurgeAccount(ctx context.Context, user domain.User) error
- func (s *Service) RemoveAsAdministrator(ctx context.Context, actorID, uploadID string, reason domain.RemovalReason, ...) (domain.Upload, error)
- func (s *Service) SweepExpiredUploads(ctx context.Context, now time.Time, limit int) (domain.StagingSweepResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AdministratorHooks ¶
type AdministratorHooks struct {
// contains filtered or unexported fields
}
AdministratorHooks supplies metadata-only operations to AdminService. It intentionally exposes neither staging keys nor signed URLs.
func NewAdministratorHooks ¶
func NewAdministratorHooks(service *Service) *AdministratorHooks
func (*AdministratorHooks) GetUsage ¶
func (h *AdministratorHooks) GetUsage(ctx context.Context, ownerID string) (domain.UploadUsage, error)
func (*AdministratorHooks) ListUploads ¶
func (h *AdministratorHooks) ListUploads(ctx context.Context, actorID string, filters domain.AdminUploadFilters, pageToken string, pageSize uint32) (domain.UploadList, string, error)
func (*AdministratorHooks) RemoveUpload ¶
func (h *AdministratorHooks) RemoveUpload(ctx context.Context, actorID, uploadID string, reason domain.RemovalReason, expected domain.UploadState, rationale string, event domain.AuditEvent) (domain.Upload, error)
type CursorCodec ¶
type CursorCodec struct {
// contains filtered or unexported fields
}
func NewCursorCodec ¶
func NewCursorCodec(key []byte) (*CursorCodec, error)
func (*CursorCodec) Decode ¶
func (c *CursorCodec) Decode(token, owner string, states []domain.UploadState, submission string, now time.Time) (domain.UploadCursor, error)
func (*CursorCodec) DecodeAdministrator ¶
func (c *CursorCodec) DecodeAdministrator(token, actor string, filters domain.AdminUploadFilters, now time.Time) (domain.UploadCursor, error)
func (*CursorCodec) Encode ¶
func (c *CursorCodec) Encode(owner string, states []domain.UploadState, submission string, cursor domain.UploadCursor, now time.Time) (string, error)
func (*CursorCodec) EncodeAdministrator ¶
func (c *CursorCodec) EncodeAdministrator(actor string, filters domain.AdminUploadFilters, cursor domain.UploadCursor, now time.Time) (string, error)
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(repository domain.UploadRepository, objects domain.UploadStorage, cache domain.UploadCache, cursors *CursorCodec, clock domain.Clock, logger *slog.Logger, publicBaseURL string, removalPNG []byte) *Service
func (*Service) PurgeAccount ¶
func (*Service) RemoveAsAdministrator ¶
func (s *Service) RemoveAsAdministrator(ctx context.Context, actorID, uploadID string, reason domain.RemovalReason, expected domain.UploadState, rationale string, event domain.AuditEvent) (domain.Upload, error)
Click to show internal directories.
Click to hide internal directories.