provider

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Opts

type Opts struct {
	// Dry toggles the dry run mode.
	Dry bool
	// Force toggles the force mode.
	Force bool
	// Root runs the command as root.
	Root bool
}

Opts are the options.

type Provider

type Provider interface {
	// Backup an app.
	Backup(ctx context.Context, app spec.App, opts Opts) error
	// Restore an app.
	Restore(ctx context.Context, app spec.App, opts Opts) error
	// Link an app.
	Link(ctx context.Context, app spec.App, opts Opts) error
	// Unlink an app.
	Unlink(ctx context.Context, app spec.App, opts Opts) error
	// Close is a function to call before finalizing any action.
	// It returns an error if the process fails to gracefully finish.
	Close() error
}

Provider is the provider interface.

type Unimplemented

type Unimplemented struct{}

Unimplemented is the default implementation.

func (*Unimplemented) Backup

func (p *Unimplemented) Backup(_ context.Context, _ spec.App, _ Opts) error

Backup is the backup function.

func (*Unimplemented) Close

func (p *Unimplemented) Close() error

Close implements the closer interface.

func (p *Unimplemented) Link(_ context.Context, _ spec.App, _ Opts) error

Link is the link function.

func (*Unimplemented) Restore

func (p *Unimplemented) Restore(_ context.Context, _ spec.App, _ Opts) error

Restore is the restore function.

func (p *Unimplemented) Unlink(_ context.Context, _ spec.App, _ Opts) error

Unlink is the unlink function.

Jump to

Keyboard shortcuts

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