Action - Go SDK

Action type definition

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

Supported Types

OutputWebSearchCallItemActionSearch

1action := components.CreateActionSearch(components.OutputWebSearchCallItemActionSearch{/* values here */})

ActionOpenPage

1action := components.CreateActionOpenPage(components.ActionOpenPage{/* values here */})

ActionFindInPage

1action := components.CreateActionFindInPage(components.ActionFindInPage{/* values here */})

Union Discrimination

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

1switch action.Type {
2 case components.ActionTypeSearchValue:
3 // action.OutputWebSearchCallItemActionSearch is populated
4 case components.ActionTypeOpenPage:
5 // action.ActionOpenPage is populated
6 case components.ActionTypeFindInPage:
7 // action.ActionFindInPage is populated
8 default:
9 // Unknown type - use action.GetUnknownRaw() for raw JSON
10}