Documentation ¶
Overview ¶
Copyright 2020 Fugue, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Fugue, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Fugue, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2020 Fugue, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
Command to execute within a rule
func GetCommand ¶ added in v0.2.0
GetCommand returns one command from its semi-structured YAML form
type Component ¶
type Component struct { Name string `yaml:"name"` App string `yaml:"app"` Kind string `yaml:"kind"` Ignore bool `yaml:"ignore"` Docker Docker `yaml:"docker"` ECS ECS `yaml:"ecs"` Toolchain Toolchain `yaml:"toolchain"` Rules map[string]Rule `yaml:"rules"` Exports map[string]Export `yaml:"exports"` Environment map[string]string `yaml:"environment"` Path string }
Component defines component configuration in YAML
func LoadComponent ¶
LoadComponent loads a definition from the given text
func LoadComponentFromPath ¶
LoadComponentFromPath loads a definition from the specified file
type Condition ¶ added in v0.3.0
type Condition struct { ResourceExists string `yaml:"resource_exists"` DirectoryExists string `yaml:"directory_exists"` ScriptSucceeds ConditionScript `yaml:"script_succeeds"` }
Condition that controls rule or command execution
type ConditionScript ¶ added in v0.3.0
type ConditionScript struct { Run string `yaml:"run"` WithOutput string `yaml:"with_output"` SuppressError bool `yaml:"suppress_error"` }
ConditionScript defines a script to be used to check a Condition
func (ConditionScript) IsEmpty ¶ added in v0.3.0
func (s ConditionScript) IsEmpty() bool
IsEmpty returns true if the Script is not defined
type Dependency ¶
type Dependency struct { Component string `yaml:"component"` Rule string `yaml:"rule"` Export string `yaml:"export"` Recurse int `yaml:"recurse"` }
Dependency between Rules
type Docker ¶
type Docker struct {
Image string `yaml:"image"`
}
Docker defines Docker configuration for a component
type ECS ¶
type ECS struct { Task string `yaml:"task"` Type string `yaml:"type"` Memory int `yaml:"memory"` CPU int `yaml:"cpu"` }
ECS defines ECS configuration for a component
type Export ¶
type Export struct { Provider string `yaml:"provider"` Resources []string `yaml:"resources"` Ignore []string `yaml:"ignore"` }
Export defines resources exposed by a Component
type Project ¶
type Project struct { Name string `yaml:"name"` Environment map[string]string `yaml:"environment"` Components []string `yaml:"components"` Providers map[string]map[string]interface{} `yaml:"providers"` }
Project defines project configuration in YAML
func LoadProject ¶
LoadProject loads a definition from the given text
func LoadProjectFromPath ¶
LoadProjectFromPath loads a definition from the specified file
type Providers ¶
Providers specifies the name of the Provider type to be used for the input and output Resources of a Rule
type Rule ¶
type Rule struct { Name string `yaml:"name"` Inputs []string `yaml:"inputs"` Outputs []string `yaml:"outputs"` Ignore []string `yaml:"ignore"` Local bool `yaml:"local"` Native bool `yaml:"native"` Requires []Dependency `yaml:"requires"` Description string `yaml:"description"` Command string `yaml:"command"` Commands []interface{} `yaml:"commands"` Providers Providers `yaml:"providers"` When Condition `yaml:"when"` Unless Condition `yaml:"unless"` }
Rule defines inputs, commands, and outputs for a build step or action
func (Rule) GetCommands ¶ added in v0.2.0
GetCommands returns commands unmarshaled from the rule's semi-structured YAML
type Toolchain ¶
type Toolchain struct {
Items []ToolchainItem `yaml:"items"`
}
Toolchain identifies dependencies this component has on build tools. This may be used to identify changes in toolchain that may necessitate a rebuild.
type ToolchainItem ¶
ToolchainItem is one part of a Component Toolchain