filestorageimpl

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Aliyun

type Aliyun struct {
	OptionService service.OptionService
}

func NewAliyun

func NewAliyun(optionService service.OptionService) *Aliyun

func (*Aliyun) Delete

func (a *Aliyun) Delete(ctx context.Context, fileKey string) error

func (*Aliyun) GetAttachmentType

func (a *Aliyun) GetAttachmentType() consts.AttachmentType

func (*Aliyun) GetFilePath

func (a *Aliyun) GetFilePath(ctx context.Context, relativePath string) (string, error)

func (*Aliyun) Upload

func (a *Aliyun) Upload(ctx context.Context, fileHeader *multipart.FileHeader) (*dto.AttachmentDTO, error)

type LocalFileStorage

type LocalFileStorage struct {
	Config        *config.Config
	OptionService service.OptionService
}

func NewLocalFileStorage

func NewLocalFileStorage(config *config.Config, optionService service.OptionService) *LocalFileStorage

func (*LocalFileStorage) Delete

func (l *LocalFileStorage) Delete(ctx context.Context, fileKey string) error

func (*LocalFileStorage) GetAttachmentType

func (l *LocalFileStorage) GetAttachmentType() consts.AttachmentType

func (*LocalFileStorage) GetFilePath

func (l *LocalFileStorage) GetFilePath(ctx context.Context, relativePath string) (string, error)

func (*LocalFileStorage) Upload

func (l *LocalFileStorage) Upload(ctx context.Context, fileHeader *multipart.FileHeader) (*dto.AttachmentDTO, error)

type MinIO

type MinIO struct {
	OptionService service.OptionService
}

func NewMinIO

func NewMinIO(optionService service.OptionService) *MinIO

func (*MinIO) Delete

func (m *MinIO) Delete(ctx context.Context, fileKey string) error

func (*MinIO) GetAttachmentType

func (m *MinIO) GetAttachmentType() consts.AttachmentType

func (*MinIO) GetFilePath

func (m *MinIO) GetFilePath(ctx context.Context, relativePath string) (string, error)

func (*MinIO) Upload

func (m *MinIO) Upload(ctx context.Context, fileHeader *multipart.FileHeader) (*dto.AttachmentDTO, error)

Jump to

Keyboard shortcuts

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