config

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2021 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchPlan

func FetchPlan(plan string, projectPath string, localShuttleDirectoryPath string, uii ui.UI, skipGitPlanPulling bool, planArgument string) (string, error)

FetchPlan so it exists locally and return path to that plan

Types

type DynamicYaml

type DynamicYaml = map[string]interface{}

DynamicYaml are any yaml document

type ShuttleAction

type ShuttleAction struct {
	Shell      string `yaml:"shell"`
	Dockerfile string `yaml:"dockerfile"`
}

ShuttleAction describes an action done by a shuttle script

type ShuttleConfig

type ShuttleConfig struct {
	Plan      string                       `yaml:"-"`
	PlanRaw   interface{}                  `yaml:"plan"`
	Variables DynamicYaml                  `yaml:"vars"`
	Scripts   map[string]ShuttlePlanScript `yaml:"scripts"`
}

ShuttleConfig describes the actual config for each project

type ShuttlePlan

type ShuttlePlan struct {
	ProjectPath   string
	LocalPlanPath string
	Configuration ShuttlePlanConfiguration
}

ShuttlePlan struct describes a plan

type ShuttlePlanConfiguration

type ShuttlePlanConfiguration struct {
	Vars          map[string]interface{}       `yaml:"vars"`
	Documentation string                       `yaml:"documentation"`
	Scripts       map[string]ShuttlePlanScript `yaml:"scripts"`
}

ShuttlePlanConfiguration is a ShuttlePlan sub-element

func (*ShuttlePlanConfiguration) Load

Load loads a plan from project path and shuttle config

type ShuttlePlanScript

type ShuttlePlanScript struct {
	Description string              `yaml:"description"`
	Actions     []ShuttleAction     `yaml:"actions"`
	Args        []ShuttleScriptArgs `yaml:"args"`
}

ShuttlePlanScript is a ShuttlePlan sub-element

type ShuttleProjectContext

type ShuttleProjectContext struct {
	ProjectPath               string
	LocalShuttleDirectoryPath string
	TempDirectoryPath         string
	Config                    ShuttleConfig
	LocalPlanPath             string
	Plan                      ShuttlePlanConfiguration
	Scripts                   map[string]ShuttlePlanScript
	UI                        ui.UI
}

ShuttleProjectContext describes the context of the project using shuttle

func (*ShuttleProjectContext) DocumentationURL added in v0.13.0

func (p *ShuttleProjectContext) DocumentationURL() (string, error)

DocumentationURL returns a URL pointing to plan documentation if any is available. Plan reference and plan documentation field is inspected and parsed.

func (*ShuttleProjectContext) Setup

func (c *ShuttleProjectContext) Setup(projectPath string, uii ui.UI, clean bool, skipGitPlanPulling bool, planArgument string) (*ShuttleProjectContext, error)

Setup the ShuttleProjectContext for a specific path

type ShuttleScriptArgs

type ShuttleScriptArgs struct {
	Name        string `yaml:"name"`
	Required    bool   `yaml:"required"`
	Description string `yaml:"description"`
}

ShuttleScriptArgs describes an arguments that a script accepts

func (ShuttleScriptArgs) String added in v0.10.0

func (a ShuttleScriptArgs) String() string

Jump to

Keyboard shortcuts

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