21 lines
645 B
Go

package kopia
import (
"context"
)
// Provider defines the interface for different Kopia storage backends
type Provider interface {
// Connect connects to an existing repository or creates a new one
Connect(ctx context.Context, serviceName string, password string, configPath string) error
// GetRepositoryParams returns the parameters needed for repository operations
GetRepositoryParams(serviceName string) ([]string, error)
// GetBucketName returns the storage identifier (bucket name or path)
GetBucketName(serviceName string) string
// GetProviderType returns a string identifying the provider type
GetProviderType() string
}