This example shows how to embed apirun into your Go program, acquire and store multiple auth tokens under different logical names, and run migrations where each task chooses a different auth via template variables.
What it demonstrates:
Programmatic acquisition of two Basic tokens, stored as .auth.a1 and .auth.a2
Two migration files; each uses a different Authorization header:
001_check_a.yaml uses "Basic {{.auth.a1}}"
002_check_b.yaml uses "Basic {{.auth.a2}}"
Namespaced env usage: URLs use {{.env.api_base}}
How to run:
From the project root, run:
go run ./examples/auth_embedded_multi_registry
You should see both migrations complete successfully.