s3

package
v0.0.0-...-ab08451 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	GetObject(bucketName, objectName string) (Object, error)
	RemoveObject(bucketName, key string) error
}

Client is a interface to interact with a S3 object store

func New

func New(config *Config) (Client, error)

New creates a new s3 client which is a wrapper of the minio client

type Config

type Config struct {
	Endpoint   string
	SSL        bool
	BucketName string
	AccessKey  string
	SecretKey  string
}

Config holds connection information for a s3 object storage

func FromConfig

func FromConfig(s3 *config.S3) *Config

type Object

type Object interface {
	io.Reader
	Stat() (minio.ObjectInfo, error)
	Close() error
}

Object represents an s3 object that can be retrieved from an object store

Directories

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

Jump to

Keyboard shortcuts

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