mock

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: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backup

type Backup struct {
	mock.Mock
}

Backup provides a mock for the database backup

func NewBackup

func NewBackup() *Backup

NewBackup instanciate a backup interface

func (*Backup) Run

func (m *Backup) Run(filename string) error

Run runs a backup and store it as the filename

type Instance

type Instance struct {
	mock.Mock
}

Instance is the default storage for S3

func NewInstance

func NewInstance() *Instance

NewInstance takes a S3 connection and creates a default storage

func (*Instance) Check

func (db *Instance) Check(retry int) error

Check wait for the instance to start

func (*Instance) Initialize

func (db *Instance) Initialize() error

Initialize creates a set of queries to connect to the database from tools

type Storage

type Storage struct {
	mock.Mock
}

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(backup *openapi.BackupRequest) error

Delete deletes a file from S3

func (*Storage) Pull

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

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

func (*Storage) Push

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

Push pushes a file

Jump to

Keyboard shortcuts

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