cos

package
v0.0.47-alpha.42 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 17 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BucketURL    string
	SecretID     string
	SecretKey    string
	SessionToken string
	PublicRead   bool
}

type Cos

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

func NewCos

func NewCos(conf Config) (*Cos, error)

func (*Cos) AbortMultipartUpload

func (c *Cos) AbortMultipartUpload(ctx context.Context, uploadID string, name string) error

func (*Cos) AccessURL

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

func (*Cos) AuthSign

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

func (*Cos) CompleteMultipartUpload

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

func (*Cos) CopyObject

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

func (*Cos) DeleteObject

func (c *Cos) DeleteObject(ctx context.Context, name string) error

func (*Cos) Engine

func (c *Cos) Engine() string

func (*Cos) FormData

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

func (*Cos) InitiateMultipartUpload

func (c *Cos) InitiateMultipartUpload(ctx context.Context, name string) (*s3.InitiateMultipartUploadResult, error)

func (*Cos) IsNotFound

func (c *Cos) IsNotFound(err error) bool

func (*Cos) ListUploadedParts

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

func (*Cos) PartLimit

func (c *Cos) PartLimit() *s3.PartLimit

func (*Cos) PartSize

func (c *Cos) PartSize(ctx context.Context, size int64) (int64, error)

func (*Cos) PresignedPutObject

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

func (*Cos) StatObject

func (c *Cos) 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