plugin

package
v0.0.0-...-b872246 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	VirtenvPath    = filepath.Join(devboxHiddenDirName, "virtenv")
	VirtenvBinPath = filepath.Join(VirtenvPath, "bin")

	WrapperPath    = filepath.Join(VirtenvPath, ".wrappers")
	WrapperBinPath = filepath.Join(WrapperPath, "bin")
)

Functions

func Readme

func Readme(ctx context.Context,
	pkg *devpkg.Package,
	projectDir string,
	markdown bool,
) (string, error)

func Remove

func Remove(projectDir string, pkgs []string) error
func RemoveInvalidSymlinks(projectDir string) error

func WithDevbox

func WithDevbox(provider devboxProject) managerOption

func WithLockfile

func WithLockfile(lockfile *lock.File) managerOption

Types

type Includable

type Includable interface {
	CanonicalName() string
	Hash() string
	FileContent(subpath string) ([]byte, error)
}

type Manager

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

func NewManager

func NewManager(opts ...managerOption) *Manager

func (*Manager) ApplyOptions

func (m *Manager) ApplyOptions(opts ...managerOption)

func (*Manager) Create

func (m *Manager) Create(pkg *devpkg.Package) error

func (*Manager) Env

func (m *Manager) Env(
	pkgs []*devpkg.Package,
	includes []string,
	computedEnv map[string]string,
) (map[string]string, error)

Env returns the environment variables for the given plugins. TODO: We should associate the env variables with the individual plugin binaries via wrappers instead of adding to the environment everywhere. TODO: this should have PluginManager as receiver so we can build once with pkgs, includes, etc

func (*Manager) GetServices

func (m *Manager) GetServices(
	pkgs []*devpkg.Package,
	includes []string,
) (services.Services, error)

func (*Manager) Include

func (m *Manager) Include(included string) error

func (*Manager) InitHooks

func (m *Manager) InitHooks(
	pkgs []*devpkg.Package,
	includes []string,
) ([]string, error)

func (*Manager) ParseInclude

func (m *Manager) ParseInclude(include string) (Includable, error)

func (*Manager) ProcessPluginPackages

func (m *Manager) ProcessPluginPackages(
	userPackages []*devpkg.Package,
) ([]*devpkg.Package, error)

ProcessPluginPackages adds and removes packages as indicated by plugins

Jump to

Keyboard shortcuts

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