Documentation ¶
Index ¶
- Constants
- func GetAzureNameProperty(idFactory astmodel.IdentifierFactory) *astmodel.PropertyDefinition
- func NewARMConversionImplementation(armTypeName astmodel.InternalTypeName, armType *astmodel.ObjectType, ...) *astmodel.InterfaceImplementation
- func NewARMSpecInterfaceImpl(idFactory astmodel.IdentifierFactory, resource *astmodel.ResourceType, ...) (*astmodel.InterfaceImplementation, error)
- type ARMConversionFunction
- type ConvertToARMFunction
- type PopulateFromARMFunction
- type TypeKind
Constants ¶
const ( ConversionTag = "conversion" NoARMConversionValue = "noarmconversion" )
Variables ¶
This section is empty.
Functions ¶
func GetAzureNameProperty ¶
func GetAzureNameProperty(idFactory astmodel.IdentifierFactory) *astmodel.PropertyDefinition
GetAzureNameProperty returns the special "AzureName" field
func NewARMConversionImplementation ¶
func NewARMConversionImplementation( armTypeName astmodel.InternalTypeName, armType *astmodel.ObjectType, kubeTypeName astmodel.InternalTypeName, idFactory astmodel.IdentifierFactory, typeKind TypeKind, ) *astmodel.InterfaceImplementation
NewARMConversionImplementation creates an interface implementation with the specified ARM conversion functions
func NewARMSpecInterfaceImpl ¶
func NewARMSpecInterfaceImpl( idFactory astmodel.IdentifierFactory, resource *astmodel.ResourceType, spec *astmodel.ObjectType, ) (*astmodel.InterfaceImplementation, error)
NewARMSpecInterfaceImpl creates a new interface implementation with the functions required to implement the genruntime.ARMResourceSpec interface
Types ¶
type ARMConversionFunction ¶
type ARMConversionFunction struct {
// contains filtered or unexported fields
}
ARMConversionFunction represents an ARM conversion function for converting between a Kubernetes resource and an ARM resource.
func (*ARMConversionFunction) References ¶
func (c *ARMConversionFunction) References() astmodel.TypeNameSet
References returns the set of types to which this function refers. SHOULD include any types which this function references but its receiver doesn't. SHOULD NOT include the receiver of this function.
func (*ARMConversionFunction) RequiredPackageReferences ¶
func (c *ARMConversionFunction) RequiredPackageReferences() *astmodel.PackageReferenceSet
RequiredPackageReferences returns the imports required for this conversion function
type ConvertToARMFunction ¶
type ConvertToARMFunction struct {
ARMConversionFunction
}
func (*ConvertToARMFunction) AsFunc ¶
func (c *ConvertToARMFunction) AsFunc( codeGenerationContext *astmodel.CodeGenerationContext, receiver astmodel.InternalTypeName, ) (*dst.FuncDecl, error)
AsFunc returns the function as a Go AST
func (*ConvertToARMFunction) Equals ¶
func (c *ConvertToARMFunction) Equals(other astmodel.Function, overrides astmodel.EqualityOverrides) bool
Equals determines if this function is equal to the passed in function
func (*ConvertToARMFunction) Name ¶
func (c *ConvertToARMFunction) Name() string
type PopulateFromARMFunction ¶
type PopulateFromARMFunction struct {
ARMConversionFunction
}
func (*PopulateFromARMFunction) AsFunc ¶
func (c *PopulateFromARMFunction) AsFunc( codeGenerationContext *astmodel.CodeGenerationContext, receiver astmodel.InternalTypeName, ) (*dst.FuncDecl, error)
func (*PopulateFromARMFunction) Equals ¶
func (c *PopulateFromARMFunction) Equals(other astmodel.Function, overrides astmodel.EqualityOverrides) bool
Equals determines if this function is equal to the passed in function
func (*PopulateFromARMFunction) Name ¶
func (c *PopulateFromARMFunction) Name() string