Documentation
¶
Overview ¶
Package authtest provides composition-root convenience helpers for AuthPlan constructors. These wrap the error-first auth.NewAuth* with panic-on-error semantics for test fixtures (K8s `resource.MustParse` model).
Import path: `github.com/ghbvf/gocell/kernel/auth/authtest`. K8s `httptest.NewRecorder` precedent for test fixture sub-packages.
Production composition roots (cmd/, examples/) must propagate errors from auth.NewAuth* directly; this helper exists in the authtest sub-package so the symbol cannot be reached from production code without explicitly importing a `*test*`-named package — making the intent visible at every call site.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MustAuthJWT ¶
func MustAuthJWT(v auth.IntentTokenVerifier) auth.AuthJWT
MustAuthJWT wraps auth.NewAuthJWT with panic-on-error. Callers must be `_test.go` files; production composition roots use auth.NewAuthJWT and propagate the error to bootstrap.
func MustAuthJWTFromAssembly ¶
func MustAuthJWTFromAssembly(asm auth.AssemblyRef) auth.AuthJWTFromAssembly
MustAuthJWTFromAssembly wraps auth.NewAuthJWTFromAssembly with panic-on-error. Same caller policy as MustAuthJWT.
func MustAuthServiceToken ¶
func MustAuthServiceToken(store auth.NonceStore, ring auth.HMACKeyring) auth.AuthServiceToken
MustAuthServiceToken wraps auth.NewAuthServiceToken with panic-on-error. Same caller policy as MustAuthJWT.
Types ¶
This section is empty.