Aspirerelease/17.0
Watch Aspire live streamsDocsTry Aspire

InteractionInputBuilder

Handle
📦 Aspire.Hosting v17.0.0

An opaque, server-side builder for an InteractionInput used by polyglot AppHosts.

type InteractionInputBuilder interface{}

Methods

Releases uploaded files associated with the input.
ReleaseFiles() error
error

Returns error.

Sets the choice options for the input.
WithChoiceOptions(choices []*InteractionChoiceOption) InteractionInputBuilder
choices[]*InteractionChoiceOptionThe available choices, in display order. Each option pairs a submitted value with a display label.
InteractionInputBuilder

The same builder handle.

Returns a handle; failures surface later via Err().

Attaches a callback that dynamically loads or updates the input after the prompt starts.
WithDynamicLoading(
callback func(arg InteractionInputLoadContext),
options ...*DynamicLoadingOptions,
) InteractionInputBuilder
callbackfunc(arg InteractionInputLoadContext)callbackThe callback invoked to load the input. Use the supplied context to read other inputs and update this input.
options...*DynamicLoadingOptionsOptional settings, described under Options.

Optional parameters are passed as the existing *DynamicLoadingOptions struct.

InteractionInputBuilder

The same builder handle.

Returns a handle; failures surface later via Err().

methodWithValue
Sets the value of the input.
WithValue(value string) InteractionInputBuilder
valuestringThe value to assign.
InteractionInputBuilder

The same builder handle.

Returns a handle; failures surface later via Err().