oss

package
v0.1.49 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Endpoint        string
	Bucket          string
	BucketURL       string
	AccessKeyID     string
	AccessKeySecret string
	SessionToken    string
	PublicRead      bool
}

type OSS

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

func NewOSS

func NewOSS(conf Config) (*OSS, error)

func (*OSS) AbortMultipartUpload

func (o *OSS) AbortMultipartUpload(ctx context.Context, uploadID string, name string) error

func (*OSS) AccessURL

func (o *OSS) AccessURL(ctx context.Context, name string, expire time.Duration, opt *s3.AccessURLOption) (string, error)

func (*OSS) AuthSign

func (o *OSS) AuthSign(ctx context.Context, uploadID string, name string, expire time.Duration, partNumbers []int) (*s3.AuthSignResult, error)

func (*OSS) CompleteMultipartUpload

func (o *OSS) CompleteMultipartUpload(ctx context.Context, uploadID string, name string, parts []s3.Part) (*s3.CompleteMultipartUploadResult, error)

func (*OSS) CopyObject

func (o *OSS) CopyObject(ctx context.Context, src string, dst string) (*s3.CopyObjectInfo, error)

func (*OSS) DeleteObject

func (o *OSS) DeleteObject(ctx context.Context, name string) error

func (*OSS) Engine

func (o *OSS) Engine() string

func (*OSS) FormData

func (o *OSS) FormData(ctx context.Context, name string, size int64, contentType string, duration time.Duration) (*s3.FormData, error)

func (*OSS) InitiateMultipartUpload

func (o *OSS) InitiateMultipartUpload(ctx context.Context, name string) (*s3.InitiateMultipartUploadResult, error)

func (*OSS) IsNotFound

func (o *OSS) IsNotFound(err error) bool

func (*OSS) ListUploadedParts

func (o *OSS) ListUploadedParts(ctx context.Context, uploadID string, name string, partNumberMarker int, maxParts int) (*s3.ListUploadedPartsResult, error)

func (*OSS) PartLimit

func (o *OSS) PartLimit() *s3.PartLimit

func (*OSS) PartSize

func (o *OSS) PartSize(ctx context.Context, size int64) (int64, error)

func (*OSS) PresignedPutObject

func (o *OSS) PresignedPutObject(ctx context.Context, name string, expire time.Duration) (string, error)

func (*OSS) StatObject

func (o *OSS) StatObject(ctx context.Context, name string) (*s3.ObjectInfo, error)

Jump to

Keyboard shortcuts

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