Documentation
¶
Index ¶
- func NewFileRepository() domain.IFileRepository
- func NewMongoAttachmentRepository(client *mongo.Client, databaseName, collectionName string) domain.IAttachmentRepository
- type AttachmentRepository
- func (r *AttachmentRepository) Create(attachment domain.Attachment) error
- func (r *AttachmentRepository) Delete(systemID string, templateID string, ref string) error
- func (r *AttachmentRepository) Exist(systemID string, templateID string, ref string) (bool, error)
- func (r *AttachmentRepository) Find(systemID string, templateID string, ref string) (*domain.Attachment, error)
- func (r *AttachmentRepository) Update(attachment *domain.Attachment) error
- type FileRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFileRepository ¶
func NewFileRepository() domain.IFileRepository
func NewMongoAttachmentRepository ¶
func NewMongoAttachmentRepository(client *mongo.Client, databaseName, collectionName string) domain.IAttachmentRepository
NewAttachmentRepository creates a new instance of AttachmentRepository.
Types ¶
type AttachmentRepository ¶
type AttachmentRepository struct {
// contains filtered or unexported fields
}
AttachmentRepository represents a repository interface for managing attachments.
func (*AttachmentRepository) Create ¶
func (r *AttachmentRepository) Create(attachment domain.Attachment) error
Create creates a new attachment in the repository.
func (*AttachmentRepository) Delete ¶
func (r *AttachmentRepository) Delete(systemID string, templateID string, ref string) error
Delete deletes an attachment from the repository.
func (*AttachmentRepository) Find ¶
func (r *AttachmentRepository) Find(systemID string, templateID string, ref string) (*domain.Attachment, error)
Find retrieves an attachment from the repository.
func (*AttachmentRepository) Update ¶
func (r *AttachmentRepository) Update(attachment *domain.Attachment) error
Update updates an existing attachment in the repository.
type FileRepository ¶
type FileRepository struct { }
func (*FileRepository) DeleteFiles ¶
func (r *FileRepository) DeleteFiles(paths []string) error
func (*FileRepository) GetFiles ¶
func (r *FileRepository) GetFiles(paths []string) ([]domain.File, error)
func (*FileRepository) Save ¶
func (r *FileRepository) Save(file multipart.FileHeader) (string, error)
Click to show internal directories.
Click to hide internal directories.