Documentation ¶
Index ¶
- Constants
- func IsCoreMixinCommand(value string) bool
- type BuildInput
- type CommandOptions
- type InstallOptions
- type Metadata
- type MixinProvider
- type TestMixinProvider
- func (p *TestMixinProvider) GetSchema(m Metadata) (string, error)
- func (p *TestMixinProvider) GetVersion(m Metadata) (string, error)
- func (p *TestMixinProvider) GetVersionMetadata(m Metadata) (*VersionInfo, error)
- func (p *TestMixinProvider) Install(o InstallOptions) (*Metadata, error)
- func (p *TestMixinProvider) List() ([]Metadata, error)
- func (p *TestMixinProvider) Run(mixinCxt *context.Context, mixinName string, commandOpts CommandOptions) error
- func (p *TestMixinProvider) Uninstall(o UninstallOptions) (*Metadata, error)
- type UninstallOptions
- type VersionInfo
Constants ¶
View Source
const (
DefaultFeedUrl = "https://cdn.deislabs.io/porter/atom.xml"
)
View Source
const FileExt = ""
Variables ¶
This section is empty.
Functions ¶
func IsCoreMixinCommand ¶
Types ¶
type BuildInput ¶
type BuildInput struct { Config interface{} `yaml:"config,omitempty"` Actions map[string]interface{} `yaml:"actions"` }
type CommandOptions ¶
type InstallOptions ¶
type InstallOptions struct { Name string URL string FeedURL string Version string // contains filtered or unexported fields }
func (*InstallOptions) GetParsedFeedURL ¶
func (o *InstallOptions) GetParsedFeedURL() url.URL
func (*InstallOptions) GetParsedURL ¶
func (o *InstallOptions) GetParsedURL() url.URL
GetParsedURL returns a copy of of the parsed URL that is safe to modify.
func (*InstallOptions) Validate ¶
func (o *InstallOptions) Validate(args []string) error
type Metadata ¶
type Metadata struct { // Mixin Name Name string `json:"name"` // Mixin Directory Dir string `json:"dir,omitempty"` // Path to the client executable ClientPath string `json:"clientPath,omitempty"` // Metadata about the mixin version returned from calling version on the mixin VersionInfo }
Metadata about an installed mixin.
type MixinProvider ¶
type MixinProvider interface { List() ([]Metadata, error) GetSchema(Metadata) (string, error) // GetVersion is the obsolete form of retrieving mixin version, e.g. exec version, which returned an unstructured // version string. It will be deprecated soon and is replaced by GetVersionMetadata. GetVersion(Metadata) (string, error) // GetVersionMetadata is the new form of retrieving mixin version, e.g. exec version --output json, which returns // a structured version string. It replaces GetVersion. GetVersionMetadata(Metadata) (*VersionInfo, error) Install(InstallOptions) (*Metadata, error) Uninstall(UninstallOptions) (*Metadata, error) // Run a command against the specified mixin Run(mixinContext *context.Context, mixinName string, commandOpts CommandOptions) error }
MixinProvider handles searching, listing and communicating with the mixins.
type TestMixinProvider ¶
type TestMixinProvider struct {
RunAssertions []func(mixinCxt *context.Context, mixinName string, commandOpts CommandOptions)
}
TestMixinProvider helps us test Porter.Mixins in our unit tests without actually hitting any real mixins on the file system.
func (*TestMixinProvider) GetSchema ¶
func (p *TestMixinProvider) GetSchema(m Metadata) (string, error)
func (*TestMixinProvider) GetVersion ¶
func (p *TestMixinProvider) GetVersion(m Metadata) (string, error)
func (*TestMixinProvider) GetVersionMetadata ¶
func (p *TestMixinProvider) GetVersionMetadata(m Metadata) (*VersionInfo, error)
func (*TestMixinProvider) Install ¶
func (p *TestMixinProvider) Install(o InstallOptions) (*Metadata, error)
func (*TestMixinProvider) List ¶
func (p *TestMixinProvider) List() ([]Metadata, error)
func (*TestMixinProvider) Run ¶
func (p *TestMixinProvider) Run(mixinCxt *context.Context, mixinName string, commandOpts CommandOptions) error
func (*TestMixinProvider) Uninstall ¶
func (p *TestMixinProvider) Uninstall(o UninstallOptions) (*Metadata, error)
type UninstallOptions ¶
type UninstallOptions struct {
Name string
}
func (*UninstallOptions) Validate ¶
func (o *UninstallOptions) Validate(args []string) error
type VersionInfo ¶
type VersionInfo struct { Version string `json:"version"` Commit string `json:"commit"` Author string `json:"author,omitempty"` }
Information from running the version command against the mixin.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.