s3

package
v0.11.3 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2018 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultRetries = 3

DefaultRetries is the number of retries for a S3 upload until an error is raised

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a S3 uploader client

func NewClient

func NewClient(logger Logger) (*Client, error)

NewClient returns a new S3 Client, configuration is read from env variables or configuration files, see https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html

func (*Client) Upload

func (c *Client) Upload(file string, dest string) (string, error)

Upload uploads a file to an s3 bucket, On success it returns the URL to the file.

type Logger

type Logger interface {
	Debugln(v ...interface{})
	DebugEnabled() bool
}

Logger defines the interface for an S3 logger

Jump to

Keyboard shortcuts

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