s3

package
v0.0.0-...-a735c6b Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2021 License: Apache-2.0 Imports: 9 Imported by: 1

README

Integration test

Integration tests are part of the set of tests you should run in order to validate your application. For the purpose of S3, you should create a .env file like the one below:

BACKUP_AWS_ACCESS_KEY_ID=
BACKUP_AWS_SECRET_ACCESS_KEY=
BACKUP_AWS_REGION=us-east-1
BACKUP_BUCKET=mybucket
BACKUP_LOCATION=/tmp/demo.txt

To run the tests, execute the command like the one below:

go test . -v -tags=integration

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
}

Storage is the default storage for S3

func NewStorage

func NewStorage() *Storage

NewStorage takes a S3 connection and creates a default storage

func (*Storage) Delete

func (s *Storage) Delete(request *openapi.BackupRequest) error

Delete deletes a file from S3

func (*Storage) Pull

func (s *Storage) Pull(request *openapi.BackupRequest, filename string) error

Pull pull a file from S3, using a different location if necessary

func (*Storage) Push

func (s *Storage) Push(request *openapi.BackupRequest, filename string) error

Push pushes a file to S3

Jump to

Keyboard shortcuts

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