Documentation ¶
Index ¶
- type Action
- type Actions
- type BuildInput
- type Instruction
- func (s Instruction) GetArguments() []string
- func (s Instruction) GetCommand() string
- func (s Instruction) GetFlags() builder.Flags
- func (s Instruction) GetOutputs() []builder.Output
- func (s Instruction) GetSuffixArguments() []string
- func (s Instruction) GetWorkingDir() string
- func (s Instruction) SuppressesOutput() bool
- type Mixin
- type MixinConfig
- type Output
- type Step
- type TestMixin
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { Name string Steps []Step // using UnmarshalYAML so that we don't need a custom type per action }
func (Action) GetSteps ¶
func (a Action) GetSteps() []builder.ExecutableStep
func (Action) MakeSteps ¶
func (a Action) MakeSteps() interface{}
MakeSteps builds a slice of Step for data to be unmarshaled into.
func (Action) MarshalYAML ¶
func (*Action) UnmarshalYAML ¶
UnmarshalYAML takes any yaml in this form ACTION:
kubectlhpecp: ...
and puts the steps into the Action.Steps field
type Actions ¶
type Actions []Action
Actions is a set of actions, and the steps, passed from Porter.
func (*Actions) UnmarshalYAML ¶
UnmarshalYAML takes chunks of a porter.yaml file associated with this mixin and populates it on the current action set. install:
kubectlhpecp: ... kubectlhpecp: ...
upgrade:
kubectlhpecp: ...
type BuildInput ¶
type BuildInput struct {
Config MixinConfig
}
BuildInput represents stdin passed to the mixin for the build command.
type Instruction ¶
type Instruction struct { Name string `yaml:"name"` Description string `yaml:"description"` WorkingDir string `yaml:"dir,omitempty"` Arguments []string `yaml:"arguments,omitempty"` // Useful when the CLI you are calling wants some arguments to come after flags // Arguments are passed first, then Flags, then SuffixArguments. SuffixArguments []string `yaml:"suffixarguments,omitempty"` Flags builder.Flags `yaml:"flags,omitempty"` Outputs []Output `yaml:"outputs,omitempty"` SuppressOutput bool `yaml:"suppressoutput,omitempty"` // Allow the user to ignore some errors // Adds the ignoreError functionality from the exec mixin // https://releasev1.porter.sh/mixins/exec/#ignoreerror builder.IgnoreErrorHandler `yaml:"ignoreError,omitempty"` }
func (Instruction) GetArguments ¶
func (s Instruction) GetArguments() []string
func (Instruction) GetCommand ¶
func (s Instruction) GetCommand() string
func (Instruction) GetFlags ¶
func (s Instruction) GetFlags() builder.Flags
func (Instruction) GetOutputs ¶
func (s Instruction) GetOutputs() []builder.Output
func (Instruction) GetSuffixArguments ¶
func (s Instruction) GetSuffixArguments() []string
func (Instruction) GetWorkingDir ¶
func (s Instruction) GetWorkingDir() string
func (Instruction) SuppressesOutput ¶
func (s Instruction) SuppressesOutput() bool
type Mixin ¶
func (*Mixin) Build ¶
Build will generate the necessary Dockerfile lines for an invocation image using this mixin
func (*Mixin) PrintSchema ¶
func (m *Mixin) PrintSchema()
type MixinConfig ¶
type MixinConfig struct {
ClientVersion string `yaml:"clientVersion,omitempty"`
}
type Output ¶
type Output struct { Name string `yaml:"name"` // See https://porter.sh/mixins/exec/#outputs // TODO: If your mixin doesn't support these output types, you can remove these and the interface assertions above, and from #/definitions/outputs in schema.json JsonPath string `yaml:"jsonPath,omitempty"` FilePath string `yaml:"path,omitempty"` Regex string `yaml:"regex,omitempty"` }
func (Output) GetFilePath ¶
func (Output) GetJsonPath ¶
type Step ¶
type Step struct {
Instruction `yaml:"kubectlhpecp"`
}
type TestMixin ¶
type TestMixin struct { *Mixin TestContext *context.TestContext }
func NewTestMixin ¶
NewTestMixin initializes a mixin test client, with the output buffered, and an in-memory file system.