Documentation ¶
Overview ¶
Package parse provides functions for parsing CloudFormation templates from JSON and YAML inputs.
Example ¶
package main import ( "fmt" "github.com/aws-cloudformation/rain/cft/parse" ) func main() { template, _ := parse.String(` Resources: Bucket: Type: AWS::S3::Bucket `) fmt.Println(template.Map()) }
Output: map[Resources:map[Bucket:map[Type:AWS::S3::Bucket]]]
Index ¶
- func File(fileName string) (cft.Template, error)
- func Map(input map[string]interface{}) (cft.Template, error)
- func Node(node *yaml.Node) (cft.Template, error)
- func Reader(r io.Reader) (cft.Template, error)
- func String(input string) (cft.Template, error)
- func TransformNode(n *yaml.Node) error
- func Verify(source cft.Template, output string) error
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TransformNode ¶ added in v1.2.0
func TransformNode(n *yaml.Node) error
TransformNode takes a *yaml.Node and convert tag-style names into map-style, and converts other scalars into a canonical format
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.