Documentation
¶
Overview ¶
Package nexuscli 是 nexus-cli 的根包,只负责把内嵌资源暴露出去。
嵌入必须发生在被嵌目录的父目录所在包(go:embed 不支持 ".."), 所以 embed 指令放在模块根而不是 internal/ 下。
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultOriginText string
DefaultOriginText 是编译期默认的 Nexus 地址(单一来源)。 运行时 NEXUS_URL 会覆盖它;维护脚本 scripts/sync-spec.sh 也读同一个文件。
View Source
var SpecFS embed.FS
SpecFS 内嵌了 spec/ 目录下的全部文件:
nexus-<version>.json vendor 快照(Nexus 原始 swagger) nexus-tags.generated.yaml 机械层(scripts/gen-tags.sh 生成) nexus-overlay.yaml 人工语义层
运行时由 internal/specs 落盘到缓存目录再交给嵌入的 Restish 加载 —— Restish 的 spec_files 只接受文件路径,而我们的目标是单文件分发。
Functions ¶
This section is empty.
Types ¶
This section is empty.
Directories
¶
| Path | Synopsis |
|---|---|
|
cmd
|
|
|
nexus-cli
command
Command nexus-cli is the Nexus Repository Manager CLI.
|
Command nexus-cli is the Nexus Repository Manager CLI. |
|
internal
|
|
|
commands
Package commands implements everything Restish cannot express: credential and context management, multipart upload, batch upload, task polling, and MCP.
|
Package commands implements everything Restish cannot express: credential and context management, multipart upload, batch upload, task polling, and MCP. |
|
config
Package config 管理 nexus-cli 的连接上下文(context):目标地址 + 凭据。
|
Package config 管理 nexus-cli 的连接上下文(context):目标地址 + 凭据。 |
|
i18n
Package i18n 提供中英双语支持。
|
Package i18n 提供中英双语支持。 |
|
mcpserver
Package mcpserver 把内嵌的 OpenAPI spec 暴露成 MCP 工具。
|
Package mcpserver 把内嵌的 OpenAPI spec 暴露成 MCP 工具。 |
|
nexus
Package nexus is a minimal client for the Nexus REST API.
|
Package nexus is a minimal client for the Nexus REST API. |
|
specs
Package specs 把内嵌的 OpenAPI spec 落盘到缓存目录,交给嵌入的 Restish 加载。
|
Package specs 把内嵌的 OpenAPI spec 落盘到缓存目录,交给嵌入的 Restish 加载。 |
Click to show internal directories.
Click to hide internal directories.