resource

package
v0.0.0-...-9d70a79 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FuncNameComposeAggregateTestCheckFunc = `ComposeAggregateTestCheckFunc`
	FuncNameComposeTestCheckFunc          = `ComposeTestCheckFunc`
	FuncNameNonRetryableError             = `NonRetryableError`
	FuncNameParallelTest                  = `ParallelTest`
	FuncNamePrefixedUniqueId              = `PrefixedUniqueId`
	FuncNameRetryableError                = `RetryableError`
	FuncNameTest                          = `Test`
	FuncNameTestCheckNoResourceAttr       = `TestCheckNoResourceAttr`
	FuncNameTestCheckOutput               = `TestCheckOutput`
	FuncNameTestCheckResourceAttr         = `TestCheckResourceAttr`
	FuncNameTestCheckResourceAttrPair     = `TestCheckResourceAttrPair`
	FuncNameTestCheckResourceAttrPtr      = `TestCheckResourceAttrPtr`
	FuncNameTestCheckResourceAttrSet      = `TestCheckResourceAttrSet`
	FuncNameTestMatchResourceAttr         = `TestMatchResourceAttr`
	FuncNameUniqueId                      = `UniqueId`
)
View Source
const (
	PackageModule     = terraformtype.ModuleTerraformPluginSdk
	PackageModulePath = `helper/resource`
	PackageName       = `resource`
	PackagePath       = PackageModule + `/` + PackageModulePath
)
View Source
const (
	RetryErrorFieldErr       = `Err`
	RetryErrorFieldRetryable = `Retryable`

	TypeNameRetryError = `RetryError`
)
View Source
const (
	TestCaseFieldCheckDestroy              = `CheckDestroy`
	TestCaseFieldErrorCheck                = `ErrorCheck`
	TestCaseFieldIDRefreshName             = `IDRefreshName`
	TestCaseFieldIDRefreshIgnore           = `IDRefreshIgnore`
	TestCaseFieldIsUnitTest                = `IsUnitTest`
	TestCaseFieldPreCheck                  = `PreCheck`
	TestCaseFieldPreventPostDestroyRefresh = `PreventPostDestroyRefresh`
	TestCaseFieldProviders                 = `Providers`
	TestCaseFieldProviderFactories         = `ProviderFactories`
	TestCaseFieldSteps                     = `Steps`

	TypeNameTestCase = `TestCase`
)
View Source
const (
	TestStepFieldCheck                     = `Check`
	TestStepFieldConfig                    = `Config`
	TestStepFieldDestroy                   = `Destroy`
	TestStepFieldExpectError               = `ExpectError`
	TestStepFieldExpectNonEmptyPlan        = `ExpectNonEmptyPlan`
	TestStepFieldImportState               = `ImportState`
	TestStepFieldImportStateId             = `ImportStateId`
	TestStepFieldImportStateIdFunc         = `ImportStateIdFunc`
	TestStepFieldImportStateIdPrefix       = `ImportStateIdPrefix`
	TestStepFieldImportStateCheck          = `ImportStateCheck`
	TestStepFieldImportStateVerify         = `ImportStateVerify`
	TestStepFieldImportStateVerifyIgnore   = `ImportStateVerifyIgnore`
	TestStepFieldPlanOnly                  = `PlanOnly`
	TestStepFieldPreConfig                 = `PreConfig`
	TestStepFieldPreventDiskCleanup        = `PreventDiskCleanup`
	TestStepFieldPreventPostDestroyRefresh = `PreventPostDestroyRefresh`
	TestStepFieldResourceName              = `ResourceName`
	TestStepFieldSkipFunc                  = `SkipFunc`
	TestStepFieldTaint                     = `Taint`

	TypeNameTestStep = `TestStep`
)

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 resource package

func IsNamedType

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

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

func IsTypeRetryError

func IsTypeRetryError(t types.Type) bool

IsTypeRetryError returns if the type is RetryError from the helper/resource package

func IsTypeTestCase

func IsTypeTestCase(t types.Type) bool

IsTypeTestCase returns if the type is TestCase from the helper/schema package

func IsTypeTestStep

func IsTypeTestStep(t types.Type) bool

IsTypeTestStep returns if the type is TestStep from the helper/schema package

func PackagePathVersion

func PackagePathVersion(moduleVersion int) string

PackagePathVersion returns the import path for a module version

Types

type RetryErrorInfo

type RetryErrorInfo struct {
	AstCompositeLit *ast.CompositeLit
	Fields          map[string]*ast.KeyValueExpr
	RetryError      *retryErrorType
	TypesInfo       *types.Info
}

RetryErrorInfo represents all gathered RetryError data for easier access

func NewRetryErrorInfo

func NewRetryErrorInfo(cl *ast.CompositeLit, info *types.Info) *RetryErrorInfo

NewRetryErrorInfo instantiates a RetryErrorInfo

func (*RetryErrorInfo) DeclaresField

func (info *RetryErrorInfo) DeclaresField(fieldName string) bool

DeclaresField returns true if the field name is present in the AST

type RetryFuncInfo

type RetryFuncInfo struct {
	AstFuncDecl *ast.FuncDecl
	AstFuncLit  *ast.FuncLit
	Body        *ast.BlockStmt
	Node        ast.Node
	Pos         token.Pos
	Type        *ast.FuncType
	TypesInfo   *types.Info
}

RetryFuncInfo represents all gathered RetryFunc data for easier access

func NewRetryFuncInfo

func NewRetryFuncInfo(funcDecl *ast.FuncDecl, funcLit *ast.FuncLit, info *types.Info) *RetryFuncInfo

NewRetryFuncInfo instantiates a RetryFuncInfo

type TestCaseInfo

type TestCaseInfo struct {
	AstCompositeLit *ast.CompositeLit
	Fields          map[string]*ast.KeyValueExpr
	TestCase        *testCaseType
	TypesInfo       *types.Info
}

TestCaseInfo represents all gathered TestCase data for easier access

func NewTestCaseInfo

func NewTestCaseInfo(cl *ast.CompositeLit, info *types.Info) *TestCaseInfo

NewTestCaseInfo instantiates a TestCaseInfo

func (*TestCaseInfo) DeclaresField

func (info *TestCaseInfo) DeclaresField(fieldName string) bool

DeclaresField returns true if the field name is present in the AST

type TestStepInfo

type TestStepInfo struct {
	AstCompositeLit *ast.CompositeLit
	Fields          map[string]*ast.KeyValueExpr
	TestStep        *testStepType
	TypesInfo       *types.Info
}

TestStepInfo represents all gathered TestStep data for easier access

func NewTestStepInfo

func NewTestStepInfo(cl *ast.CompositeLit, info *types.Info) *TestStepInfo

NewTestStepInfo instantiates a TestStepInfo

func (*TestStepInfo) DeclaresField

func (info *TestStepInfo) DeclaresField(fieldName string) bool

DeclaresField returns true if the field name is present in the AST

Jump to

Keyboard shortcuts

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