aws

package
v0.0.0-...-5e5f065 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: ISC Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnableToOpenFile    = fmt.Errorf("unable to open file")
	ErrUnableToDecode      = fmt.Errorf("unable to decode file")
	ErrUnableToEncode      = fmt.Errorf("unable to encode file")
	ErrUnsupportedFileType = fmt.Errorf("unsupported file type")
	ErrUnableToUploadFile  = fmt.Errorf("unable to upload file")
	ErrFileTooLarge        = fmt.Errorf("file too large")
)

Functions

func DeleteProjectImage

func DeleteProjectImage(filename string) error

func DeleteUserImage

func DeleteUserImage(filename string) error

func NewAWSService

func NewAWSService() error

func UploadProjectImage

func UploadProjectImage(projectID uint, file *multipart.FileHeader) (string, error)

func UploadUserImage

func UploadUserImage(userID uint, file *multipart.FileHeader) (string, error)

Types

type AWSService

type AWSService struct {
	// contains filtered or unexported fields
}
var AWS *AWSService

func (*AWSService) DeleteFile

func (svc *AWSService) DeleteFile(key string) error

func (*AWSService) UploadFile

func (svc *AWSService) UploadFile(key string, file multipart.File) (string, error)

Jump to

Keyboard shortcuts

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