storage

package
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StorageProviderLocal = "local"
	StorageProviderS3    = "s3"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Local

type Local struct{}

func (Local) Delete

func (Local) Delete(fileKey string) error

func (Local) Save

func (Local) Save(data model.UploadFileData) (string, error)

type S3

type S3 struct{}

func (S3) Delete

func (S3) Delete(fileKey string) error

func (S3) Save

func (S3) Save(data model.UploadFileData) (string, error)

type Storer added in v1.4.1

type Storer interface {
	// Save saves a file via a storage provider
	Save(model.UploadFileData) (string, error)
	// Delete removes a file via a storage provider
	Delete(string) error
}

Storer handles file saving/deleting

Jump to

Keyboard shortcuts

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