Documentation
¶
Index ¶
- type Context
- type DefaultClientFactory
- type DefaultSerivce
- func (inst *DefaultSerivce) AddFilter(priority int, filter cli.Filter) error
- func (inst *DefaultSerivce) FindHandler(name string) (cli.Handler, error)
- func (inst *DefaultSerivce) GetClient(ctx context.Context) cli.Client
- func (inst *DefaultSerivce) GetClientFactory() cli.ClientFactory
- func (inst *DefaultSerivce) GetFilterChain() cli.FilterChain
- func (inst *DefaultSerivce) GetHandlerNames() []string
- func (inst *DefaultSerivce) Init() error
- func (inst *DefaultSerivce) RegisterHandler(name string, h cli.Handler) error
- type MockReporter
- func (inst *MockReporter) HandleCancel(f task.ProgressControlHandlerFn)
- func (inst *MockReporter) HandlePause(f task.ProgressControlHandlerFn)
- func (inst *MockReporter) HandleResume(f task.ProgressControlHandlerFn)
- func (inst *MockReporter) Report(p *task.Progress)
- func (inst *MockReporter) Update(p *task.Progress)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DefaultClientFactory ¶
type DefaultClientFactory struct { markup.Component `id:"cli-client-factory"` CLI *Context `inject:"#cli-context"` }
DefaultClientFactory 命令客户端工厂
func (*DefaultClientFactory) CreateAsyncClient ¶
func (inst *DefaultClientFactory) CreateAsyncClient(ctx context.Context) cli.AsyncClient
CreateAsyncClient 创建异步客户端
func (*DefaultClientFactory) CreateClient ¶
func (inst *DefaultClientFactory) CreateClient(ctx context.Context) cli.Client
CreateClient 创建同步客户端
type DefaultSerivce ¶
type DefaultSerivce struct { markup.Component `id:"cli-service" initMethod:"Init"` CLI *Context `inject:"#cli-context"` // contains filtered or unexported fields }
DefaultSerivce 是默认的 CLI 服务
func (*DefaultSerivce) AddFilter ¶
func (inst *DefaultSerivce) AddFilter(priority int, filter cli.Filter) error
AddFilter ...
func (*DefaultSerivce) FindHandler ¶
func (inst *DefaultSerivce) FindHandler(name string) (cli.Handler, error)
FindHandler ...
func (*DefaultSerivce) GetClient ¶
func (inst *DefaultSerivce) GetClient(ctx context.Context) cli.Client
GetClient ...
func (*DefaultSerivce) GetClientFactory ¶
func (inst *DefaultSerivce) GetClientFactory() cli.ClientFactory
GetClientFactory ...
func (*DefaultSerivce) GetFilterChain ¶
func (inst *DefaultSerivce) GetFilterChain() cli.FilterChain
GetFilterChain ...
func (*DefaultSerivce) GetHandlerNames ¶
func (inst *DefaultSerivce) GetHandlerNames() []string
GetHandlerNames ...
func (*DefaultSerivce) RegisterHandler ¶
func (inst *DefaultSerivce) RegisterHandler(name string, h cli.Handler) error
RegisterHandler ...
type MockReporter ¶ added in v0.0.6
type MockReporter struct { }
func (*MockReporter) HandleCancel ¶ added in v0.0.6
func (inst *MockReporter) HandleCancel(f task.ProgressControlHandlerFn)
func (*MockReporter) HandlePause ¶ added in v0.0.6
func (inst *MockReporter) HandlePause(f task.ProgressControlHandlerFn)
func (*MockReporter) HandleResume ¶ added in v0.0.6
func (inst *MockReporter) HandleResume(f task.ProgressControlHandlerFn)
func (*MockReporter) Report ¶ added in v0.0.6
func (inst *MockReporter) Report(p *task.Progress)
func (*MockReporter) Update ¶ added in v0.0.7
func (inst *MockReporter) Update(p *task.Progress)
Click to show internal directories.
Click to hide internal directories.