Skip to main content
The Go SDK and docs are currently in beta. Report issues on GitHub.

Supported Types

variables := components.CreateVariablesStr(string{/* values here */})

InputText

variables := components.CreateVariablesInputText(components.InputText{/* values here */})

InputImage

variables := components.CreateVariablesInputImage(components.InputImage{/* values here */})

InputFile

variables := components.CreateVariablesInputFile(components.InputFile{/* values here */})

Union Discrimination

Use the Type field to determine which variant is active, then access the corresponding field:
switch variables.Type {
	case components.VariablesTypeStr:
		// variables.Str is populated
	case components.VariablesTypeInputText:
		// variables.InputText is populated
	case components.VariablesTypeInputImage:
		// variables.InputImage is populated
	case components.VariablesTypeInputFile:
		// variables.InputFile is populated
}