api

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Config *aws.Config
	Client *s3.Client
}

API is main struct of S3.

func (API) DeleteObject

func (a API) DeleteObject(options *DeleteObjectOptions) (*s3.DeleteObjectOutput, error)

DeleteObject deletes object from S3.

func (API) GetObject

func (a API) GetObject(options *GetObjectOptions) (*s3.GetObjectOutput, error)

GetObject gets object from S3.

func (API) ListObjectVersions

func (a API) ListObjectVersions(options *ListObjectVersionsOptions) (*s3.ListObjectVersionsOutput, error)

ListObjectVersions gets object versions from S3.

func (API) ListObjects

func (a API) ListObjects(options *ListObjectOptions) (*s3.ListObjectsV2Output, error)

ListObjects gets object from S3.

func (API) PutObject

func (a API) PutObject(options *PutObjectOptions) (*s3.PutObjectOutput, error)

PutObject puts object to S3.

type DeleteObjectOptions

type DeleteObjectOptions struct {
	Bucket,
	Path string
}

DeleteObjectOptions is options for API call.

type GetObjectOptions

type GetObjectOptions struct {
	Bucket,
	Path string
	VersionID *string
}

GetObjectOptions is options for API call.

type Interface

type Interface interface {
	GetObject(options *GetObjectOptions) (*s3.GetObjectOutput, error)
	ListObjectVersions(options *ListObjectVersionsOptions) (*s3.ListObjectVersionsOutput, error)
	ListObjects(options *ListObjectOptions) (*s3.ListObjectsV2Output, error)
	PutObject(options *PutObjectOptions) (*s3.PutObjectOutput, error)
	DeleteObject(options *DeleteObjectOptions) (*s3.DeleteObjectOutput, error)
}

Interface is an interface for API.

func NewAPI

func NewAPI() (Interface, error)

NewAPI inits new API.

type ListObjectOptions

type ListObjectOptions struct {
	Bucket,
	Path string
}

ListObjectOptions is options for API call.

type ListObjectVersionsOptions

type ListObjectVersionsOptions struct {
	Bucket,
	Path string
}

ListObjectVersionsOptions is options for API call.

type PutObjectOptions

type PutObjectOptions struct {
	Bucket,
	Path string
	Value       io.Reader
	EncodedTags string
}

PutObjectOptions is options for API call.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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