uploader

package
v0.0.0-...-7d4b7a9 Latest Latest
Warning

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

Go to latest
Published: May 15, 2020 License: Apache-2.0 Imports: 9 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 uploader client for uploading media to S3

func NewUploader

func NewUploader(bucketName string) (*Client, error)

NewUploader creates a new uploader client

func (*Client) UploadFiles

func (c *Client) UploadFiles(ctx context.Context, mediaId string, baseDir string, files []string) error

UploadFiles uploads a list of files, the path should be absolute TODO(jaredallard): add error handling and retries

type EnvGeneric

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

A EnvAWS retrieves credentials from the environment variables of the running process. EnvAWSironment credentials never expire.

EnvGeneric variables used:

* Access Key ID: S3_ACCESS_KEY * Secret Access Key: S3_SECRET_KEY

func (*EnvGeneric) IsExpired

func (e *EnvGeneric) IsExpired() bool

IsExpired returns if the credentials have been retrieved.

func (*EnvGeneric) Retrieve

func (e *EnvGeneric) Retrieve() (credentials.Value, error)

Retrieve retrieves the keys from the environment.

Jump to

Keyboard shortcuts

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