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.AttachmentPaginationListFilter) ([]*domain.AttachmentAsSelectOption, error)
- func (c *AttachmentControllerImpl) ListByFilter(ctx context.Context, f *domain.AttachmentPaginationListFilter) (*domain.AttachmentPaginationListResult, error)
- func (impl *AttachmentControllerImpl) PermanentlyDeleteByID(ctx context.Context, id primitive.ObjectID) error
- func (impl *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.AttachmentPaginationListFilter) (*domain.AttachmentPaginationListResult, error) ListAsSelectOptionByFilter(ctx context.Context, f *domain.AttachmentPaginationListFilter) ([]*domain.AttachmentAsSelectOption, error) DeleteByID(ctx context.Context, id primitive.ObjectID) error PermanentlyDeleteByID(ctx context.Context, id primitive.ObjectID) error }
AttachmentController Interface for attachment business logic controller.
func NewController ¶
func NewController( appCfg *config.Conf, loggerp *slog.Logger, uuidp uuid.Provider, s3 s3_storage.S3Storager, emailer mg.Emailer, client *mongo.Client, org_storer attachment_s.AttachmentStorer, usr_storer user_s.UserStorer, csub_storer comicsub_s.ComicSubmissionStorer, ) AttachmentController
type AttachmentControllerImpl ¶
type AttachmentControllerImpl struct { Config *config.Conf Logger *slog.Logger UUID uuid.Provider S3 s3_storage.S3Storager DbClient *mongo.Client Emailer mg.Emailer AttachmentStorer attachment_s.AttachmentStorer UserStorer user_s.UserStorer ComicSubmissionStorer comicsub_s.ComicSubmissionStorer }
func (*AttachmentControllerImpl) Create ¶
func (impl *AttachmentControllerImpl) Create(ctx context.Context, req *AttachmentCreateRequestIDO) (*a_d.Attachment, error)
func (*AttachmentControllerImpl) DeleteByID ¶
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.AttachmentPaginationListFilter) ([]*domain.AttachmentAsSelectOption, error)
func (*AttachmentControllerImpl) ListByFilter ¶
func (c *AttachmentControllerImpl) ListByFilter(ctx context.Context, f *domain.AttachmentPaginationListFilter) (*domain.AttachmentPaginationListResult, error)
func (*AttachmentControllerImpl) PermanentlyDeleteByID ¶
func (*AttachmentControllerImpl) UpdateByID ¶
func (impl *AttachmentControllerImpl) UpdateByID(ctx context.Context, req *AttachmentUpdateRequestIDO) (*domain.Attachment, error)
Click to show internal directories.
Click to hide internal directories.