func (d *DeleteBackend) Upload(ctx context.Context, vol *files.VolumeInfo) error {
	if err := vol.DeleteVolume(); err != nil {
		log.AppLogger.Errorf("delete backend: could not delete volume %s due to error: %v", vol.ObjectName, err)
		return err
	}
	log.AppLogger.Debugf("delete backend: Deleted Volume %s", vol.ObjectName)
	return nil
}
Upload will delete the provided volume, usually found in a temporary folder
package backends
import (
	"context"
	"errors"
	"io"
	"github.com/someone1/zfsbackup-go/files"
	"github.com/someone1/zfsbackup-go/log"
)
const DeleteBackendPrefix = "delete"
type DeleteBackend struct {
	conf *BackendConfig
}
func (d *DeleteBackend) Init(ctx context.Context, conf *BackendConfig, opts ...Option) error {
	d.conf = conf
	return nil
}
func (d *DeleteBackend) Delete(ctx context.Context, filename string) error {
	return errors.New("delete backend: Delete is invalid for this backend")
}
func (d *DeleteBackend) PreDownload(ctx context.Context, objects []string) error {
	return errors.New("delete backend: PreDownload is invalid for this backend")
}
func (d *DeleteBackend) Download(ctx context.Context, filename string) (io.ReadCloser, error) {
	return nil, errors.New("delete backend: Get is invalid for this backend")
}
func (d *DeleteBackend) Close() error {
	return nil
}
func (d *DeleteBackend) List(ctx context.Context, prefix string) ([]string, error) {
	return nil, errors.New("delete backend: List is invalid for this backend")
}