Documentation ¶
Index ¶
- func ArchiveGenerator(maxDepth int) *rapid.Generator[*archive.Archive]
- func ArchivePropertyGenerator(maxDepth int) *rapid.Generator[resource.PropertyValue]
- func ArrayPropertyGenerator(maxDepth int) *rapid.Generator[resource.PropertyValue]
- func AssertEqualPropertyValues(t assert.TestingT, expected, actual resource.PropertyValue)
- func AssetGenerator() *rapid.Generator[*asset.Asset]
- func AssetPropertyGenerator() *rapid.Generator[resource.PropertyValue]
- func BoolPropertyGenerator() *rapid.Generator[resource.PropertyValue]
- func IDGenerator() *rapid.Generator[resource.ID]
- func LiteralArchiveGenerator(maxDepth int) *rapid.Generator[*archive.Archive]
- func NullPropertyGenerator() *rapid.Generator[resource.PropertyValue]
- func NumberPropertyGenerator() *rapid.Generator[resource.PropertyValue]
- func ObjectPropertyGenerator(maxDepth int) *rapid.Generator[resource.PropertyValue]
- func OutputPropertyGenerator(maxDepth int) *rapid.Generator[resource.PropertyValue]
- func PropertyKeyGenerator() *rapid.Generator[resource.PropertyKey]
- func PropertyMapGenerator(maxDepth int) *rapid.Generator[resource.PropertyMap]
- func PropertyValueGenerator(maxDepth int) *rapid.Generator[resource.PropertyValue]
- func ResourceReferenceGenerator() *rapid.Generator[resource.ResourceReference]
- func ResourceReferencePropertyGenerator() *rapid.Generator[resource.PropertyValue]
- func SecretPropertyGenerator(maxDepth int) *rapid.Generator[resource.PropertyValue]
- func SemverStringGenerator() *rapid.Generator[string]
- func StringPropertyGenerator() *rapid.Generator[resource.PropertyValue]
- func TextAssetGenerator() *rapid.Generator[*asset.Asset]
- func TypeGenerator() *rapid.Generator[tokens.Type]
- func URNGenerator() *rapid.Generator[resource.URN]
- func UnknownPropertyGenerator() *rapid.Generator[resource.PropertyValue]
- type StackContext
- func (ctx *StackContext) Append(r ...*resource.State) *StackContext
- func (ctx *StackContext) ArrayPropertyGenerator(maxDepth int) *rapid.Generator[resource.PropertyValue]
- func (ctx *StackContext) ObjectPropertyGenerator(maxDepth int) *rapid.Generator[resource.PropertyValue]
- func (ctx *StackContext) OutputPropertyGenerator(maxDepth int) *rapid.Generator[resource.PropertyValue]
- func (ctx *StackContext) ProjectName() string
- func (ctx *StackContext) PropertyMapGenerator(maxDepth int) *rapid.Generator[resource.PropertyMap]
- func (ctx *StackContext) PropertyValueGenerator(maxDepth int) *rapid.Generator[resource.PropertyValue]
- func (ctx *StackContext) ResourceReferenceGenerator() *rapid.Generator[resource.ResourceReference]
- func (ctx *StackContext) ResourceReferencePropertyGenerator() *rapid.Generator[resource.PropertyValue]
- func (ctx *StackContext) Resources() []*resource.State
- func (ctx *StackContext) SecretPropertyGenerator(maxDepth int) *rapid.Generator[resource.PropertyValue]
- func (ctx *StackContext) StackName() string
- func (ctx *StackContext) URNGenerator() *rapid.Generator[resource.URN]
- func (ctx *StackContext) URNSampler() *rapid.Generator[resource.URN]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArchiveGenerator ¶
ArchiveGenerator generates *archive.Archive values.
func ArchivePropertyGenerator ¶
func ArchivePropertyGenerator(maxDepth int) *rapid.Generator[resource.PropertyValue]
ArchivePropertyGenerator generates archive resource.PropertyValues.
func ArrayPropertyGenerator ¶
func ArrayPropertyGenerator(maxDepth int) *rapid.Generator[resource.PropertyValue]
ArrayPropertyGenerator generates array resource.PropertyValues. The maxDepth parameter controls the maximum depth of the elements of the array.
func AssertEqualPropertyValues ¶
func AssertEqualPropertyValues(t assert.TestingT, expected, actual resource.PropertyValue)
func AssetGenerator ¶
AssetGenerator generates *asset.Asset values.
func AssetPropertyGenerator ¶
func AssetPropertyGenerator() *rapid.Generator[resource.PropertyValue]
AssetPropertyGenerator generates asset resource.PropertyValues.
func BoolPropertyGenerator ¶
func BoolPropertyGenerator() *rapid.Generator[resource.PropertyValue]
BoolPropertyGenerator generates boolean resource.PropertyValues.
func IDGenerator ¶
IDGenerator generates legal resource.ID values.
func LiteralArchiveGenerator ¶
LiteralArchiveGenerator generates *archive.Archive values with literal archive contents.
func NullPropertyGenerator ¶
func NullPropertyGenerator() *rapid.Generator[resource.PropertyValue]
NullPropertyGenerator generates the null resource.PropertyValue.
func NumberPropertyGenerator ¶
func NumberPropertyGenerator() *rapid.Generator[resource.PropertyValue]
NumberPropertyGenerator generates numeric resource.PropertyValues.
func ObjectPropertyGenerator ¶
func ObjectPropertyGenerator(maxDepth int) *rapid.Generator[resource.PropertyValue]
ObjectPropertyGenerator generates object resource.PropertyValues. The maxDepth parameter controls the maximum depth of the elements of the object.
func OutputPropertyGenerator ¶
func OutputPropertyGenerator(maxDepth int) *rapid.Generator[resource.PropertyValue]
OutputPropertyGenerator generates output resource.PropertyValues. The maxDepth parameter controls the maximum depth of the resolved value of the output, if any. If a StackContext, the output's dependencies will only refer to resources in the context.
func PropertyKeyGenerator ¶
func PropertyKeyGenerator() *rapid.Generator[resource.PropertyKey]
PropertyKeyGenerator generates legal resource.PropertyKey values.
func PropertyMapGenerator ¶
func PropertyMapGenerator(maxDepth int) *rapid.Generator[resource.PropertyMap]
PropertyMapGenerator generates resource.PropertyMap values. The maxDepth parameter controls the maximum depth of the elements of the map.
func PropertyValueGenerator ¶
func PropertyValueGenerator(maxDepth int) *rapid.Generator[resource.PropertyValue]
PropertyValueGenerator generates arbitrary resource.PropertyValues. The maxDepth parameter controls the maximum number of times the generator may recur.
func ResourceReferenceGenerator ¶
func ResourceReferenceGenerator() *rapid.Generator[resource.ResourceReference]
ResourceReferenceGenerator generates resource.ResourceReference values.
func ResourceReferencePropertyGenerator ¶
func ResourceReferencePropertyGenerator() *rapid.Generator[resource.PropertyValue]
ResourceReferencePropertyGenerator generates resource reference resource.PropertyValues.
func SecretPropertyGenerator ¶
func SecretPropertyGenerator(maxDepth int) *rapid.Generator[resource.PropertyValue]
SecretPropertyGenerator generates secret resource.PropertyValues. The maxDepth parameter controls the maximum depth of the plaintext value of the secret, if any.
func SemverStringGenerator ¶
SemverStringGenerator generates legal semver strings.
func StringPropertyGenerator ¶
func StringPropertyGenerator() *rapid.Generator[resource.PropertyValue]
StringPropertyGenerator generates string resource.PropertyValues.
func TextAssetGenerator ¶
TextAssetGenerator generates textual *asset.Asset values.
func TypeGenerator ¶
TypeGenerator generates legal tokens.Type values.
func URNGenerator ¶
URNGenerator generates legal resource.URN values.
func UnknownPropertyGenerator ¶
func UnknownPropertyGenerator() *rapid.Generator[resource.PropertyValue]
UnknownPropertyGenerator generates the unknown resource.PropertyValue.
Types ¶
type StackContext ¶ added in v3.14.0
type StackContext struct {
// contains filtered or unexported fields
}
A StackContext provides context for generating URNs and references to resources.
func NewStackContext ¶ added in v3.14.0
func NewStackContext(projectName, stackName string, resources ...*resource.State) *StackContext
NewStackContext creates a new stack context with the given project name, stack name, and list of resources.
func (*StackContext) Append ¶ added in v3.14.0
func (ctx *StackContext) Append(r ...*resource.State) *StackContext
Append creates a new context that contains the current context's resources and the given list of resources.
func (*StackContext) ArrayPropertyGenerator ¶ added in v3.14.0
func (ctx *StackContext) ArrayPropertyGenerator(maxDepth int) *rapid.Generator[resource.PropertyValue]
ArrayPropertyGenerator generates array resource.PropertyValues. The maxDepth parameter controls the maximum depth of the elements of the array.
func (*StackContext) ObjectPropertyGenerator ¶ added in v3.14.0
func (ctx *StackContext) ObjectPropertyGenerator(maxDepth int) *rapid.Generator[resource.PropertyValue]
ObjectPropertyGenerator generates object resource.PropertyValues. The maxDepth parameter controls the maximum depth of the elements of the object.
func (*StackContext) OutputPropertyGenerator ¶ added in v3.14.0
func (ctx *StackContext) OutputPropertyGenerator(maxDepth int) *rapid.Generator[resource.PropertyValue]
OutputPropertyGenerator generates output resource.PropertyValues. The maxDepth parameter controls the maximum depth of the resolved value of the output, if any. The output's dependencies will only refer to resources in the context.
func (*StackContext) ProjectName ¶ added in v3.14.0
func (ctx *StackContext) ProjectName() string
ProjectName returns the context's project name.
func (*StackContext) PropertyMapGenerator ¶ added in v3.14.0
func (ctx *StackContext) PropertyMapGenerator(maxDepth int) *rapid.Generator[resource.PropertyMap]
PropertyMapGenerator generates resource.PropertyMap values. The maxDepth parameter controls the maximum depth of the elements of the map.
func (*StackContext) PropertyValueGenerator ¶ added in v3.14.0
func (ctx *StackContext) PropertyValueGenerator(maxDepth int) *rapid.Generator[resource.PropertyValue]
PropertyValueGenerator generates arbitrary resource.PropertyValues. The maxDepth parameter controls the maximum number of times the generator may recur.
func (*StackContext) ResourceReferenceGenerator ¶ added in v3.14.0
func (ctx *StackContext) ResourceReferenceGenerator() *rapid.Generator[resource.ResourceReference]
ResourceReferenceGenerator generates resource.ResourceReference values. The referenced resource is
func (*StackContext) ResourceReferencePropertyGenerator ¶ added in v3.14.0
func (ctx *StackContext) ResourceReferencePropertyGenerator() *rapid.Generator[resource.PropertyValue]
ResourceReferencePropertyGenerator generates resource reference resource.PropertyValues.
func (*StackContext) Resources ¶ added in v3.14.0
func (ctx *StackContext) Resources() []*resource.State
Resources returns the context's resources.
func (*StackContext) SecretPropertyGenerator ¶ added in v3.14.0
func (ctx *StackContext) SecretPropertyGenerator(maxDepth int) *rapid.Generator[resource.PropertyValue]
SecretPropertyGenerator generates secret resource.PropertyValues. The maxDepth parameter controls the maximum depth of the plaintext value of the secret, if any.
func (*StackContext) StackName ¶ added in v3.14.0
func (ctx *StackContext) StackName() string
StackName returns the context's stack name.
func (*StackContext) URNGenerator ¶ added in v3.14.0
func (ctx *StackContext) URNGenerator() *rapid.Generator[resource.URN]
URNGenerator generates URNs that are valid within the context (i.e. the project name and stack name portions of the generated URNs will always be taken from the context).
func (*StackContext) URNSampler ¶ added in v3.14.0
func (ctx *StackContext) URNSampler() *rapid.Generator[resource.URN]
URNSampler samples URNs from the stack's resources.