authtest

package
v0.1.0-develop.2026061... Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2026 License: MIT Imports: 3 Imported by: 0

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.

Jump to

Keyboard shortcuts

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