attachment

package
v0.0.0-...-585669d Latest Latest
Warning

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

Go to latest
Published: May 26, 2022 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LocalHostType = "local"
)
View Source
const (
	S3HostType = "s3"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler interface {
	HostType() string
	Put(fileData string) (string, error)
	Get(identifier string) (string, error)
	Delete(identifier string) error
	SetTTL(identifier string, ttl int64) error
	Cleanup() error
	DropAll() error
	ListTimetable() ([]string, error)
}

func NewAttachmentHandler

func NewAttachmentHandler(hostType string) Handler

NewAttachmentHandler will create a new handler based on the given type

func NewLocalTempHandler

func NewLocalTempHandler(defaultTTL int64, storagePath string) Handler

func NewS3Handler

func NewS3Handler(defaultTTL int64, bucketName string, bucketRegion string, endpoint string, options *minio.Options) Handler

Jump to

Keyboard shortcuts

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