controller

package
v0.0.0-...-9d843bf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

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

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 (*AttachmentControllerImpl) DeleteByID

func (impl *AttachmentControllerImpl) DeleteByID(ctx context.Context, id primitive.ObjectID) error

func (*AttachmentControllerImpl) GetByID

func (*AttachmentControllerImpl) ListAsSelectOptionByFilter

func (*AttachmentControllerImpl) PermanentlyDeleteByID

func (impl *AttachmentControllerImpl) PermanentlyDeleteByID(ctx context.Context, id primitive.ObjectID) error

func (*AttachmentControllerImpl) UpdateByID

type AttachmentCreateRequestIDO

type AttachmentCreateRequestIDO struct {
	Name          string
	Description   string
	OwnershipID   primitive.ObjectID
	OwnershipType int8
	FileName      string
	FileType      string
	File          multipart.File
}

type AttachmentUpdateRequestIDO

type AttachmentUpdateRequestIDO struct {
	ID            primitive.ObjectID
	Name          string
	Description   string
	OwnershipID   primitive.ObjectID
	OwnershipType int8
	FileName      string
	FileType      string
	File          multipart.File
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL