Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BackupDatabase ¶
func BackupDatabase(docker *docker.Client, storage *StorageClient, config *BackupConfig) error
Types ¶
type BackupConfig ¶
type BackupConfig struct { Name string Strategy strategies.Strategy User string Password string Container *docker.Container }
func GetBackupConfig ¶
func GetBackupConfig(container *docker.Container) (*BackupConfig, error)
type StorageClient ¶
type StorageClient struct { Client *storage.Client Bucket *storage.BucketHandle ProjectID string }
func CreateStorageClient ¶
func CreateStorageClient(config StorageClientConfig) (*StorageClient, error)
func (*StorageClient) CreateBucket ¶
func (c *StorageClient) CreateBucket(name string, location string, class string) (*storage.BucketHandle, error)
func (*StorageClient) ObjectExists ¶
func (c *StorageClient) ObjectExists(name string) bool
func (*StorageClient) UploadFile ¶
func (c *StorageClient) UploadFile(name string, path string, errCh chan error)
type StorageClientConfig ¶
type StorageClientConfig struct { BucketName string BucketLocation string BucketClass string ProjectID string PrivateKeyID string PrivateKey string ClientID string ClientEmail string }
func (*StorageClientConfig) CreateCredentialsJSON ¶
func (c *StorageClientConfig) CreateCredentialsJSON() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.