feat(domain):lab4 add attachments, status, errors

This commit is contained in:
Голиков Maximillian Антон
2026-10-19 10:25:52 +03:00
parent 4441156621
commit 200615f5ba
4 changed files with 61 additions and 8 deletions
+10
View File
@@ -35,3 +35,13 @@ type SessionRepository interface {
GetByTokenHash(ctx context.Context, tokenHash []byte) (*Session, error)
DeleteByTokenHash(ctx context.Context, tokenHash []byte) error
}
type AttachmentRepository interface {
Create(ctx context.Context, a *Attachment) error
GetByID(ctx context.Context, id string) (*Attachment, error)
MarkReady(ctx context.Context, id string) error
MarkFailed(ctx context.Context, id string, errorCode string) error
ListStalePending(ctx context.Context, olderThan time.Time, limit int) ([]Attachment, error)
ExistingKeys(ctx context.Context, keys []string) ([]string, error)
DeletePending(ctx context.Context, id string) error
}