s3api

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 3 Imported by: 4

Documentation

Overview

Package s3api provides abstracted S3 API interface to support multiple major version of aws-sdk-go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbortMultipartUploadInput

type AbortMultipartUploadInput struct {
	Bucket   *string
	Key      *string
	UploadID *string
}

AbortMultipartUploadInput represents input of AbortMultipartUpload API.

type AbortMultipartUploadOutput

type AbortMultipartUploadOutput struct{}

AbortMultipartUploadOutput represents output of AbortMultipartUpload API.

type CompleteMultipartUploadInput

type CompleteMultipartUploadInput struct {
	Bucket         *string
	Key            *string
	CompletedParts []*CompletedPart
	UploadID       *string
}

CompleteMultipartUploadInput represents input of CompleteMultipartUpload API.

type CompleteMultipartUploadOutput

type CompleteMultipartUploadOutput struct {
	VersionID *string
	ETag      *string
	Location  *string
}

CompleteMultipartUploadOutput represents output of CompleteMultipartUpload API.

type CompletedPart

type CompletedPart struct {
	ETag       *string
	PartNumber *int64
}

CompletedPart represents completed upload part.

type CreateMultipartUploadInput

type CreateMultipartUploadInput struct {
	Bucket      *string
	Key         *string
	ACL         *string
	ContentType *string
}

CreateMultipartUploadInput represents input of CreateMultipartUpload API.

type CreateMultipartUploadOutput

type CreateMultipartUploadOutput struct {
	UploadID *string
}

CreateMultipartUploadOutput represents output of CreateMultipartUpload API.

type DeleteAPI

type DeleteAPI interface {
	DeleteObject(ctx context.Context, input *DeleteObjectInput) (*DeleteObjectOutput, error)
}

DeleteAPI interface.

type DeleteObjectInput

type DeleteObjectInput struct {
	Bucket    *string
	Key       *string
	VersionID *string
}

DeleteObjectInput represents input of Delete API.

type DeleteObjectOutput

type DeleteObjectOutput struct {
	VersionID *string
}

DeleteObjectOutput represents output of Delete API.

type DownloadAPI

type DownloadAPI interface {
	GetObject(ctx context.Context, input *GetObjectInput) (*GetObjectOutput, error)
}

DownloadAPI interface.

type GetObjectInput

type GetObjectInput struct {
	Bucket    *string
	Key       *string
	Range     *string
	VersionID *string
}

GetObjectInput represents input of GetObject API.

type GetObjectOutput

type GetObjectOutput struct {
	Body          io.ReadCloser
	ContentType   *string
	ContentLength *int64
	ContentRange  *string
	ETag          *string
	LastModified  *time.Time
	VersionID     *string
}

GetObjectOutput represents output of GetObject API.

type ListAPI

type ListAPI interface {
	ListObjectsV2(ctx context.Context, input *ListObjectsV2Input) (*ListObjectsV2Output, error)
}

ListAPI interface.

type ListObjectsV2Input

type ListObjectsV2Input struct {
	Bucket            *string
	ContinuationToken *string
	MaxKeys           int
	Prefix            *string
}

ListObjectsV2Input represents input of List API.

type ListObjectsV2Output

type ListObjectsV2Output struct {
	Contents              []Object
	KeyCount              int
	NextContinuationToken *string
}

ListObjectsV2Output represents output of List API.

type Object

type Object struct {
	ETag         *string
	Key          *string
	LastModified *time.Time
	Size         int64
}

Object represents S3 object.

type PutObjectInput

type PutObjectInput struct {
	Bucket      *string
	Key         *string
	ACL         *string
	Body        io.ReadSeeker
	ContentType *string
}

PutObjectInput represents input of PutObject API.

type PutObjectOutput

type PutObjectOutput struct {
	VersionID *string
	ETag      *string
	Location  *string
}

PutObjectOutput represents output of PutObject API.

type S3API

type S3API interface {
	UpDownloadAPI
	DeleteAPI
	ListAPI
}

S3API is the interface that groups all S3 APIs.

type UpDownloadAPI

type UpDownloadAPI interface {
	UploadAPI
	DownloadAPI
}

UpDownloadAPI is the interface that groups Upload and Download APIs.

type UploadAPI

type UploadAPI interface {
	CreateMultipartUpload(ctx context.Context, input *CreateMultipartUploadInput) (*CreateMultipartUploadOutput, error)
	UploadPart(ctx context.Context, input *UploadPartInput) (*UploadPartOutput, error)
	AbortMultipartUpload(ctx context.Context, input *AbortMultipartUploadInput) (*AbortMultipartUploadOutput, error)
	CompleteMultipartUpload(ctx context.Context, input *CompleteMultipartUploadInput) (*CompleteMultipartUploadOutput, error)
	PutObject(ctx context.Context, input *PutObjectInput) (*PutObjectOutput, error)
}

UploadAPI interface.

type UploadPartInput

type UploadPartInput struct {
	Body       io.ReadSeeker
	Bucket     *string
	Key        *string
	PartNumber *int64
	UploadID   *string
}

UploadPartInput represents input of UploadPart API.

type UploadPartOutput

type UploadPartOutput struct {
	ETag *string
}

UploadPartOutput represents output of UploadPart API.

Jump to

Keyboard shortcuts

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