customdiff

package
v0.28.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 4, 2022 License: MPL-2.0 Imports: 7 Imported by: 10

Documentation

Index

Constants

View Source
const (
	FuncNameAll            = `All`
	FuncNameComputedIf     = `ComputedIf`
	FuncNameForceNewIf     = `ForceNewIf`
	FuncNameIf             = `If`
	FuncNameIfValue        = `IfValue`
	FuncNameIfValueChange  = `IfValueChange`
	FuncNameSequence       = `Sequence`
	FuncNameValidateChange = `ValidateChange`
	FuncNameValidateValue  = `ValidateValue`
)
View Source
const (
	PackageModule     = terraformtype.ModuleTerraformPluginSdk
	PackageModulePath = `helper/customdiff`
	PackageName       = `customdiff`
	PackagePath       = PackageModule + `/` + PackageModulePath
)
View Source
const (
	TypeNameResourceConditionFunc = `ResourceConditionFunc`
)
View Source
const (
	TypeNameValueChangeConditionFunc = `ValueChangeConditionFunc`
)
View Source
const (
	TypeNameValueChangeValidationFunc = `ValueChangeValidationFunc`
)
View Source
const (
	TypeNameValueConditionFunc = `ValueConditionFunc`
)
View Source
const (
	TypeNameValueValidationFunc = `ValueValidationFunc`
)

Variables

This section is empty.

Functions

func IsFunc

func IsFunc(e ast.Expr, info *types.Info, funcName string) bool

IsFunc returns if the function call is in the customdiff package

func IsFuncTypeResourceConditionFunc

func IsFuncTypeResourceConditionFunc(node ast.Node, info *types.Info) bool

IsFuncTypeResourceConditionFunc returns true if the FuncType matches expected parameters and results types

func IsFuncTypeValueChangeConditionFunc

func IsFuncTypeValueChangeConditionFunc(node ast.Node, info *types.Info) bool

IsFuncTypeValueChangeConditionFunc returns true if the FuncType matches expected parameters and results types

func IsFuncTypeValueChangeValidationFunc

func IsFuncTypeValueChangeValidationFunc(node ast.Node, info *types.Info) bool

IsFuncTypeValueChangeValidationFunc returns true if the FuncType matches expected parameters and results types

func IsFuncTypeValueConditionFunc

func IsFuncTypeValueConditionFunc(node ast.Node, info *types.Info) bool

IsFuncTypeValueConditionFunc returns true if the FuncType matches expected parameters and results types

func IsFuncTypeValueValidationFunc

func IsFuncTypeValueValidationFunc(node ast.Node, info *types.Info) bool

IsFuncTypeValueValidationFunc returns true if the FuncType matches expected parameters and results types

func IsNamedType

func IsNamedType(t *types.Named, typeName string) bool

IsNamedType returns if the type name matches and is from the helper/customdiff package

func IsTypeResourceConditionFunc

func IsTypeResourceConditionFunc(t types.Type) bool

IsTypeResourceConditionFunc returns if the type is ResourceConditionFunc from the customdiff package

func IsTypeValueChangeConditionFunc

func IsTypeValueChangeConditionFunc(t types.Type) bool

IsTypeValueChangeConditionFunc returns if the type is ValueChangeConditionFunc from the customdiff package

func IsTypeValueChangeValidationFunc

func IsTypeValueChangeValidationFunc(t types.Type) bool

IsTypeValueChangeValidationFunc returns if the type is ValueChangeValidationFunc from the customdiff package

func IsTypeValueConditionFunc

func IsTypeValueConditionFunc(t types.Type) bool

IsTypeValueConditionFunc returns if the type is ValueConditionFunc from the customdiff package

func IsTypeValueValidationFunc

func IsTypeValueValidationFunc(t types.Type) bool

IsTypeValueValidationFunc returns if the type is ValueValidationFunc from the customdiff package

func PackagePathVersion added in v0.15.0

func PackagePathVersion(moduleVersion int) string

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL