template

package
v0.0.0-...-a4d1c73 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2019 License: Apache-2.0 Imports: 0 Imported by: 4 modules, 18 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package template provides struct which describes AWS Template.

Index

Constants

View Source
const (
	NotExist = TemplateElementValueType(iota)
	String
	Number
	Object
	Array
	Boolean
	Null
	Unknown
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Parameters

type Parameters map[string]interface{}

Parameters describes structure of Parameters in Template.

type Resource

type Resource struct {
	Type           string                 `yaml:"Type"`
	Properties     map[string]interface{} `yaml:"Properties"`
	DeletionPolicy string                 `yaml:"DeletionPolicy"`
}

Resource describes structure of Resources in Template.

type Template

type Template struct {
	AWSTemplateFormatVersion string                 `yaml:"AWSTemplateFormatVersion"`
	Description              string                 `yaml:"Description"`
	Metadata                 map[string]interface{} `yaml:"Metadata"`
	Parameters               map[string]interface{} `yaml:"Parameters"`
	Mappings                 map[string]interface{} `yaml:"Mappings"`
	Conditions               map[string]interface{} `yaml:"Conditions"`
	Transform                map[string]interface{} `yaml:"Transform"`
	Resources                map[string]Resource    `yaml:"Resources"`
	Outputs                  map[string]interface{} `yaml:"Outputs"`
}

Template describes AWS Template.

type TemplateElement

type TemplateElement struct {
	Name     string
	Value    interface{}
	Type     TemplateElementValueType
	Children interface{}
	Line     int
	Column   int
}

TemplateElement describe each Element.

func (*TemplateElement) GetChildrenMap

func (te *TemplateElement) GetChildrenMap() map[string]*TemplateElement

GetChildrenMap - get map in Element.

func (*TemplateElement) GetChildrenSlice

func (te *TemplateElement) GetChildrenSlice() []*TemplateElement

GetChildrenSlice - get slice in Element.

func (*TemplateElement) Traverse

func (te *TemplateElement) Traverse(iterator func(element *TemplateElement, parent *TemplateElement, depth int))

Traverse - get all maps and slices.

type TemplateElementValueType

type TemplateElementValueType int

TemplateElementValueType describe type of the element value.

type TemplateWithDetails

type TemplateWithDetails struct {
	AWSTemplateFormatVersion *TemplateElement
	Description              *TemplateElement
	Metadata                 *TemplateElement
	Parameters               *TemplateElement
	Mappings                 *TemplateElement
	Conditions               *TemplateElement
	Transform                *TemplateElement
	Resources                *TemplateElement
	Outputs                  *TemplateElement
}

TemplateWithDetails - more detailed template.

func (TemplateWithDetails) Traverse

func (twd TemplateWithDetails) Traverse(iterator func(element *TemplateElement, parent *TemplateElement, depth int))

Traverse - get all maps and slices for each element.

Jump to

Keyboard shortcuts

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