Documentation
¶
Overview ¶
Code generated by github.com/light-speak/lighthouse, YOU CAN FUCKING EDIT BY YOURSELF.
Code generated by github.com/light-speak/lighthouse, YOU CAN FUCKING EDIT BY YOURSELF.
Code generated by github.com/light-speak/lighthouse, YOU CAN FUCKING EDIT BY YOURSELF.
Index ¶
- func AddCommand(command CommandInterface)
- func GetArgs(argDefs []*CommandArg, flagValues map[string]interface{}) (map[string]interface{}, error)
- func GetBoolArg(args map[string]interface{}, name string) (*bool, error)
- func GetDefaultValue(argDef *CommandArg) interface{}
- func GetIntArg(args map[string]interface{}, name string) (*int, error)
- func GetStringArg(args map[string]interface{}, name string) (*string, error)
- func GetTypeName(argType CommandArgType) string
- func Run(c CommandListInterface, args []string) error
- type Command
- type CommandArg
- type CommandArgType
- type CommandInterface
- type CommandListInterface
- type GenCmd
- type Generate
- type GenerateTask
- type Init
- type InitQueue
- type MCPCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCommand ¶
func AddCommand(command CommandInterface)
func GetArgs ¶
func GetArgs(argDefs []*CommandArg, flagValues map[string]interface{}) (map[string]interface{}, error)
func GetBoolArg ¶
GetBoolArg gets a bool argument from the flag values
func GetDefaultValue ¶
func GetDefaultValue(argDef *CommandArg) interface{}
func GetStringArg ¶
GetStringArg gets a string argument from the flag values
func GetTypeName ¶
func GetTypeName(argType CommandArgType) string
func Run ¶
func Run(c CommandListInterface, args []string) error
Types ¶
type Command ¶
type Command struct{}
func (*Command) GetCommands ¶
func (c *Command) GetCommands() []CommandInterface
type CommandArg ¶
type CommandArg struct {
Name string
Type CommandArgType
Usage string
Required bool
Default interface{}
}
type CommandInterface ¶
type CommandInterface interface {
Name() string
Usage() string
Args() []*CommandArg
Action() func(flagValues map[string]interface{}) error
OnExit() func()
}
type CommandListInterface ¶
type CommandListInterface interface {
GetCommands() []CommandInterface
}
type Generate ¶
type Generate struct{}
func (*Generate) Args ¶
func (c *Generate) Args() []*CommandArg
type GenerateTask ¶
type GenerateTask struct{}
func (*GenerateTask) Action ¶
func (c *GenerateTask) Action() func(flagValues map[string]interface{}) error
func (*GenerateTask) Args ¶
func (c *GenerateTask) Args() []*CommandArg
func (*GenerateTask) Name ¶
func (c *GenerateTask) Name() string
func (*GenerateTask) OnExit ¶
func (c *GenerateTask) OnExit() func()
func (*GenerateTask) Usage ¶
func (c *GenerateTask) Usage() string
type InitQueue ¶
type InitQueue struct{}
func (*InitQueue) Args ¶
func (c *InitQueue) Args() []*CommandArg
type MCPCommand ¶ added in v1.2.8
type MCPCommand struct{}
MCPCommand MCP 服务器命令
func (*MCPCommand) Action ¶ added in v1.2.8
func (c *MCPCommand) Action() func(flagValues map[string]interface{}) error
func (*MCPCommand) Args ¶ added in v1.2.8
func (c *MCPCommand) Args() []*CommandArg
func (*MCPCommand) Name ¶ added in v1.2.8
func (c *MCPCommand) Name() string
func (*MCPCommand) OnExit ¶ added in v1.2.8
func (c *MCPCommand) OnExit() func()
func (*MCPCommand) Usage ¶ added in v1.2.8
func (c *MCPCommand) Usage() string
Click to show internal directories.
Click to hide internal directories.