package storage

import "context"

// StorageType represents the type of cloud storage
type StorageType string

const (
	// StorageTypeS3 represents AWS S3 storage
	StorageTypeS3 StorageType = "s3"
	// StorageTypeGCS represents Google Cloud Storage
	StorageTypeGCS StorageType = "gs"
	// StorageTypeAzure represents Azure Blob Storage
	StorageTypeAzure StorageType = "azblob"
	// StorageTypeFS represents local filesystem storage
	StorageTypeFS StorageType = "fs"
)

type Interface interface {
	// CreateFile creates filePath and puts data into it.
	CreateFile(ctx context.Context, filePath string, data []byte) error

	// Exists returns true if filePath exists.
	Exists(ctx context.Context, filePath string) (bool, error)

	// ReadFile returns file contents at the given filePath.
	ReadFile(ctx context.Context, filePath string) ([]byte, error)

	// DeleteFile deletes a file or all files with the given prefix path.
	DeleteFile(ctx context.Context, filePath string) error

	// DeleteDir deletes all files with the given prefix path.
	DeleteDir(ctx context.Context, prefix string) error

	// ListFiles returns a list of files given the prefix.
	ListFiles(ctx context.Context, prefix string) ([]string, error)

	// GetFullPath returns the full path for the given filePath.
	GetFullPath(filePath string) string
}
