s3wrapper

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBucket

func CreateBucket(cfg *Config) error

func NewS3Client

func NewS3Client(cfg *Config) (*s3.S3, error)

NewS3Client creates new s3 client using default config along with defined env variables

func NewS3Session

func NewS3Session(cfg *Config) (*session.Session, error)

Types

type Config

type Config struct {
	S3EndpointURL      string `envconfig:"S3_ENDPOINT_URL" default:"http://cloudserver-front:8000"`
	Region             string `envconfig:"S3_REGION" default:"us-east-1"`
	S3Bucket           string `envconfig:"S3_BUCKET" default:"test"`
	AwsAccessKeyID     string `envconfig:"AWS_ACCESS_KEY_ID" default:"accessKey1"`
	AwsSecretAccessKey string `envconfig:"AWS_SECRET_ACCESS_KEY" default:"verySecretKey1"`
}

Jump to

Keyboard shortcuts

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