Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorReported ¶ added in v0.2.0
ErrorReported 表示命令已接管诊断输出,进程入口不得再次同步打印。 输出流不可用或写入超时也由命令处理,以免进程入口重新阻塞退出。
func NewRoot ¶
func NewRoot(deps Dependencies) *cobra.Command
Types ¶
type AuthService ¶
type ConnectionPreparer ¶
type ConnectionPreparer interface {
Prepare(context.Context, connectapp.Options) (connectapp.Prepared, error)
}
type CredentialRemover ¶
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 }
Click to show internal directories.
Click to hide internal directories.