usersecret

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KindLLM      = "llm"
	KindExternal = "external"
)

Kind 别名分类,仅用于过滤展示,不参与鉴权/解析。

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	log.Log
	// contains filtered or unexported fields
}

API 是 usersecret 模块的 HTTP 入口 + 依赖容器。

func New

func New(ctx *config.Context) *API

New 构造模块。主密钥缺失不阻断进程启动:enabled=false,路由层返回 5xx, 运维补齐 OCTO_USER_API_KEY_SECRET 后重启即恢复(与 oidc 漏配的降级口径一致)。

func (*API) Route

func (a *API) Route(r *wkhttp.WKHttp)

Route 注册路由。

  • /v1/manager/secrets/* 用户态 CRUD(AuthMiddleware,owner = 当前登录用户)。
  • /v1/bot/secrets/resolve channel 插件 use-time 解析(bf_ bot token 鉴权)。

Jump to

Keyboard shortcuts

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