2020-04-17 20:46:36 +00:00
|
|
|
package backup
|
|
|
|
|
|
|
|
type S3Backup struct {
|
|
|
|
// The UUID of this backup object. This must line up with a backup from
|
|
|
|
// the panel instance.
|
|
|
|
Uuid string
|
|
|
|
|
|
|
|
// An array of files to ignore when generating this backup. This should be
|
|
|
|
// compatible with a standard .gitignore structure.
|
|
|
|
IgnoredFiles []string
|
2020-04-26 23:43:18 +00:00
|
|
|
|
|
|
|
// The pre-signed upload endpoint for the generated backup. This must be
|
|
|
|
// provided otherwise this request will fail. This allows us to keep all
|
|
|
|
// of the keys off the daemon instances and the panel can handle generating
|
|
|
|
// the credentials for us.
|
|
|
|
PresignedUrl string
|
2020-04-17 20:46:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
var _ Backup = (*S3Backup)(nil)
|
|
|
|
|
|
|
|
func (s *S3Backup) Identifier() string {
|
|
|
|
return s.Uuid
|
|
|
|
}
|
|
|
|
|
2020-04-19 06:26:23 +00:00
|
|
|
func (s *S3Backup) Backup(included *IncludedFiles, prefix string) error {
|
2020-04-17 20:46:36 +00:00
|
|
|
panic("implement me")
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *S3Backup) Checksum() ([]byte, error) {
|
|
|
|
return []byte(""), nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *S3Backup) Size() (int64, error) {
|
|
|
|
return 0, nil
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *S3Backup) Path() string {
|
|
|
|
return ""
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *S3Backup) Details() *ArchiveDetails {
|
|
|
|
return &ArchiveDetails{}
|
|
|
|
}
|
2020-04-26 23:43:18 +00:00
|
|
|
|
|
|
|
func (s *S3Backup) Ignored() []string {
|
|
|
|
return s.IgnoredFiles
|
|
|
|
}
|
|
|
|
|
|
|
|
func (s *S3Backup) Remove() error {
|
|
|
|
return nil
|
|
|
|
}
|