mixin

package
v0.27.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: MIT Imports: 10 Imported by: 31

Documentation

Index

Constants

View Source
const DefaultFeedUrl = "https://cdn.porter.sh/mixins/atom.xml"
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(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(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(name string) (string, error)

func (*TestMixinProvider) PrintExecOutput

func (p *TestMixinProvider) PrintExecOutput(pkgContext *context.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