This commit is contained in:
2022-11-05 23:19:09 +01:00
parent d01dff5774
commit 12880e9ab3
4 changed files with 14 additions and 19 deletions

View File

@@ -16,9 +16,14 @@ type About struct {
Commands []*AboutCommand `json:"commands"`
}
type DoCommand struct {
CommandName string `json:"commandName"`
Args map[string]string `json:"args"`
}
type Plugin interface {
About(ctx context.Context) (*About, error)
Do(ctx context.Context, commandName string, args map[string]string) error
Do(ctx context.Context, cmd *DoCommand) error
}
const PluginKey = "plugin"