auth_embedded_multi_registry

command
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2025 License: MIT Imports: 10 Imported by: 0

README

Auth Embedded Multi-Registry Example

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:

  1. From the project root, run:

    go run ./examples/auth_embedded_multi_registry

  2. You should see both migrations complete successfully.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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