cli/pkg/extensions/extension.go
Mislav Marohnić 0d999ddaa1 Rework local extensions for Windows
Replace the implementation that relied on symlinks with the one that
create regular files that act like symlinks: they contain a reference to
the local directory where to find the extension.
2021-07-28 22:47:54 +02:00

24 lines
607 B
Go

package extensions
import (
"io"
)
//go:generate moq -rm -out extension_mock.go . Extension
type Extension interface {
Name() string
Path() string
URL() string
IsLocal() bool
UpdateAvailable() bool
}
//go:generate moq -rm -out manager_mock.go . ExtensionManager
type ExtensionManager interface {
List(includeMetadata bool) []Extension
Install(url string, stdout, stderr io.Writer) error
InstallLocal(dir string) error
Upgrade(name string, force bool, stdout, stderr io.Writer) error
Remove(name string) error
Dispatch(args []string, stdin io.Reader, stdout, stderr io.Writer) (bool, error)
}