config

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2021 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckIfError

func CheckIfError(err error)

CheckIfError should be used to naively panics if an error is not nil.

func FetchPlan

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

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:"not_plan"`
	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 {
	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) Setup

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

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