plugins

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnimplemented = errors.New("not implemented")
View Source
var Unknown = "unknown"

Functions

This section is empty.

Types

type Plugin

type Plugin interface {
	// Name returns the name of the plugin.
	Name() string
	// Description returns a brief description of the plugin.
	Description() string
	// Version returns the version of the plugin.
	Version() string
	// Backup performs a backup of the application data.
	Backup(ctx context.Context, app spec.App, opts provider.Opts) error
	// Restore restores the application data from a backup.
	Restore(ctx context.Context, app spec.App, opts provider.Opts) error
	// Link applications with the plugin.
	Link(ctx context.Context, app spec.App, opts provider.Opts) error
	// Unlink removes the link with the plugin.
	Unlink(ctx context.Context, app spec.App, opts provider.Opts) error
}

Plugin interface defines the methods that a plugin must implement.

func Load

func Load(path string) (Plugin, error)

Load loads the plugin with the given name and returns it.

type UnimplementedPlugin

type UnimplementedPlugin struct{}

func (*UnimplementedPlugin) Backup

Backup performs a backup of the application data.

func (*UnimplementedPlugin) Description

func (u *UnimplementedPlugin) Description() string

Description returns a brief description of the plugin.

Link applications with the plugin.

func (*UnimplementedPlugin) Name

func (u *UnimplementedPlugin) Name() string

Name returns the name of the plugin.

func (*UnimplementedPlugin) Restore

Restore restores the application data from a backup.

Unlink removes the link with the plugin.

func (*UnimplementedPlugin) Version

func (u *UnimplementedPlugin) Version() string

Version returns the version of the plugin.

Jump to

Keyboard shortcuts

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