Documentation ¶
Index ¶
- func IsIntrinsic(key string) bool
- func IsIntrinsicFunc(node *yaml.Node) bool
- func NewCFReference(id string, resourceRange types.Range) types.Reference
- func NewCFReferenceWithValue(resourceRange types.Range, resolvedValue Property, logicalId string) types.Reference
- type CFReference
- func (cf *CFReference) Comment() string
- func (cf *CFReference) DisplayValue() string
- func (cf *CFReference) LogicalID() string
- func (cf *CFReference) PropertyRange() types.Range
- func (cf *CFReference) RefersTo(r types.Reference) bool
- func (cf *CFReference) ResourceRange() types.Range
- func (cf *CFReference) String() string
- type EqualityOptions
- type FileContext
- type FileContexts
- type InvalidContentError
- type NotCloudFormationError
- type Option
- type Parameter
- type Parser
- type ParsingErrorsError
- 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) GetJsonBytes(squashList ...bool) []byte
- func (p *Property) GetJsonBytesAsString(squashList ...bool) string
- 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) ParentRange() types.Range
- func (p *Property) Range() types.Range
- func (p *Property) RawValue() interface{}
- func (p *Property) SetLogicalResource(id string)
- 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 IsIntrinsic ¶
func IsIntrinsicFunc ¶
func IsIntrinsicFunc(node *yaml.Node) bool
Types ¶
type CFReference ¶
type CFReference struct {
// contains filtered or unexported fields
}
func (*CFReference) Comment ¶
func (cf *CFReference) Comment() string
func (*CFReference) DisplayValue ¶
func (cf *CFReference) DisplayValue() string
func (*CFReference) LogicalID ¶
func (cf *CFReference) LogicalID() string
func (*CFReference) PropertyRange ¶
func (cf *CFReference) PropertyRange() types.Range
func (*CFReference) ResourceRange ¶
func (cf *CFReference) ResourceRange() types.Range
func (*CFReference) String ¶
func (cf *CFReference) String() 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 }
func (*FileContext) GetResourceByLogicalID ¶
func (t *FileContext) GetResourceByLogicalID(name string) *Resource
func (*FileContext) GetResourcesByType ¶ added in v0.28.2
func (t *FileContext) GetResourcesByType(names ...string) []*Resource
func (*FileContext) Metadata ¶
func (t *FileContext) Metadata() types.Metadata
type FileContexts ¶
type FileContexts []*FileContext
type InvalidContentError ¶
type InvalidContentError struct {
// contains filtered or unexported fields
}
func NewErrInvalidContent ¶
func NewErrInvalidContent(source string, err error) *InvalidContentError
func (*InvalidContentError) Error ¶
func (e *InvalidContentError) Error() string
func (*InvalidContentError) Reason ¶
func (e *InvalidContentError) Reason() error
type NotCloudFormationError ¶
type NotCloudFormationError struct {
// contains filtered or unexported fields
}
func NewErrNotCloudFormation ¶
func NewErrNotCloudFormation(source string) *NotCloudFormationError
func (*NotCloudFormationError) Error ¶
func (e *NotCloudFormationError) Error() string
type Option ¶
type Option func(p *Parser)
func OptionWithDebugWriter ¶
type Parameter ¶
type Parameter struct {
// contains filtered or unexported fields
}
func (*Parameter) UnmarshalJSONWithMetadata ¶
func (*Parameter) UnmarshalYAML ¶
func (*Parameter) UpdateDefault ¶
func (p *Parameter) UpdateDefault(inVal interface{})
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
func (*Parser) ParseDirectory ¶
func (p *Parser) ParseDirectory(dir string) (FileContexts, error)
func (*Parser) ParseFiles ¶
func (p *Parser) ParseFiles(filepaths ...string) (FileContexts, error)
type ParsingErrorsError ¶
type ParsingErrorsError struct {
// contains filtered or unexported fields
}
func NewErrParsingErrors ¶
func NewErrParsingErrors(errs []error) *ParsingErrorsError
func (*ParsingErrorsError) Error ¶
func (e *ParsingErrorsError) Error() string
type Property ¶
type Property struct { Inner PropertyInner // contains filtered or unexported fields }
func PassthroughResolution ¶
func ResolveBase64 ¶
func ResolveEquals ¶
func ResolveFindInMap ¶
func ResolveGetAtt ¶
func ResolveIntrinsicFunc ¶
func ResolveJoin ¶
func ResolveReference ¶
func ResolveSelect ¶
func ResolveSplit ¶
func ResolveSub ¶
func (*Property) AsBoolValue ¶
func (*Property) AsIntValue ¶
func (*Property) AsRawStrings ¶
func (*Property) AsStringValue ¶
func (p *Property) AsStringValue() types.StringValue
func (*Property) EqualTo ¶
func (p *Property) EqualTo(checkValue interface{}, equalityOptions ...EqualityOptions) bool
func (*Property) GetBoolProperty ¶
func (*Property) GetIntProperty ¶
func (*Property) GetJsonBytes ¶
func (*Property) GetJsonBytesAsString ¶
func (*Property) GetProperty ¶
func (*Property) GetStringProperty ¶
func (p *Property) GetStringProperty(path string, defaultValue ...string) types.StringValue
func (*Property) IsConvertableTo ¶
func (*Property) IsNotString ¶
func (*Property) MetadataWithValue ¶
func (*Property) ParentRange ¶
func (*Property) SetLogicalResource ¶
func (*Property) StringDefault ¶
func (p *Property) StringDefault(defaultValue string) types.StringValue
func (*Property) UnmarshalJSONWithMetadata ¶
func (*Property) UnmarshalYAML ¶
type PropertyInner ¶
type Resource ¶
type Resource struct { Inner ResourceInner // contains filtered or unexported fields }
func (*Resource) ConfigureResource ¶
func (r *Resource) ConfigureResource(id, filepath string, ctx *FileContext)
func (*Resource) GetBoolProperty ¶
func (*Resource) GetIntProperty ¶
func (*Resource) GetProperty ¶
func (*Resource) GetStringProperty ¶
func (r *Resource) GetStringProperty(path string, defaultValue ...string) types.StringValue
func (*Resource) SourceFormat ¶
func (r *Resource) SourceFormat() SourceFormat
func (*Resource) StringDefault ¶
func (r *Resource) StringDefault(defaultValue string) types.StringValue
func (*Resource) UnmarshalJSONWithMetadata ¶
func (*Resource) UnmarshalYAML ¶
type ResourceInner ¶
type SourceFormat ¶
type SourceFormat string
const ( YamlSourceFormat SourceFormat = "yaml" JsonSourceFormat SourceFormat = "json" )
Source Files ¶
- errors.go
- 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
Click to show internal directories.
Click to hide internal directories.