Documentation ¶
Index ¶
- type Aliyun
- func (a *Aliyun) Delete(ctx context.Context, fileKey string) error
- func (a *Aliyun) GetAttachmentType() consts.AttachmentType
- func (a *Aliyun) GetFilePath(ctx context.Context, relativePath string) (string, error)
- func (a *Aliyun) Upload(ctx context.Context, fileHeader *multipart.FileHeader) (*dto.AttachmentDTO, error)
- type LocalFileStorage
- func (l *LocalFileStorage) Delete(ctx context.Context, fileKey string) error
- func (l *LocalFileStorage) GetAttachmentType() consts.AttachmentType
- func (l *LocalFileStorage) GetFilePath(ctx context.Context, relativePath string) (string, error)
- func (l *LocalFileStorage) Upload(ctx context.Context, fileHeader *multipart.FileHeader) (*dto.AttachmentDTO, error)
- type MinIO
- func (m *MinIO) Delete(ctx context.Context, fileKey string) error
- func (m *MinIO) GetAttachmentType() consts.AttachmentType
- func (m *MinIO) GetFilePath(ctx context.Context, relativePath string) (string, error)
- func (m *MinIO) Upload(ctx context.Context, fileHeader *multipart.FileHeader) (*dto.AttachmentDTO, error)
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) GetAttachmentType ¶
func (a *Aliyun) GetAttachmentType() consts.AttachmentType
func (*Aliyun) GetFilePath ¶
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 (*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) GetAttachmentType ¶
func (m *MinIO) GetAttachmentType() consts.AttachmentType
func (*MinIO) GetFilePath ¶
func (*MinIO) Upload ¶
func (m *MinIO) Upload(ctx context.Context, fileHeader *multipart.FileHeader) (*dto.AttachmentDTO, error)
Click to show internal directories.
Click to hide internal directories.