Documentation
¶
Index ¶
- func IsIntrinsic(key string) bool
- func IsIntrinsicFunc(node *yaml.Node) bool
- func NewCFReference(resourceRange types.Range) types.Reference
- func NewCFReferenceWithValue(resourceRange types.Range, resolvedValue Property) types.Reference
- type CFReference
- type EqualityOptions
- type ErrNotCloudFormation
- type FileContext
- type FileContexts
- type Option
- type Parameter
- type Parser
- type Property
- func GetAzs(property *Property) (*Property, bool)
- func GetCidr(property *Property) (*Property, bool)
- func PassthroughResolution(property *Property) (*Property, bool)
- func ResolveBase64(property *Property) (*Property, bool)
- func ResolveEquals(property *Property) (resolved *Property, success bool)
- func ResolveFindInMap(property *Property) (resolved *Property, success bool)
- func ResolveGetAtt(property *Property) (resolved *Property, success bool)
- func ResolveIntrinsicFunc(property *Property) (*Property, bool)
- func ResolveJoin(property *Property) (resolved *Property, success bool)
- func ResolveReference(property *Property) (resolved *Property, success bool)
- func ResolveSelect(property *Property) (resolved *Property, success bool)
- func ResolveSplit(property *Property) (resolved *Property, success bool)
- func ResolveSub(property *Property) (resolved *Property, success bool)
- func (p *Property) AsBool() bool
- func (p *Property) AsBoolValue() types.BoolValue
- func (p *Property) AsInt() int
- func (p *Property) AsIntValue() types.IntValue
- func (p *Property) AsList() []*Property
- func (p *Property) AsMap() map[string]*Property
- func (p *Property) AsRawStrings() ([]string, error)
- func (p *Property) AsString() string
- func (p *Property) AsStringValue() types.StringValue
- func (p *Property) BoolDefault(defaultValue bool) types.BoolValue
- func (p *Property) Comment() string
- func (p *Property) Contains(checkVal interface{}) bool
- func (p *Property) ConvertTo(conversionType cftypes.CfType) *Property
- func (p *Property) EqualTo(checkValue interface{}, equalityOptions ...EqualityOptions) bool
- func (p *Property) GetBoolProperty(path string, defaultValue ...bool) types.BoolValue
- func (p *Property) GetIntProperty(path string, defaultValue ...int) types.IntValue
- func (p *Property) GetProperty(path string) *Property
- func (p *Property) GetStringProperty(path string, defaultValue ...string) types.StringValue
- func (p *Property) IntDefault(defaultValue int) types.IntValue
- func (p *Property) IsBool() bool
- func (p *Property) IsConvertableTo(conversionType cftypes.CfType) bool
- func (p *Property) IsEmpty() bool
- func (p *Property) IsInt() bool
- func (p *Property) IsList() bool
- func (p *Property) IsMap() bool
- func (p *Property) IsNil() bool
- func (p *Property) IsNotBool() bool
- func (p *Property) IsNotInt() bool
- func (p *Property) IsNotList() bool
- func (p *Property) IsNotMap() bool
- func (p *Property) IsNotNil() bool
- func (p *Property) IsNotString() bool
- func (p *Property) IsString() bool
- func (p *Property) IsTrue() bool
- func (p *Property) Metadata() types.Metadata
- func (p *Property) MetadataWithValue(resolvedValue *Property) types.Metadata
- func (p *Property) Range() types.Range
- func (p *Property) RawValue() interface{}
- func (p *Property) String() string
- func (p *Property) StringDefault(defaultValue string) types.StringValue
- func (p *Property) Type() cftypes.CfType
- func (p *Property) UnmarshalJSONWithMetadata(node jfather.Node) error
- func (p *Property) UnmarshalYAML(node *yaml.Node) error
- type PropertyInner
- type Resource
- func (r *Resource) BoolDefault(defaultValue bool) types.BoolValue
- func (r *Resource) ConfigureResource(id, filepath string, ctx *FileContext)
- func (r *Resource) GetBoolProperty(path string, defaultValue ...bool) types.BoolValue
- func (r *Resource) GetIntProperty(path string, defaultValue ...int) types.IntValue
- func (r *Resource) GetProperty(path string) *Property
- func (r *Resource) GetStringProperty(path string, defaultValue ...string) types.StringValue
- func (r *Resource) ID() string
- func (r *Resource) IntDefault(defaultValue int) types.IntValue
- func (r *Resource) IsNil() bool
- func (r *Resource) Metadata() types.Metadata
- func (r *Resource) Range() types.Range
- func (r *Resource) SourceFormat() SourceFormat
- func (r *Resource) StringDefault(defaultValue string) types.StringValue
- func (r *Resource) Type() string
- func (r *Resource) UnmarshalJSONWithMetadata(node jfather.Node) error
- func (r *Resource) UnmarshalYAML(value *yaml.Node) error
- type ResourceInner
- type SourceFormat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsIntrinsicFunc ¶
func IsIntrinsicFunc(node *yaml.Node) bool
func NewCFReference ¶
NewCFReference ...
Types ¶
type CFReference ¶
type CFReference struct {
// contains filtered or unexported fields
}
CFReference ...
func (*CFReference) ResolvedAttributeValue ¶
func (cf *CFReference) ResolvedAttributeValue() interface{}
ResolvedAttributeValue ...
func (*CFReference) ResourceRange ¶
func (cf *CFReference) ResourceRange() types.Range
ResourceRange ...
type EqualityOptions ¶
type EqualityOptions = int
EqualityOptions ...
const (
IgnoreCase EqualityOptions = iota
)
IgnoreCase ...
type ErrNotCloudFormation ¶
type ErrNotCloudFormation struct {
// contains filtered or unexported fields
}
func NewErrNotCloudFormation ¶
func NewErrNotCloudFormation(source string) *ErrNotCloudFormation
func (*ErrNotCloudFormation) Error ¶
func (e *ErrNotCloudFormation) Error() string
type FileContext ¶
type FileContext struct { SourceFormat SourceFormat Parameters map[string]*Parameter `json:"Parameters" yaml:"Parameters"` Resources map[string]*Resource `json:"Resources" yaml:"Resources"` Globals map[string]*Resource `json:"Globals" yaml:"Globals"` Mappings map[string]interface{} `json:"Mappings,omitempty" yaml:"Mappings"` // contains filtered or unexported fields }
FileContext ...
func (*FileContext) GetResourceByLogicalID ¶
func (t *FileContext) GetResourceByLogicalID(name string) *Resource
func (*FileContext) GetResourceByType ¶
func (t *FileContext) GetResourceByType(names ...string) []*Resource
GetResourceByType ...
type Parameter ¶
type Parameter struct {
// contains filtered or unexported fields
}
Parameter ...
func (*Parameter) UnmarshalJSONWithMetadata ¶
UnmarshalJSONWithMetadata ...
func (*Parameter) UnmarshalYAML ¶
UnmarshalYAML ...
func (*Parameter) UpdateDefault ¶
func (p *Parameter) UpdateDefault(inVal interface{})
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser ...
func (*Parser) Parse ¶
Parse parses content from an io.Reader, which may not necessarily be a traditional file. the 'source' argument should identify the source of the content, be it a url, a filesystem path, a container etc.
func (*Parser) ParseDirectory ¶
func (p *Parser) ParseDirectory(dir string) (FileContexts, error)
ParseDirectory ...
func (*Parser) ParseFiles ¶
func (p *Parser) ParseFiles(filepaths ...string) (FileContexts, error)
ParseFiles ...
type Property ¶
type Property struct { Inner PropertyInner // contains filtered or unexported fields }
Property ...
func PassthroughResolution ¶
func ResolveEquals ¶
ResolveEquals ...
func ResolveFindInMap ¶
func ResolveGetAtt ¶
ResolveGetAtt ...
func ResolveIntrinsicFunc ¶
ResolveIntrinsicFunc ...
func ResolveJoin ¶
ResolveJoin ...
func ResolveReference ¶
ResolveReference ...
func ResolveSelect ¶
ResolveSelect attempts to resolve the value from a Fn::Select with a Property
func ResolveSplit ¶
ResolveSplit ...
func ResolveSub ¶
ResolveSub attempts to resolve the value of a string with substitutions with a Property
func (*Property) AsRawStrings ¶
AsRawStrings ...
func (*Property) AsStringValue ¶
func (p *Property) AsStringValue() types.StringValue
AsStringValue ...
func (*Property) BoolDefault ¶
BoolDefault ...
func (*Property) EqualTo ¶
func (p *Property) EqualTo(checkValue interface{}, equalityOptions ...EqualityOptions) bool
EqualTo ...
func (*Property) GetBoolProperty ¶
GetBoolProperty ...
func (*Property) GetIntProperty ¶
GetIntProperty ...
func (*Property) GetProperty ¶
GetProperty takes a path to the property separated by '.' and returns the resolved value
func (*Property) GetStringProperty ¶
func (p *Property) GetStringProperty(path string, defaultValue ...string) types.StringValue
GetStringProperty ...
func (*Property) IntDefault ¶
IntDefault ...
func (*Property) IsConvertableTo ¶
func (*Property) MetadataWithValue ¶
MetadataWithValue ...
func (*Property) RawValue ¶
func (p *Property) RawValue() interface{}
RawValue returns the value as an interface
func (*Property) StringDefault ¶
func (p *Property) StringDefault(defaultValue string) types.StringValue
StringDefault ...
func (*Property) UnmarshalJSONWithMetadata ¶
UnmarshalJSONWithMetadata ...
func (*Property) UnmarshalYAML ¶
UnmarshalYAML ...
type PropertyInner ¶
PropertyInner ...
type Resource ¶
type Resource struct { Inner ResourceInner // contains filtered or unexported fields }
Resource ...
func (*Resource) BoolDefault ¶
BoolDefault ...
func (*Resource) ConfigureResource ¶
func (r *Resource) ConfigureResource(id, filepath string, ctx *FileContext)
ConfigureResource ...
func (*Resource) GetBoolProperty ¶
GetBoolProperty ...
func (*Resource) GetIntProperty ¶
GetIntProperty ...
func (*Resource) GetProperty ¶
GetProperty takes a path to the property separated by '.' and returns the resolved value
func (*Resource) GetStringProperty ¶
func (r *Resource) GetStringProperty(path string, defaultValue ...string) types.StringValue
GetStringProperty ...
func (*Resource) IntDefault ¶
IntDefault ...
func (*Resource) StringDefault ¶
func (r *Resource) StringDefault(defaultValue string) types.StringValue
StringDefault ...
func (*Resource) UnmarshalJSONWithMetadata ¶
UnmarshalJSONWithMetadata ...
func (*Resource) UnmarshalYAML ¶
UnmarshalYAML ...
type ResourceInner ¶
type ResourceInner struct { Type string `json:"Type" yaml:"Type"` Properties map[string]*Property `json:"Properties" yaml:"Properties"` }
ResourceInner ...
type SourceFormat ¶
type SourceFormat string
SourceFormat ...
const ( YamlSourceFormat SourceFormat = "yaml" JsonSourceFormat SourceFormat = "json" )
YamlSourceFormat ...
Source Files
¶
- file_context.go
- fn_base64.go
- fn_builtin.go
- fn_equals.go
- fn_find_in_map.go
- fn_get_attr.go
- fn_join.go
- fn_ref.go
- fn_select.go
- fn_split.go
- fn_sub.go
- intrinsics.go
- option.go
- parameter.go
- parser.go
- property.go
- property_conversion.go
- property_helpers.go
- pseudo_parameters.go
- reference.go
- resource.go
- util.go