Documentation
¶
Index ¶
- func ValidateCreateRequest(dirtyData *AttachmentCreateRequestIDO) error
- func ValidateUpdateRequest(dirtyData *AttachmentUpdateRequestIDO) error
- type AttachmentController
- type AttachmentControllerImpl
- func (impl *AttachmentControllerImpl) Create(ctx context.Context, req *AttachmentCreateRequestIDO) (*a_d.Attachment, error)
- func (impl *AttachmentControllerImpl) DeleteByID(ctx context.Context, id primitive.ObjectID) error
- func (c *AttachmentControllerImpl) GetByID(ctx context.Context, id primitive.ObjectID) (*domain.Attachment, error)
- func (c *AttachmentControllerImpl) ListAsSelectOptionByFilter(ctx context.Context, f *domain.AttachmentListFilter) ([]*domain.AttachmentAsSelectOption, error)
- func (c *AttachmentControllerImpl) ListByFilter(ctx context.Context, f *domain.AttachmentListFilter) (*domain.AttachmentListResult, error)
- func (impl *AttachmentControllerImpl) PermanentlyDeleteAllByAssociateID(ctx context.Context, associateID primitive.ObjectID) error
- func (impl *AttachmentControllerImpl) PermanentlyDeleteAllByCustomerID(ctx context.Context, customerID primitive.ObjectID) error
- func (impl *AttachmentControllerImpl) PermanentlyDeleteByID(ctx context.Context, id primitive.ObjectID) error
- func (c *AttachmentControllerImpl) UpdateByID(ctx context.Context, req *AttachmentUpdateRequestIDO) (*domain.Attachment, error)
- type AttachmentCreateRequestIDO
- type AttachmentUpdateRequestIDO
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateCreateRequest ¶
func ValidateCreateRequest(dirtyData *AttachmentCreateRequestIDO) error
func ValidateUpdateRequest ¶
func ValidateUpdateRequest(dirtyData *AttachmentUpdateRequestIDO) error
Types ¶
type AttachmentController ¶
type AttachmentController interface { Create(ctx context.Context, req *AttachmentCreateRequestIDO) (*domain.Attachment, error) GetByID(ctx context.Context, id primitive.ObjectID) (*domain.Attachment, error) UpdateByID(ctx context.Context, ns *AttachmentUpdateRequestIDO) (*domain.Attachment, error) ListByFilter(ctx context.Context, f *domain.AttachmentListFilter) (*domain.AttachmentListResult, error) ListAsSelectOptionByFilter(ctx context.Context, f *domain.AttachmentListFilter) ([]*domain.AttachmentAsSelectOption, error) DeleteByID(ctx context.Context, id primitive.ObjectID) error PermanentlyDeleteByID(ctx context.Context, id primitive.ObjectID) error PermanentlyDeleteAllByCustomerID(ctx context.Context, customerID primitive.ObjectID) error PermanentlyDeleteAllByAssociateID(ctx context.Context, associateID primitive.ObjectID) error }
AttachmentController Interface for attachment business logic controller.
func NewController ¶
func NewController( appCfg *config.Conf, loggerp *slog.Logger, uuidp uuid.Provider, kmux kmutex.Provider, s3 s3_storage.S3Storager, emailer mg.Emailer, client *mongo.Client, org_storer attachment_s.AttachmentStorer, com_storer com_s.CommentStorer, usr_storer user_s.UserStorer, c_storer c_s.CustomerStorer, a_storer a_s.AssociateStorer, o_storer o_s.OrderStorer, s_storer s_s.StaffStorer, ) AttachmentController
type AttachmentControllerImpl ¶
type AttachmentControllerImpl struct { Config *config.Conf Logger *slog.Logger UUID uuid.Provider Kmutex kmutex.Provider S3 s3_storage.S3Storager Emailer mg.Emailer DbClient *mongo.Client AttachmentStorer attachment_s.AttachmentStorer CommentStorer com_s.CommentStorer UserStorer user_s.UserStorer CustomerStorer c_s.CustomerStorer AssociateStorer a_s.AssociateStorer OrderStorer o_s.OrderStorer StaffStorer s_s.StaffStorer }
func (*AttachmentControllerImpl) Create ¶
func (impl *AttachmentControllerImpl) Create(ctx context.Context, req *AttachmentCreateRequestIDO) (*a_d.Attachment, error)
func (*AttachmentControllerImpl) DeleteByID ¶
DeleteByID function archives the attachment and creates a comment of the log.
func (*AttachmentControllerImpl) GetByID ¶
func (c *AttachmentControllerImpl) GetByID(ctx context.Context, id primitive.ObjectID) (*domain.Attachment, error)
func (*AttachmentControllerImpl) ListAsSelectOptionByFilter ¶
func (c *AttachmentControllerImpl) ListAsSelectOptionByFilter(ctx context.Context, f *domain.AttachmentListFilter) ([]*domain.AttachmentAsSelectOption, error)
func (*AttachmentControllerImpl) ListByFilter ¶
func (c *AttachmentControllerImpl) ListByFilter(ctx context.Context, f *domain.AttachmentListFilter) (*domain.AttachmentListResult, error)
func (*AttachmentControllerImpl) PermanentlyDeleteAllByAssociateID ¶
func (*AttachmentControllerImpl) PermanentlyDeleteAllByCustomerID ¶
func (*AttachmentControllerImpl) PermanentlyDeleteByID ¶
func (*AttachmentControllerImpl) UpdateByID ¶
func (c *AttachmentControllerImpl) UpdateByID(ctx context.Context, req *AttachmentUpdateRequestIDO) (*domain.Attachment, error)
Click to show internal directories.
Click to hide internal directories.