feat(domain):lab4 add attachments, status, errors
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user