Documentation ¶
Index ¶
- type GeneratorAttribute
- func (ga *GeneratorAttribute) GoGenericType() string
- func (ga *GeneratorAttribute) GoName() string
- func (ga *GeneratorAttribute) GoType() string
- func (ga *GeneratorAttribute) Name() string
- func (ga *GeneratorAttribute) NameForLogicalNames() string
- func (ga *GeneratorAttribute) SupportGetAttFunctionName() string
- func (ga *GeneratorAttribute) SupportOutputFunctionName() string
- type GeneratorProperty
- func (gp *GeneratorProperty) DocumentationURL() string
- func (gp *GeneratorProperty) GoGenericType() string
- func (gp *GeneratorProperty) GoName() string
- func (gp *GeneratorProperty) GoType() string
- func (gp *GeneratorProperty) GoUnqualifiedOuterType() string
- func (gp *GeneratorProperty) Name() string
- func (gp *GeneratorProperty) Required() bool
- func (gp *GeneratorProperty) UpdateType() string
- type GeneratorSpec
- type GeneratorSpecOptions
- type GeneratorType
- func (gt *GeneratorType) DocumentationURL() string
- func (gt *GeneratorType) GetRelatedStructuredTypeName(unqualifiedStructuredTypeName string) string
- func (gt *GeneratorType) GetRelatedTopLevelResourceTypeName() string
- func (gt *GeneratorType) GoFileName() string
- func (gt *GeneratorType) GoImports() []string
- func (gt *GeneratorType) GoName() string
- func (gt *GeneratorType) GoPackageName() string
- func (gt *GeneratorType) GoSupportBasePackage() string
- func (gt *GeneratorType) IsTopLevelResourceType() bool
- func (gt *GeneratorType) Name() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GeneratorAttribute ¶
type GeneratorAttribute struct {
// contains filtered or unexported fields
}
GeneratorAttribute describes an attribute of a top-level resource type in the generator spec.
func (*GeneratorAttribute) GoGenericType ¶
func (ga *GeneratorAttribute) GoGenericType() string
GoGenericType returns the Go generic type for this attribute.
func (*GeneratorAttribute) GoName ¶
func (ga *GeneratorAttribute) GoName() string
GoName returns the Go name for this attribute.
func (*GeneratorAttribute) GoType ¶
func (ga *GeneratorAttribute) GoType() string
GoType returns the Go type for this attribute.
func (*GeneratorAttribute) Name ¶
func (ga *GeneratorAttribute) Name() string
Name returns the CloudFormation name for this attribute.
func (*GeneratorAttribute) NameForLogicalNames ¶
func (ga *GeneratorAttribute) NameForLogicalNames() string
NameForLogicalNames returns the name for this attribute modified so that it can be embedded in logical names.
func (*GeneratorAttribute) SupportGetAttFunctionName ¶
func (ga *GeneratorAttribute) SupportGetAttFunctionName() string
SupportGetAttFunctionName returns the GetAtt* support function to use for this attribute.
func (*GeneratorAttribute) SupportOutputFunctionName ¶
func (ga *GeneratorAttribute) SupportOutputFunctionName() string
SupportOutputFunctionName returns the *Output* support function to use for this attribute.
type GeneratorProperty ¶
type GeneratorProperty struct {
// contains filtered or unexported fields
}
GeneratorProperty describes a property of either a top-level resource or structured type in the generator spec.
func (*GeneratorProperty) DocumentationURL ¶
func (gp *GeneratorProperty) DocumentationURL() string
DocumentationURL returns the documentation URL for this property.
func (*GeneratorProperty) GoGenericType ¶
func (gp *GeneratorProperty) GoGenericType() string
GoGenericType returns the Go generic type for this property.
func (*GeneratorProperty) GoName ¶
func (gp *GeneratorProperty) GoName() string
GoName returns the Go name for this property.
func (*GeneratorProperty) GoType ¶
func (gp *GeneratorProperty) GoType() string
GoType returns the Go type for this property.
func (*GeneratorProperty) GoUnqualifiedOuterType ¶
func (gp *GeneratorProperty) GoUnqualifiedOuterType() string
GoUnqualifiedOuterType returns the Go unqualified outer type for this property (i.e. Expression, ExpressionSlice, or ExpressionMap).
func (*GeneratorProperty) Name ¶
func (gp *GeneratorProperty) Name() string
Name returns the CloudFormation name for this property.
func (*GeneratorProperty) Required ¶
func (gp *GeneratorProperty) Required() bool
Required returns true if the property is required, false otherwise.
func (*GeneratorProperty) UpdateType ¶
func (gp *GeneratorProperty) UpdateType() string
UpdateType returns the update type of the property ("Mutable", "Immutable", or "Conditional").
type GeneratorSpec ¶
type GeneratorSpec struct { TopLevelResourceTypes map[string]*GeneratorType StructuredTypes map[string]*GeneratorType // contains filtered or unexported fields }
GeneratorSpec is a processed version of the CloudFormation spec ready to be generated.
func NewGeneratorSpec ¶
func NewGeneratorSpec(o *GeneratorSpecOptions, s *cfspecz.Spec) *GeneratorSpec
NewGeneratorSpec initializes a new generator spec.
func (*GeneratorSpec) Generate ¶
func (gs *GeneratorSpec) Generate(outDirPath string) error
Generate applies all the templates and writes the results out to disk.
func (*GeneratorSpec) ResourceSpecificationVersion ¶
func (gs *GeneratorSpec) ResourceSpecificationVersion() string
ResourceSpecificationVersion returns the CloudFormation resource specification version for this spec.
type GeneratorSpecOptions ¶
type GeneratorSpecOptions struct { GoSupportPackage string GoOutputPackage string TypeTemplate *ttpl.Template TypeTemplateGetImplicitGoImports func(t *GeneratorType) []string }
GeneratorSpecOptions describes some options for the generator spec.
func NewDefaultGeneratorSpecOptions ¶
func NewDefaultGeneratorSpecOptions() *GeneratorSpecOptions
NewDefaultGeneratorSpecOptions initializes a new set of default generator spec options.
type GeneratorType ¶
type GeneratorType struct { Attributes map[string]*GeneratorAttribute Properties map[string]*GeneratorProperty // contains filtered or unexported fields }
GeneratorType describes either a top-level resource type or a structured type in the generator spec.
func (*GeneratorType) DocumentationURL ¶
func (gt *GeneratorType) DocumentationURL() string
DocumentationURL returns the documentation URL for this type.
func (*GeneratorType) GetRelatedStructuredTypeName ¶
func (gt *GeneratorType) GetRelatedStructuredTypeName(unqualifiedStructuredTypeName string) string
GetRelatedStructuredTypeName converts the value of a Type or ItemType field of a property or attribute in this type to its fully qualified structured type name.
func (*GeneratorType) GetRelatedTopLevelResourceTypeName ¶
func (gt *GeneratorType) GetRelatedTopLevelResourceTypeName() string
GetRelatedTopLevelResourceTypeName returns the top-level resource type name related to this type, that is, Name if IsTopLevelResourceType = true, or the portion of Name before the first "." otherwise.
func (*GeneratorType) GoFileName ¶
func (gt *GeneratorType) GoFileName() string
GoFileName returns the Go file name for this type.
func (*GeneratorType) GoImports ¶
func (gt *GeneratorType) GoImports() []string
GoImports returns the Go imports for this type.
func (*GeneratorType) GoName ¶
func (gt *GeneratorType) GoName() string
GoName returns the Go name for this type.
func (*GeneratorType) GoPackageName ¶
func (gt *GeneratorType) GoPackageName() string
GoPackageName returns the Go package name for this type.
func (*GeneratorType) GoSupportBasePackage ¶
func (gt *GeneratorType) GoSupportBasePackage() string
GoSupportBasePackage returns the base package for the support library.
func (*GeneratorType) IsTopLevelResourceType ¶
func (gt *GeneratorType) IsTopLevelResourceType() bool
IsTopLevelResourceType returns true if this is a top-level resource type, false if it is a structured type.
func (*GeneratorType) Name ¶
func (gt *GeneratorType) Name() string
Name returns the CloudFormation name for this type.