alicloud

package
v0.0.0-...-8b506ca Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HumanBytesLoaded

func HumanBytesLoaded(bytesLength int64) string

HumanBytesLoaded 单位转换 1023 1023Byte - 1024 1KB

Types

type OssProgressListener

type OssProgressListener struct {
}

func (*OssProgressListener) ProgressChanged

func (listener *OssProgressListener) ProgressChanged(event *oss.ProgressEvent)

type Provider

type Provider struct {
	Endpoint  string `validate:"required"`
	AccessID  string `validate:"required"`
	AccessKey string `validate:"required"`
}

Provider todo

func NewProvider

func NewProvider(endpoint, accessID, accessKey string) (*Provider, error)

NewProvider todo

func (*Provider) GetBucket

func (p *Provider) GetBucket(bucketName string) (*oss.Bucket, error)

GetBucket todo

func (*Provider) GetFile

func (p *Provider) GetFile(bucketName, objectKey, localFilePath string) error

func (*Provider) UploadFile

func (p *Provider) UploadFile(bucketName, objectKey, localFilePath, public string) error

func (*Provider) Validate

func (p *Provider) Validate() error

func (*Provider) WatchFile

func (p *Provider) WatchFile(bucketName, watchFilePrefix string, maxkeys int) error

Jump to

Keyboard shortcuts

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