pg2s3

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateBackupName

func GenerateBackupName(prefix string) (string, error)

Backup naming scheme: <prefix>_<timestamp>.<ext>[.<ext>]*

func ParseBackupTimestamp

func ParseBackupTimestamp(name string) (time.Time, error)

Parse backup timestamp by splitting on "_" or "." and parsing the 2nd element

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(cfg config.Config) (*Client, error)

func (*Client) CreateBackup

func (c *Client) CreateBackup() (io.Reader, error)

func (*Client) DecryptBackup

func (c *Client) DecryptBackup(encrypted io.Reader, privateKey string) (io.Reader, error)

func (*Client) DeleteBackup

func (c *Client) DeleteBackup(name string) error

func (*Client) DownloadBackup

func (c *Client) DownloadBackup(name string) (io.Reader, error)

func (*Client) EncryptBackup

func (c *Client) EncryptBackup(backup io.Reader, publicKeys []string) (io.Reader, error)

func (*Client) ListBackups

func (c *Client) ListBackups() ([]string, error)

func (*Client) RestoreBackup

func (c *Client) RestoreBackup(backup io.Reader) error

func (*Client) UploadBackup

func (c *Client) UploadBackup(name string, backup io.Reader) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳