Documentation
¶
Index ¶
- type AttachIn
- type Attachment
- type Service
- func (s *Service) Attach(ctx context.Context, db database.TenantDB, in AttachIn) (uuid.UUID, error)
- func (s *Service) Detach(ctx context.Context, db database.TenantDB, id uuid.UUID, expectedVersion int) error
- func (s *Service) List(ctx context.Context, db database.TenantDB, ref resource.Ref) ([]Attachment, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AttachIn ¶
type AttachIn struct {
Resource resource.Ref
DocumentVersionID uuid.UUID
CommentID *uuid.UUID
WorkflowTaskID *uuid.UUID
}
AttachIn is the input to Attach.
type Attachment ¶
type Attachment struct {
ID uuid.UUID
Resource resource.Ref
DocumentVersionID uuid.UUID
CommentID *uuid.UUID
WorkflowTaskID *uuid.UUID
Status string
Version int
CreatedAt time.Time
CreatedBy uuid.UUID
}
Attachment is a persisted attachment row.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service manages attachments inside a tenant transaction.
func (*Service) Attach ¶
Attach inserts a new attachment for a resource. Pre-checks document version existence via SELECT for a clean error rather than relying on the FK violation.
Click to show internal directories.
Click to hide internal directories.