kopiaclient

package
v0.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2021 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package kopiaclient provides a client to interact with a Kopia repo.

Index

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

func (kc *KopiaClient) SnapshotCreate(ctx context.Context, key string, val []byte) error

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

func (kc *KopiaClient) SnapshotRestore(ctx context.Context, key string) ([]byte, error)

SnapshotRestore restores the latest snapshot for the given path.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL