18 lines
495 B
Go
18 lines
495 B
Go
package attachment
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
type AttachmentRepository interface {
|
|
// Enqueue checks the staging object under the collector's lock before committing its job.
|
|
Enqueue(ctx context.Context, attachment Attachment, stage string, checkStage func() error) error
|
|
GetForMember(ctx context.Context, attachmentID, actorID uuid.UUID) (Attachment, error)
|
|
}
|
|
|
|
type ChatMembership interface {
|
|
IsMember(ctx context.Context, chatID, actorID uuid.UUID) (bool, error)
|
|
}
|