Help us shape the future of Go! Take the 2026 Go Developer Survey

list-event-types

command
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Command list-event-types is the smallest possible FlowCatalyst SDK example. It builds a *client.FlowCatalystClient against a platform URL, calls EventTypes().List, and prints the result.

Two auth flavors are shown:

  • Static bearer token (set via FC_TOKEN env). Fine for scripts.
  • OAuth2 client_credentials (set FC_CLIENT_ID + FC_CLIENT_SECRET
  • FC_ISSUER). The TokenProvider caches tokens until 60s before expiry and refreshes on demand — wire this for long-running services.

Run

FC_BASE_URL=https://api.flowcatalyst.io \
FC_TOKEN=eyJ...                          \
go run ./examples/list-event-types

Or with client credentials:

FC_BASE_URL=https://api.flowcatalyst.io \
FC_ISSUER=https://auth.flowcatalyst.io  \
FC_CLIENT_ID=svc-app                    \
FC_CLIENT_SECRET=...                    \
go run ./examples/list-event-types

Jump to

Keyboard shortcuts

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