Documentation ¶
Overview ¶
Package kopiaclient provides a client to interact with a Kopia repo.
Index ¶
- type KopiaClient
- func (kc *KopiaClient) CreateOrConnectRepo(ctx context.Context, repoDir, bucketName string) error
- func (kc *KopiaClient) SnapshotCreate(ctx context.Context, key string, val []byte) error
- func (kc *KopiaClient) SnapshotDelete(ctx context.Context, key string) error
- func (kc *KopiaClient) SnapshotRestore(ctx context.Context, key string) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KopiaClient ¶
type KopiaClient struct {
// contains filtered or unexported fields
}
KopiaClient uses a Kopia repo to create, restore, and delete snapshots.
func NewKopiaClient ¶
func NewKopiaClient(basePath string) *KopiaClient
NewKopiaClient returns a new KopiaClient.
func (*KopiaClient) CreateOrConnectRepo ¶
func (kc *KopiaClient) CreateOrConnectRepo(ctx context.Context, repoDir, bucketName string) error
CreateOrConnectRepo creates a new Kopia repo or connects to an existing one if possible.
func (*KopiaClient) SnapshotCreate ¶
SnapshotCreate creates a snapshot for the given path.
func (*KopiaClient) SnapshotDelete ¶
func (kc *KopiaClient) SnapshotDelete(ctx context.Context, key string) error
SnapshotDelete deletes all snapshots for a given path.
func (*KopiaClient) SnapshotRestore ¶
SnapshotRestore restores the latest snapshot for the given path.
Click to show internal directories.
Click to hide internal directories.