s3

package
v0.0.0-...-c2ba8ab Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: Apache-2.0 Imports: 10 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 struct {
	// contains filtered or unexported fields
}

Client is an S3 client and configured Uploader.

func NewClient

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

NewClient constructs a new S3 backup upload provider client that can upload/download backups to any S3 compliant API e.g. OCI, AWS, GCE.

type Config

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

Config holds the credentials required to authenticate with an S3 compliant API.

func NewConfig

func NewConfig(storage *v1.Storage, creds map[string]string) *Config

NewConfig creates an S3 configuration based on the input parameters.

func (*Config) Validate

func (c *Config) Validate() error

Validate checks the required S3 configuration parameters are set.

type Provider

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

Provider is storage implementation of provider.Interface.

func NewStorage

func NewStorage(config *v1.Storage, creds map[string]string) (*Provider, error)

NewStorage creates a provider capable of storing and retreiving objects against the specified 's3' storage configuration and credentials.

func (*Provider) Retrieve

func (p *Provider) Retrieve(key string) (io.ReadCloser, error)

Retrieve will provide a data stream on the specified object from S3.

func (*Provider) Store

func (p *Provider) Store(key string, body io.ReadCloser) error

Store will upload the content of the data stream to S3.

Jump to

Keyboard shortcuts

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