filemanager

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Endpoint   string `yaml:"endpoint"`
	AccessKey  string `yaml:"access_key"`
	SecretKey  string `yaml:"secret_key"`
	BucketName string `yaml:"bucket_name"`
}

云存储才需要

type File added in v0.2.4

type File struct {
	Name         string
	Size         int64
	ContentType  string    // Mime类型
	ModTime      time.Time // 最后修改时间
	ETag         string    // 文件的唯一标识符(通常是 MD5 或类似的散列值)
	Owner        string    //
	StorageClass string    // 文件的存储类型(如 "STANDARD", "REDUCED_REDUNDANCY")
}

文件信息

type Filemanager added in v0.2.4

type Filemanager interface {
	Upload(filePath string) (*File, error)
	Download(fileName string) (*File, error)
	Delete(fileName string) error
	List() ([]File, error)
	Get(fileName string) (*File, error)
	Rename(oldName, newName string) error
	Copy(sourceFileName, destFileName string) error
	Move(sourceFileName, destFileName string) error
}

文件管理接口

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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