Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidScheme = errors.New("invalid scheme") ErrCannotParseURL = errors.New("cannot parse url") )
Functions ¶
This section is empty.
Types ¶
type AmazonConfig ¶ added in v0.3.0
type AmazonSnapshotter ¶ added in v0.3.0
type AmazonSnapshotter struct { *s3.S3 *s3manager.Downloader *s3manager.Uploader // contains filtered or unexported fields }
func NewAmazonSnapshotter ¶ added in v0.3.0
func NewAmazonSnapshotter(cfg *AmazonConfig) (*AmazonSnapshotter, error)
func (*AmazonSnapshotter) Load ¶ added in v0.3.0
func (s *AmazonSnapshotter) Load() (io.ReadCloser, error)
func (*AmazonSnapshotter) Save ¶ added in v0.3.0
func (s *AmazonSnapshotter) Save(r io.ReadCloser) error
type DigitalOceanConfig ¶ added in v0.3.0
type DigitalOceanSnapshotter ¶
type DigitalOceanSnapshotter struct {
*AmazonSnapshotter
}
func NewDigitalOceanSnapshotter ¶
func NewDigitalOceanSnapshotter(cfg *DigitalOceanConfig) (*DigitalOceanSnapshotter, 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 Snapshotter ¶ added in v0.3.0
type Snapshotter interface { Load() (io.ReadCloser, error) Save(io.ReadCloser) error }
type URL ¶ added in v0.4.1
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
Click to show internal directories.
Click to hide internal directories.