commands

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: MIT Imports: 1 Imported by: 0 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 commands 提供所有 CLI command owner 共用的无状态生命周期声明。

Index

Constants

View Source
const LifecycleAnnotationKey = "pixiv-cli.lifecycle"

LifecycleAnnotationKey 是 command owner 与 composition root 之间的生命周期契约。 声明存放在 Cobra command 本身,避免进程级 command-pointer registry 泄漏状态。

Variables

This section is empty.

Functions

func Bind

func Bind(command *cobra.Command, execution Execution)

Bind 把静态生命周期声明写入 command 自身。

func Override

func Override(command *cobra.Command, execution Execution)

Override 供 owner 在输入分类后覆盖当前 leaf 的生命周期声明。

Types

type Execution

type Execution struct {
	StartupHooks    bool
	EnsureConfig    bool
	AutomaticUpdate bool
	MCP             bool
}

Execution 描述 root 在命令执行前后负责的通用生命周期行为。业务资源由各 command owner 的窄依赖端口按需创建,不在这里声明或定位。

func AuthAccount

func AuthAccount() Execution

func AuthBundleImport

func AuthBundleImport() Execution

func AuthExport

func AuthExport() Execution

func AuthLogin

func AuthLogin() Execution

func ConfigPath

func ConfigPath() Execution

func DownloadCommand

func DownloadCommand() Execution

func FanboxAuth

func FanboxAuth() Execution

func FanboxData

func FanboxData() Execution

func FanboxMCP

func FanboxMCP() Execution

func For

func For(command *cobra.Command) Execution

For 返回最近的 owner 声明;未声明命令保留 startup 默认行为。

func HiddenCallback

func HiddenCallback() Execution

func Normal

func Normal() Execution

Normal 返回普通成功 CLI leaf 的共同生命周期。

func PixivData

func PixivData() Execution

func PixivMCP

func PixivMCP() Execution

func UpdateCommand

func UpdateCommand() Execution

Directories

Path Synopsis
Package config 注册 config 命令。
Package config 注册 config 命令。
Package fanbox 注册 FANBOX 命令组及其产品内 owner。
Package fanbox 注册 FANBOX 命令组及其产品内 owner。
auth
Package auth owns local FANBOX authentication commands and secret prompts.
Package auth owns local FANBOX authentication commands and secret prompts.
download
Package download owns FANBOX post asset download commands.
Package download owns FANBOX post asset download commands.
internal/listing
Package listing owns the FANBOX shared paged-read execution and its bounded output commit semantics.
Package listing owns the FANBOX shared paged-read execution and its bounded output commit semantics.
mcp
Package mcp owns the FANBOX stdio command route.
Package mcp owns the FANBOX stdio command route.
post
Package post owns FANBOX content listing and post presentation commands.
Package post owns FANBOX content listing and post presentation commands.
Package deps defines the narrow common wiring used by Pixiv data commands.
Package deps defines the narrow common wiring used by Pixiv data commands.
auth
Package auth 注册 Pixiv auth 命令;具体 OAuth/login helper 也归本目录所有。
Package auth 注册 Pixiv auth 命令;具体 OAuth/login helper 也归本目录所有。
auth/loginpage
Package loginpage 负责渲染 CLI 登录流程临时 HTTP 服务使用的页面。
Package loginpage 负责渲染 CLI 登录流程临时 HTTP 服务使用的页面。
bookmark
Package bookmark owns Pixiv bookmark reads and mutations.
Package bookmark owns Pixiv bookmark reads and mutations.
comment
Package comment owns the Pixiv comment listing command and its presenters.
Package comment owns the Pixiv comment listing command and its presenters.
detail
Package detail owns the Pixiv entity detail command and terminal presenter.
Package detail owns the Pixiv entity detail command and terminal presenter.
download
Package download owns the Pixiv download command and its terminal presenter.
Package download owns the Pixiv download command and its terminal presenter.
follow
Package follow owns Pixiv follow mutations.
Package follow owns Pixiv follow mutations.
internal/listing
Package listing owns Pixiv's shared paged-read execution and its bounded output commit semantics.
Package listing owns Pixiv's shared paged-read execution and its bounded output commit semantics.
mcp
Package mcp 注册 Pixiv MCP 命令。
Package mcp 注册 Pixiv MCP 命令。
mypixiv
Package mypixiv owns the authenticated `pixiv mypixiv` command group.
Package mypixiv owns the authenticated `pixiv mypixiv` command group.
ranking
Package ranking owns the Pixiv illustration ranking command.
Package ranking owns the Pixiv illustration ranking command.
recommended
Package recommended owns personalized Pixiv recommendation output.
Package recommended owns personalized Pixiv recommendation output.
search
Package search owns the Pixiv artwork, novel and user search command routes.
Package search owns the Pixiv artwork, novel and user search command routes.
series
Package series owns the Pixiv artwork and novel series listing command.
Package series owns the Pixiv artwork and novel series listing command.
timeline
Package timeline owns the authenticated `pixiv timeline` command group.
Package timeline owns the authenticated `pixiv timeline` command group.
user
Package user owns the Pixiv user command group.
Package user owns the Pixiv user command group.
Package update 注册 update 命令;更新实现仍归 internal/update。
Package update 注册 update 命令;更新实现仍归 internal/update。

Jump to

Keyboard shortcuts

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