Documentation ¶
Index ¶
- Constants
- func IsFunc(e ast.Expr, info *types.Info, funcName string) bool
- func IsFuncTypeResourceConditionFunc(node ast.Node, info *types.Info) bool
- func IsFuncTypeValueChangeConditionFunc(node ast.Node, info *types.Info) bool
- func IsFuncTypeValueChangeValidationFunc(node ast.Node, info *types.Info) bool
- func IsFuncTypeValueConditionFunc(node ast.Node, info *types.Info) bool
- func IsFuncTypeValueValidationFunc(node ast.Node, info *types.Info) bool
- func IsNamedType(t *types.Named, typeName string) bool
- func IsTypeResourceConditionFunc(t types.Type) bool
- func IsTypeValueChangeConditionFunc(t types.Type) bool
- func IsTypeValueChangeValidationFunc(t types.Type) bool
- func IsTypeValueConditionFunc(t types.Type) bool
- func IsTypeValueValidationFunc(t types.Type) bool
- func PackagePathVersion(moduleVersion int) string
- type ResourceConditionFuncInfo
- type ValueChangeConditionFuncInfo
- type ValueChangeValidationFuncInfo
- type ValueConditionFuncInfo
- type ValueValidationFuncInfo
Constants ¶
const ( FuncNameAll = `All` FuncNameComputedIf = `ComputedIf` FuncNameForceNewIf = `ForceNewIf` FuncNameIf = `If` FuncNameIfValue = `IfValue` FuncNameIfValueChange = `IfValueChange` FuncNameSequence = `Sequence` FuncNameValidateChange = `ValidateChange` FuncNameValidateValue = `ValidateValue` )
const ( PackageModule = terraformtype.ModuleTerraformPluginSdk PackageModulePath = `helper/customdiff` PackageName = `customdiff` PackagePath = PackageModule + `/` + PackageModulePath )
const (
TypeNameResourceConditionFunc = `ResourceConditionFunc`
)
const (
TypeNameValueChangeConditionFunc = `ValueChangeConditionFunc`
)
const (
TypeNameValueChangeValidationFunc = `ValueChangeValidationFunc`
)
const (
TypeNameValueConditionFunc = `ValueConditionFunc`
)
const (
TypeNameValueValidationFunc = `ValueValidationFunc`
)
Variables ¶
This section is empty.
Functions ¶
func IsFuncTypeResourceConditionFunc ¶
IsFuncTypeResourceConditionFunc returns true if the FuncType matches expected parameters and results types
func IsFuncTypeValueChangeConditionFunc ¶
IsFuncTypeValueChangeConditionFunc returns true if the FuncType matches expected parameters and results types
func IsFuncTypeValueChangeValidationFunc ¶
IsFuncTypeValueChangeValidationFunc returns true if the FuncType matches expected parameters and results types
func IsFuncTypeValueConditionFunc ¶
IsFuncTypeValueConditionFunc returns true if the FuncType matches expected parameters and results types
func IsFuncTypeValueValidationFunc ¶
IsFuncTypeValueValidationFunc returns true if the FuncType matches expected parameters and results types
func IsNamedType ¶
IsNamedType returns if the type name matches and is from the helper/customdiff package
func IsTypeResourceConditionFunc ¶
IsTypeResourceConditionFunc returns if the type is ResourceConditionFunc from the customdiff package
func IsTypeValueChangeConditionFunc ¶
IsTypeValueChangeConditionFunc returns if the type is ValueChangeConditionFunc from the customdiff package
func IsTypeValueChangeValidationFunc ¶
IsTypeValueChangeValidationFunc returns if the type is ValueChangeValidationFunc from the customdiff package
func IsTypeValueConditionFunc ¶
IsTypeValueConditionFunc returns if the type is ValueConditionFunc from the customdiff package
func IsTypeValueValidationFunc ¶
IsTypeValueValidationFunc returns if the type is ValueValidationFunc from the customdiff package
func PackagePathVersion ¶ added in v0.15.0
PackagePathVersion returns the import path for a module version
Types ¶
type ResourceConditionFuncInfo ¶
type ResourceConditionFuncInfo struct { AstFuncDecl *ast.FuncDecl AstFuncLit *ast.FuncLit Body *ast.BlockStmt Node ast.Node Pos token.Pos Type *ast.FuncType TypesInfo *types.Info }
ResourceConditionFuncInfo represents all gathered ResourceConditionFunc data for easier access
func NewResourceConditionFuncInfo ¶
func NewResourceConditionFuncInfo(node ast.Node, info *types.Info) *ResourceConditionFuncInfo
NewResourceConditionFuncInfo instantiates a ResourceConditionFuncInfo
type ValueChangeConditionFuncInfo ¶
type ValueChangeConditionFuncInfo struct { AstFuncDecl *ast.FuncDecl AstFuncLit *ast.FuncLit Body *ast.BlockStmt Node ast.Node Pos token.Pos Type *ast.FuncType TypesInfo *types.Info }
ValueChangeConditionFuncInfo represents all gathered ValueChangeConditionFunc data for easier access
func NewValueChangeConditionFuncInfo ¶
func NewValueChangeConditionFuncInfo(node ast.Node, info *types.Info) *ValueChangeConditionFuncInfo
NewValueChangeConditionFuncInfo instantiates a ValueChangeConditionFuncInfo
type ValueChangeValidationFuncInfo ¶
type ValueChangeValidationFuncInfo struct { AstFuncDecl *ast.FuncDecl AstFuncLit *ast.FuncLit Body *ast.BlockStmt Node ast.Node Pos token.Pos Type *ast.FuncType TypesInfo *types.Info }
ValueChangeValidationFuncInfo represents all gathered ValueChangeValidationFunc data for easier access
func NewValueChangeValidationFuncInfo ¶
func NewValueChangeValidationFuncInfo(node ast.Node, info *types.Info) *ValueChangeValidationFuncInfo
NewValueChangeValidationFuncInfo instantiates a ValueChangeValidationFuncInfo
type ValueConditionFuncInfo ¶
type ValueConditionFuncInfo struct { AstFuncDecl *ast.FuncDecl AstFuncLit *ast.FuncLit Body *ast.BlockStmt Node ast.Node Pos token.Pos Type *ast.FuncType TypesInfo *types.Info }
ValueConditionFuncInfo represents all gathered ValueConditionFunc data for easier access
func NewValueConditionFuncInfo ¶
func NewValueConditionFuncInfo(node ast.Node, info *types.Info) *ValueConditionFuncInfo
NewValueConditionFuncInfo instantiates a ValueConditionFuncInfo
type ValueValidationFuncInfo ¶
type ValueValidationFuncInfo struct { AstFuncDecl *ast.FuncDecl AstFuncLit *ast.FuncLit Body *ast.BlockStmt Node ast.Node Pos token.Pos Type *ast.FuncType TypesInfo *types.Info }
ValueValidationFuncInfo represents all gathered ValueValidationFunc data for easier access
func NewValueValidationFuncInfo ¶
func NewValueValidationFuncInfo(node ast.Node, info *types.Info) *ValueValidationFuncInfo
NewValueValidationFuncInfo instantiates a ValueValidationFuncInfo