uploader

package
v4.25.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultRootDir = "/tmp/mars-uploads"
View Source
var DirSizeCacheSeconds = int((15 * time.Minute).Seconds())

Functions

func NewCacheUploader added in v4.20.8

func NewCacheUploader(uploader contracts.Uploader, cache func() contracts.CacheInterface) contracts.Uploader

func NewFileInfo

func NewFileInfo[T uint64 | int64 | int](path string, size T, lastModified time.Time) *fileInfo

func NewS3

func NewS3(client *minio.Client, bucket string, uploader contracts.Uploader, rootDir string) contracts.Uploader

NewS3 rootDir 必须要,不然在 DeleteDir 的时候如果传空会报错

func NewUploader

func NewUploader(rootDir string, disk string) (contracts.Uploader, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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