file

package
v0.0.0-...-702f6d9 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSClient

type AWSClient struct {
	Settings config.AWSSettings
	// contains filtered or unexported fields
}

func (*AWSClient) DeleteFile

func (aw *AWSClient) DeleteFile(fileURL string) *errors.Error

func (*AWSClient) GetFileURL

func (aw *AWSClient) GetFileURL(fileURL string) *string

func (*AWSClient) UploadFile

func (aw *AWSClient) UploadFile(folder string, fileHeader *multipart.FileHeader, allowedTypes []FileType) (*models.FileInfo, *errors.Error)

type FileClientInterface

type FileClientInterface interface {
	GetFileURL(fileURL string) *string
	UploadFile(folder string, fileHeader *multipart.FileHeader, allowedTypes []FileType) (*models.FileInfo, *errors.Error)
	DeleteFile(fileURL string) *errors.Error
}

func NewAWSProvider

func NewAWSProvider(settings config.AWSSettings) FileClientInterface

type FileType

type FileType string
const (
	IMAGE       FileType = "image"
	VIDEO       FileType = "video"
	AUDIO       FileType = "audio"
	DOCUMENT    FileType = "document"
	APPLICATION FileType = "application"
	TEXT        FileType = "text"
	ALL         FileType = "all"
)

Jump to

Keyboard shortcuts

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