ossutil

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BucketSep = "/"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type OssAgent

type OssAgent struct {
	Region string
	// contains filtered or unexported fields
}

func NewOssAgent

func NewOssAgent(region, id, secret string) *OssAgent

func (*OssAgent) CleanObjectsWithPrefix

func (u *OssAgent) CleanObjectsWithPrefix(ctx context.Context, bucket, prefix string) (err error)

func (*OssAgent) CopyBucketFile

func (agent *OssAgent) CopyBucketFile(ctx context.Context, srcBucket, srcRelativePath, dstBucket, dstRelativePath string) (err error)

func (*OssAgent) DeleteFileObject

func (u *OssAgent) DeleteFileObject(ctx context.Context, bucket, key string) (err error)

func (*OssAgent) GetClient

func (agent *OssAgent) GetClient() *oss.Client

func (*OssAgent) ListBucketItems

func (agent *OssAgent) ListBucketItems(ctx context.Context, bucket string, relativeBucket string) (result []string, err error)

func (*OssAgent) OpenFileObject

func (u *OssAgent) OpenFileObject(ctx context.Context, bucket, key string) (*oss.ReadOnlyFile, error)

func (*OssAgent) UploadDirectory

func (agent *OssAgent) UploadDirectory(ctx context.Context, srcDir string, bucket, preName string) (err error)

func (*OssAgent) UploadFileObject

func (agent *OssAgent) UploadFileObject(ctx context.Context, srcPath, bucket, key string) (err error)

Jump to

Keyboard shortcuts

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