callctxwrite

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: MIT Imports: 7 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 callctxwrite 禁止在 HTTP transport 层(internal/http)直接调用 callctx.With 覆写请求上下文中的身份元数据(TenantID / Partition / Caller)。

认证请求的身份元数据只能由组合根挂接的 authn 中间件从已验签令牌重建; 若管理面用例确需代目标租户执行操作,应在完成权限码校验后的业务层中显式处理。

默认仅对路径匹配 `/internal/http($|/)` 的包生效(可通过 `-callctxwrite.scope` 覆盖), 且默认只查非生成生产代码(_test.go 与生成文件不查)。

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name: "callctxwrite",
	Doc:  "禁止在 HTTP 层(internal/http)直接调用 callctx.With 覆写身份元数据;身份只能由 authn 中间件从已验证凭证重建",
	Run:  run,
}

Analyzer 是 callctxwrite 检查器。

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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