oss

package
v0.5.26 Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OSS

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

func New

func New(opts ...Option) *OSS

func (*OSS) ClearDirectory

func (alioss *OSS) ClearDirectory(dir string) error

func (*OSS) Provide

func (alioss *OSS) Provide(ctx context.Context) interface{}

func (*OSS) UnzipFile

func (alioss *OSS) UnzipFile(zipPath, extractPath string) error

func (*OSS) Upload

func (alioss *OSS) Upload(_ context.Context, dir string, file *multipart.FileHeader) (interface{}, error)

func (*OSS) UploadDirectoryToOSS

func (alioss *OSS) UploadDirectoryToOSS(ctx context.Context, localPath, ossDir string) ([]string, error)

type Option

type Option func(*Options)

func WithAccessKey

func WithAccessKey(accessKey string) Option

func WithBucketName

func WithBucketName(bucketName string) Option

func WithEndpoint

func WithEndpoint(endpoint string) Option

func WithSecretKey

func WithSecretKey(secretKey string) Option

type Options

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

Jump to

Keyboard shortcuts

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