authtest

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2026 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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