tests

package module
v0.0.0-...-f236791 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Value string `pulumi:"value,optional"`
}

type ConfigCustom

type ConfigCustom struct {
	Number  *float64 `pulumi:"number,optional"`
	Squared float64
}

func (*ConfigCustom) Check

func (*ConfigCustom) Check(ctx p.Context,
	name string, oldInputs resource.PropertyMap, newInputs resource.PropertyMap,
) (*ConfigCustom, []p.CheckFailure, error)

func (*ConfigCustom) Configure

func (c *ConfigCustom) Configure(ctx p.Context) error

type Echo

type Echo struct{}

func (*Echo) Create

func (*Echo) Create(ctx p.Context, name string, inputs EchoInputs, preview bool) (string, EchoOutputs, error)

func (*Echo) Update

func (*Echo) Update(ctx p.Context, id string, olds EchoOutputs, news EchoInputs, preview bool) (EchoOutputs, error)

type EchoInputs

type EchoInputs struct {
	String string            `pulumi:"string"`
	Int    int               `pulumi:"int"`
	Map    map[string]string `pulumi:"strMap,optional"`
}

type EchoOutputs

type EchoOutputs struct {
	EchoInputs
	Name      string            `pulumi:"nameOut"`
	StringOut string            `pulumi:"stringOut"`
	IntOut    int               `pulumi:"intOut"`
	MapOut    map[string]string `pulumi:"strMapOut,optional"`
}

type GetJoin

type GetJoin struct{}

func (*GetJoin) Call

func (*GetJoin) Call(ctx p.Context, args JoinArgs) (JoinResult, error)

type Increment

type Increment struct{}

This type helps us test the highly suspicious behavior of naming an input the same as an output, while giving them different values. This should never be done in practice, but we need to accommodate the behavior while we allow it.

func (*Increment) Create

func (*Increment) Create(ctx p.Context, name string, inputs IncrementArgs, preview bool) (string, IncrementOutput, error)

type IncrementArgs

type IncrementArgs struct {
	Number int `pulumi:"int"`
	Other  int `pulumi:"other,optional"`
}

type IncrementOutput

type IncrementOutput struct{ IncrementArgs }

type JoinArgs

type JoinArgs struct {
	Elems []string `pulumi:"elems"`
	Sep   *string  `pulumi:"sep,optional"`
}

func (*JoinArgs) Annotate

func (j *JoinArgs) Annotate(a infer.Annotator)

type JoinResult

type JoinResult struct {
	Result string `pulumi:"result"`
}

type NestedDefaults

type NestedDefaults struct {
	// Direct vars. These don't allow setting zero values.
	String string  `pulumi:"s,optional"`
	Float  float64 `pulumi:"f,optional"`
	Int    int     `pulumi:"i,optional"`
	Bool   bool    `pulumi:"b,optional"`

	// Indirect vars. These should allow setting zero values.
	StringPtr *string  `pulumi:"ps,optional"`
	FloatPtr  *float64 `pulumi:"pf,optional"`
	IntPtr    *int     `pulumi:"pi,optional"`
	BoolPtr   *bool    `pulumi:"pb,optional"`

	// A triple indirect value, included to check that we can handle arbitrary
	// indirection.
	IntPtrPtrPtr ***int `pulumi:"pppi,optional"`
}

func (*NestedDefaults) Annotate

func (w *NestedDefaults) Annotate(a infer.Annotator)

type NoDefaults

type NoDefaults struct {
	String string `pulumi:"s,optional"`
}

We want to make sure we don't effect structs or maps that don't have default values.

type OptWithReq

type OptWithReq struct {
	Required *string `pulumi:"req"`
	Optional *string `pulumi:"opt,optional"`
	Empty    *string `pulumi:"empty,optional"`
}

func (*OptWithReq) Annotate

func (o *OptWithReq) Annotate(a infer.Annotator)

type ReadConfig

type ReadConfig struct{}

func (*ReadConfig) Create

func (w *ReadConfig) Create(
	ctx p.Context, name string, _ ReadConfigArgs, _ bool,
) (string, ReadConfigOutput, error)

type ReadConfigArgs

type ReadConfigArgs struct{}

type ReadConfigCustom

type ReadConfigCustom struct{}

func (*ReadConfigCustom) Create

type ReadConfigCustomArgs

type ReadConfigCustomArgs struct{}

type ReadConfigCustomOutput

type ReadConfigCustomOutput struct {
	Config string `pulumi:"config"`
}

type ReadConfigOutput

type ReadConfigOutput struct {
	Config string `pulumi:"config"`
}

type ReadEnv

type ReadEnv struct{}

Test reading environmental variables as default values.

func (*ReadEnv) Create

func (w *ReadEnv) Create(
	ctx p.Context, name string, inputs ReadEnvArgs, preview bool,
) (string, ReadEnvOutput, error)

type ReadEnvArgs

type ReadEnvArgs struct {
	String  string  `pulumi:"s,optional"`
	Int     int     `pulumi:"i,optional"`
	Float64 float64 `pulumi:"f64,optional"`
	Bool    bool    `pulumi:"b,optional"`
}

func (*ReadEnvArgs) Annotate

func (w *ReadEnvArgs) Annotate(a infer.Annotator)

type ReadEnvOutput

type ReadEnvOutput struct{ ReadEnvArgs }

type Recursive

type Recursive struct{}

func (*Recursive) Create

func (w *Recursive) Create(
	ctx p.Context, name string, inputs RecursiveArgs, preview bool,
) (string, RecursiveOutput, error)

type RecursiveArgs

type RecursiveArgs struct {
	Value string         `pulumi:"value,optional"`
	Other *RecursiveArgs `pulumi:"other,optional"`
}

func (*RecursiveArgs) Annotate

func (w *RecursiveArgs) Annotate(a infer.Annotator)

type RecursiveOutput

type RecursiveOutput struct{ RecursiveArgs }

type Wired

type Wired struct{}

func (*Wired) Create

func (*Wired) Create(ctx p.Context, name string, inputs WiredInputs, preview bool) (string, WiredOutputs, error)

func (*Wired) Update

func (*Wired) Update(
	ctx p.Context, id string, olds WiredOutputs, news WiredInputs, preview bool,
) (WiredOutputs, error)

func (*Wired) WireDependencies

func (*Wired) WireDependencies(f infer.FieldSelector, a *WiredInputs, s *WiredOutputs)

type WiredInputs

type WiredInputs struct {
	String string `pulumi:"string"`
	Int    int    `pulumi:"int"`
}

type WiredOutputs

type WiredOutputs struct {
	Name         string `pulumi:"name"`
	StringAndInt string `pulumi:"stringAndInt"`
	StringPlus   string `pulumi:"stringPlus"`
}

type WiredPlus

type WiredPlus struct{}

Wired plus is like wired, but has its inputs embedded with its outputs.

This allows it to remember old inputs when calculating which fields have changed.

func (*WiredPlus) Create

func (*WiredPlus) Create(ctx p.Context, name string, inputs WiredInputs, preview bool) (string, WiredPlusOutputs, error)

func (*WiredPlus) Update

func (*WiredPlus) Update(
	ctx p.Context, id string, olds WiredPlusOutputs, news WiredInputs, preview bool,
) (WiredPlusOutputs, error)

func (*WiredPlus) WireDependencies

func (*WiredPlus) WireDependencies(f infer.FieldSelector, a *WiredInputs, s *WiredPlusOutputs)

type WiredPlusOutputs

type WiredPlusOutputs struct {
	WiredInputs
	WiredOutputs
}

type WithDefaults

type WithDefaults struct{}

func (*WithDefaults) Create

func (w *WithDefaults) Create(
	ctx p.Context, name string, inputs WithDefaultsArgs, preview bool,
) (string, WithDefaultsOutput, error)

type WithDefaultsArgs

type WithDefaultsArgs struct {
	// We sanity check with some primitive values, but most of this checking is in
	// NestedDefaults.
	String       string                     `pulumi:"s,optional"`
	IntPtr       *int                       `pulumi:"pi,optional"`
	Nested       NestedDefaults             `pulumi:"nested,optional"`
	NestedPtr    *NestedDefaults            `pulumi:"nestedPtr"`
	OptWithReq   *OptWithReq                `pulumi:"optWithReq,optional"`
	ArrNested    []NestedDefaults           `pulumi:"arrNested,optional"`
	ArrNestedPtr []*NestedDefaults          `pulumi:"arrNestedPtr,optional"`
	MapNested    map[string]NestedDefaults  `pulumi:"mapNested,optional"`
	MapNestedPtr map[string]*NestedDefaults `pulumi:"mapNestedPtr,optional"`

	NoDefaultsPtr *NoDefaults `pulumi:"noDefaults,optional"`
}

func (*WithDefaultsArgs) Annotate

func (w *WithDefaultsArgs) Annotate(a infer.Annotator)

type WithDefaultsOutput

type WithDefaultsOutput struct{ WithDefaultsArgs }

Jump to

Keyboard shortcuts

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