mixin

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: Apache-2.0 Imports: 14 Imported by: 31

Documentation

Index

Constants

View Source
const (
	Directory = "mixins"
)

Variables

This section is empty.

Functions

func IsCoreMixinCommand

func IsCoreMixinCommand(value string) bool

Types

type InstallOptions

type InstallOptions struct {
	pkgmgmt.InstallOptions
}

func (*InstallOptions) Validate

func (o *InstallOptions) Validate(args []string) error

type Metadata

type Metadata = pkgmgmt.Metadata

Metadata about an installed mixin.

type MixinProvider

type MixinProvider interface {
	pkgmgmt.PackageManager

	// GetSchema requests the manifest schema from the mixin.
	GetSchema(ctx context.Context, name string) (string, error)
}

MixinProvider manages Porter's mixins: installing, listing, upgrading and general communication.

type PackageManager

type PackageManager struct {
	*client.FileSystem
}

PackageManager handles package management for mixins.

func NewPackageManager

func NewPackageManager(c *config.Config) *PackageManager

func (*PackageManager) GetSchema

func (c *PackageManager) GetSchema(ctx context.Context, name string) (string, error)

func (*PackageManager) PreRunMixinCommandHandler

func (c *PackageManager) PreRunMixinCommandHandler(command string, cmd *exec.Cmd)

type TestMixinProvider

type TestMixinProvider struct {
	client.TestPackageManager

	// LintResults allows you to provide linter.Results for your unit tests.
	// It isn't of type linter.Results directly to avoid package cycles
	LintResults interface{}

	// ReturnBuildError will force the TestMixinProvider to return a build error
	// if set to true
	ReturnBuildError bool
}

func NewTestMixinProvider

func NewTestMixinProvider() *TestMixinProvider

NewTestMixinProvider helps us test Porter.Mixins in our unit tests without actually hitting any real plugins on the file system.

func (*TestMixinProvider) GetSchema

func (p *TestMixinProvider) GetSchema(ctx context.Context, name string) (string, error)

func (*TestMixinProvider) PrintExecOutput

func (p *TestMixinProvider) PrintExecOutput(pkgContext *portercontext.Context, name string, commandOpts pkgmgmt.CommandOptions) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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