kodo

package
v3.5.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKodo

func NewKodo() (s3.Interface, error)

Types

type Kodo

type Kodo struct {
	AccessKey     string
	SecretKey     string
	Region        string
	Token         string
	Endpoint      string
	BucketURL     string
	Auth          *auth.Credentials
	Client        *awss3.Client
	PresignClient *awss3.PresignClient
}

func (Kodo) AbortMultipartUpload

func (k Kodo) AbortMultipartUpload(ctx context.Context, uploadID string, name string) error

func (Kodo) AccessURL

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

func (Kodo) AuthSign

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

func (Kodo) CompleteMultipartUpload

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

func (Kodo) CopyObject

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

func (Kodo) DeleteObject

func (k Kodo) DeleteObject(ctx context.Context, name string) error

func (Kodo) Engine

func (k Kodo) Engine() string

func (Kodo) InitiateMultipartUpload

func (k Kodo) InitiateMultipartUpload(ctx context.Context, name string) (*s3.InitiateMultipartUploadResult, error)

func (Kodo) IsNotFound

func (k Kodo) IsNotFound(err error) bool

func (Kodo) ListUploadedParts

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

func (Kodo) PartLimit

func (k Kodo) PartLimit() *s3.PartLimit

func (Kodo) PartSize

func (k Kodo) PartSize(ctx context.Context, size int64) (int64, error)

func (Kodo) PresignedPutObject

func (k Kodo) PresignedPutObject(ctx context.Context, name string, expire time.Duration) (string, error)

func (*Kodo) SetObjectContentType

func (k *Kodo) SetObjectContentType(ctx context.Context, name string, contentType string) error

func (Kodo) StatObject

func (k Kodo) 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