ImageConfig - Go SDK

ImageConfig type definition

The Go SDK and docs are currently in beta. Report issues on GitHub.

Supported Types

1imageConfig := components.CreateImageConfigStr(string{/* values here */})

1imageConfig := components.CreateImageConfigNumber(float64{/* values here */})

1imageConfig := components.CreateImageConfigArrayOfAny([]any{/* values here */})

Union Discrimination

Use the Type field to determine which variant is active, then access the corresponding field:

1switch imageConfig.Type {
2 case components.ImageConfigTypeStr:
3 // imageConfig.Str is populated
4 case components.ImageConfigTypeNumber:
5 // imageConfig.Number is populated
6 case components.ImageConfigTypeArrayOfAny:
7 // imageConfig.ArrayOfAny is populated
8}