gcloud

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2023 License: Apache-2.0 Imports: 13 Imported by: 1

Documentation

Index

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 Steps for data to be unmarshaled into.

func (*Action) UnmarshalYAML

func (a *Action) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML takes any yaml in this form ACTION: - gcloud: ... and puts the steps into the Action.Steps field

type Groups

type Groups []string

func (*Groups) UnmarshalYAML

func (groups *Groups) UnmarshalYAML(unmarshal func(interface{}) error) error

type Instruction

type Instruction struct {
	Description    string        `yaml:"description"`
	Groups         Groups        `yaml:"groups"`
	Command        string        `yaml:"command"`
	Arguments      []string      `yaml:"arguments,omitempty"`
	Flags          builder.Flags `yaml:"flags,omitempty"`
	Outputs        []Output      `yaml:"outputs,omitempty"`
	SuppressOutput bool          `yaml:"suppress-output,omitempty"`
}

type Mixin

type Mixin struct {
	runtime.RuntimeConfig
}

func New

func New() *Mixin

New gcloud mixin client, initialized with useful defaults.

func (*Mixin) Build

func (m *Mixin) Build() error

Build will generate the necessary Dockerfile lines for an invocation image using this mixin

func (*Mixin) Execute

func (m *Mixin) Execute(ctx context.Context) error

func (*Mixin) PrintSchema

func (m *Mixin) PrintSchema()

func (*Mixin) PrintVersion

func (m *Mixin) PrintVersion(opts version.Options) error

type Output

type Output struct {
	Name     string `yaml:"name"`
	JsonPath string `yaml:"jsonPath"`
}

func (Output) GetJsonPath

func (o Output) GetJsonPath() string

func (Output) GetName

func (o Output) GetName() string

type Step

type Step struct {
	Instruction `yaml:"gcloud"`
}

func (Step) GetArguments

func (s Step) GetArguments() []string

func (Step) GetCommand

func (s Step) GetCommand() string

func (Step) GetFlags

func (s Step) GetFlags() builder.Flags

func (Step) GetOutputs

func (s Step) GetOutputs() []builder.Output

func (Step) GetWorkingDir added in v1.0.0

func (s Step) GetWorkingDir() string

func (Step) SuppressesOutput

func (s Step) SuppressesOutput() bool

type TestMixin

type TestMixin struct {
	*Mixin
	TestContext *portercontext.TestContext
}

func NewTestMixin

func NewTestMixin(t *testing.T) *TestMixin

NewTestMixin initializes a mixin test client, with the output buffered, and an in-memory file system.

Jump to

Keyboard shortcuts

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