Documentation
¶
Index ¶
Constants ¶
View Source
const ( FileProviderType = "file://" S3ProviderType = "s3://" SpacesProviderType = "digitaloceanspaces" )
Variables ¶
This section is empty.
Functions ¶
func ParseSnapshotBackupURL ¶
ParseSnapshotBackupURL deconstructs a uri into a type prefix and a bucket example inputs and outputs:
file://file -> file://, file s3://bucket -> s3://, bucket https://nyc3.digitaloceanspaces.com/bucket -> digitaloceanspaces, bucket
Types ¶
type AWSSnapshotter ¶
type AWSSnapshotter struct {
// contains filtered or unexported fields
}
func NewAWSSnapshotter ¶
func NewAWSSnapshotter(cfg *aws.Config) (*AWSSnapshotter, error)
func (*AWSSnapshotter) Load ¶
func (s *AWSSnapshotter) Load() (io.ReadCloser, error)
func (*AWSSnapshotter) Save ¶
func (s *AWSSnapshotter) Save(r io.ReadCloser) error
type DigitalOceanSnapshotter ¶
type DigitalOceanSnapshotter struct {
// contains filtered or unexported fields
}
func NewDigitalOceanSnapshotter ¶
func NewDigitalOceanSnapshotter(cfg *digitalocean.Config) (*DigitalOceanSnapshotter, error)
func (*DigitalOceanSnapshotter) Load ¶
func (s *DigitalOceanSnapshotter) Load() (io.ReadCloser, error)
func (*DigitalOceanSnapshotter) Save ¶
func (s *DigitalOceanSnapshotter) Save(r io.ReadCloser) error
type FileSnapshotter ¶
type FileSnapshotter struct {
// contains filtered or unexported fields
}
func NewFileSnapshotter ¶
func NewFileSnapshotter(path string) (*FileSnapshotter, error)
func (*FileSnapshotter) Load ¶
func (fs *FileSnapshotter) Load() (io.ReadCloser, error)
func (*FileSnapshotter) Save ¶
func (fs *FileSnapshotter) Save(r io.ReadCloser) error
type SnapshotProvider ¶
type SnapshotProvider interface {
Load() (io.ReadCloser, error)
Save(io.ReadCloser) error
}
Click to show internal directories.
Click to hide internal directories.