aliyun

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAliYun

func NewAliYun(opts ...Option) storage.Storage

Types

type AliYun

type AliYun struct {
	// contains filtered or unexported fields
}

func (*AliYun) Delete

func (a *AliYun) Delete(key string) error

Delete 删除文件

func (*AliYun) Init

func (a *AliYun) Init() error

func (*AliYun) String

func (a *AliYun) String() string

func (*AliYun) Upload

func (a *AliYun) Upload(file *multipart.FileHeader, work ...string) (*storage.Resource, error)

Upload 上传文件

type Option

type Option func(*Options)

func WithAccessKey

func WithAccessKey(key string) Option

func WithBucket

func WithBucket(bucket string) Option

func WithClassType

func WithClassType(class string) Option

func WithEndpoint

func WithEndpoint(endpoint string) Option

func WithPath

func WithPath(path string) Option

func WithSecretKey

func WithSecretKey(key string) Option

type Options

type Options struct {
	Path      string
	Bucket    string
	AclType   string
	Endpoint  string
	AccessKey string
	SecretKey string
	ClassType string
}

Jump to

Keyboard shortcuts

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