backup

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Composite

type Composite struct {
	// contains filtered or unexported fields
}

func ComposeSnapshots

func ComposeSnapshots(boundary string, snapshotables ...IdentifiedSnapshotable) *Composite

func (*Composite) GenerateSnapshot

func (c *Composite) GenerateSnapshot(ctx context.Context) (io.ReadCloser, error)

GenerateSnapshot implements port.Snapshotable.

func (*Composite) RestoreSnapshot

func (c *Composite) RestoreSnapshot(ctx context.Context, r io.Reader) error

RestoreSnapshot implements port.Snapshotable.

type IdentifiedSnapshotable

type IdentifiedSnapshotable interface {
	Snapshotable
	SnapshotID() string
}

func WithSnapshotID

func WithSnapshotID(id string, snapshotable Snapshotable) IdentifiedSnapshotable

type Restorable

type Restorable interface {
	RestoreDocuments(ctx context.Context, documents []model.Document) error
}

type Snapshotable

type Snapshotable interface {
	GenerateSnapshot(ctx context.Context) (io.ReadCloser, error)
	RestoreSnapshot(ctx context.Context, r io.Reader) error
}

Jump to

Keyboard shortcuts

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