clients

package
v0.0.0-...-95c80d3 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	S3    = 1
	Minio = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AWSClient

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

func NewAWSClient

func NewAWSClient(keyID, key, region string) (*AWSClient, error)

func (*AWSClient) AbortMultipartUpload

func (ac *AWSClient) AbortMultipartUpload(request *UploadRequest) error

func (*AWSClient) CompleteMultipartUpload

func (ac *AWSClient) CompleteMultipartUpload(request *UploadRequest, parts []*types.PartInfo, checksum string) error

func (*AWSClient) CreateMultipartUpload

func (ac *AWSClient) CreateMultipartUpload(bucket, remotePath, fileType, storageClass string) (*UploadRequest, error)

func (*AWSClient) GetObject

func (ac *AWSClient) GetObject(ctx context.Context, bucket, remotePath string, writer io.Writer) (int64, error)

func (*AWSClient) HeadObject

func (ac *AWSClient) HeadObject(bucket, remotePath string) (*types.ISOInfo, error)

func (*AWSClient) ListMultipartUploads

func (ac *AWSClient) ListMultipartUploads(bucket string) ([]*UploadRequest, error)

func (*AWSClient) PutObject

func (ac *AWSClient) PutObject(bucket, remotePath, checksum, fileType, storageClass string, reader io.ReadSeeker) error

func (*AWSClient) Upload

func (ac *AWSClient) Upload(partNo, length int64, request *UploadRequest, reader io.ReadSeeker,
	checksum string) (string, error)

type UploadRequest

type UploadRequest struct {
	Time   time.Time
	ID     string
	Bucket string
	Key    string
}

Jump to

Keyboard shortcuts

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