ossx

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

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OssAliyun

type OssAliyun struct {
	AccessKeyId     string
	AccessKeySecret string
	NameBucket      string
	Expires         int
	Client          *oss.Client
	Bucket          *oss.Bucket
}

阿里OSS

func NewOssAliyun

func NewOssAliyun(expires int, end_point, name_bucket, access_key_id, access_key_secret string) *OssAliyun

func (*OssAliyun) BucketList

func (t *OssAliyun) BucketList() (_buckets []string, _err error)

func (*OssAliyun) DeleteAllFiles

func (t *OssAliyun) DeleteAllFiles() (_err error)

func (*OssAliyun) DeleteFile

func (t *OssAliyun) DeleteFile(file_name string) (_err error)

func (*OssAliyun) GetBucketStat

func (t *OssAliyun) GetBucketStat() (_status map[string]interface{}, _err error)

func (*OssAliyun) UploadFile

func (t *OssAliyun) UploadFile(time_out time.Duration, file_path_name, prop string, file interface{}) (_file_url string, _err error)

file_path_name:应该为包含完整的相对路径 如: /22年10月/TPKEY_m_1665393213289024000_0001.jpg

type OssMinIO

type OssMinIO struct {
	AccessKeyId     string
	AccessKeySecret string
	NameBucket      string
	Expires         int
	Client          *minio.Client
}

OSS

func NewOssMinIO

func NewOssMinIO(expires int, end_point, name_bucket, access_key_id, access_key_secret string) *OssMinIO

func (*OssMinIO) DeleteAllFiles

func (t *OssMinIO) DeleteAllFiles() (_err error)

func (*OssMinIO) DeleteFile

func (t *OssMinIO) DeleteFile(file_name string) (_err error)

func (*OssMinIO) ListObjects

func (t *OssMinIO) ListObjects() (_err error)

func (*OssMinIO) UploadFile

func (t *OssMinIO) UploadFile(time_out time.Duration, file_name, prop string, file interface{}) (_file_key string, _err error)

文件名不包括相对路径

Jump to

Keyboard shortcuts

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