redact

package
v1.0.0-rc.57 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package redact 遮住要交给外部的文本里可能带的凭证:App API 的错误信息、AI 助手存下来与发给各入口的会话内容。

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Credentials

func Credentials(s string) string

Credentials 去掉地址的用户信息与整段查询串,遮 JSON 与 key=value 形式的凭证字段与 Telegram 的 bot token。不碰别的长串: 种子的 info hash 之类的编号原样留着(AI 助手存下来的工具结果要靠它们接着对话)。

func Secrets

func Secrets(s string) string

Secrets 在 Credentials 之外,再按下载器助手遮 tracker 回复的规则(RedactTrackerMessage)遮地址路径里的长串、 passkey=… 一类参数与 24 位以上的长串。错误信息与用户、模型写的文字用它。

func Text

func Text(s string) string

Text 是 AI 助手里用户写的文字与模型的回答:遮地址里的用户信息、查询串与像密钥的路径段,key=value 形式的凭证, 常见格式的 API Key,以及单独的长串;只有种子的 info hash(40 或 64 位十六进制)原样留着 —— 它是下载器里种子的编号, 用户要能指着它说「暂停这个」。NexusPHP 的 passkey 是 32 位,照样遮。

Types

This section is empty.

Jump to

Keyboard shortcuts

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