parse

package
v0.10.2 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

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/cfn/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

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func File

func File(fileName string) (cfn.Template, error)

File returns a cfn.Template parsed from a file specified by fileName

func Reader

func Reader(r io.Reader) (cfn.Template, error)

Reader returns a cfn.Template parsed from an io.Reader

func String

func String(input string) (cfn.Template, error)

String returns a cfn.Template parsed from a string

func Verify

func Verify(source cfn.Template, output string) error

Verify confirms that there is no semantic difference between the source cfn.Template and the string representation in output. This can be used to ensure that the parse package hasn't done anything unexpected to your template.

Types

This section is empty.

Jump to

Keyboard shortcuts

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