cli

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2026 License: MIT Imports: 26 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorReported added in v0.2.0

func ErrorReported(err error) bool

ErrorReported 表示命令已接管诊断输出,进程入口不得再次同步打印。 输出流不可用或写入超时也由命令处理,以免进程入口重新阻塞退出。

func NewRoot

func NewRoot(deps Dependencies) *cobra.Command

Types

type AuthService

type AuthService interface {
	Login(ctx context.Context, profile string, options authapp.LoginOptions) (authapp.Status, error)
	Status(profile string) (authapp.Status, error)
	Refresh(ctx context.Context, profile string) (authapp.Status, error)
	Logout(ctx context.Context, profile string) error
}

type ConnectionPreparer

type ConnectionPreparer interface {
	Prepare(context.Context, connectapp.Options) (connectapp.Prepared, error)
}

type CredentialRemover

type CredentialRemover interface {
	Delete(string) error
}

type Dependencies

type Dependencies struct {
	Version       string
	Licenses      string
	ConfigPath    string
	Store         projectconfig.Store
	OpenFile      func(string) error
	Stdin         io.Reader
	Stdout        io.Writer
	Stderr        io.Writer
	Credentials   CredentialRemover
	Auth          AuthService
	Resources     ResourceService
	Connect       ConnectionPreparer
	MCP           *agentmcp.Runtime
	MCPSettings   agentmcp.Settings
	RunSSH        func(context.Context, connectapp.Prepared, SSHOptions) error
	RunProxy      func(context.Context, connectapp.Prepared) error
	SelectAccount func([]jumpserver.Account) (jumpserver.Account, error)
}

type ResourceService

type ResourceService interface {
	ListOrganizations(context.Context, string) ([]jumpserver.Organization, error)
	ListAssets(context.Context, string, string, string, int, int) (jumpserver.AssetPage, error)
	FindAsset(context.Context, string, string, string) (jumpserver.AssetDetail, error)
}

type SSHOptions

type SSHOptions struct{ DownloadDirectory string }

Jump to

Keyboard shortcuts

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