gcp

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: 11 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 GCP, you should create a .env file like the one below:

BACKUP_BUCKET=mybucket
BACKUP_LOCATION=demo.txt
GOOGLE_APPLICATION_CREDENTIALS='{"type": "service_account", "project_id": ...}'

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 the blackhole

func (*Storage) Pull

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

Pull pull a file from the blackhole

func (*Storage) Push

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

Push pushes a file to blaqhole bucket

Jump to

Keyboard shortcuts

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