added basic plugin structure

This commit is contained in:
2022-11-01 14:26:54 +01:00
commit a693cbad37
18 changed files with 481 additions and 0 deletions

29
plugins/gocli/main.go Normal file
View File

@@ -0,0 +1,29 @@
package main
import (
"context"
"log"
"git.front.kjuulh.io/kjuulh/char/pkg/register"
)
type GoCliPlugin struct {
}
// About implements register.Plugin
func (*GoCliPlugin) About() string {
return "gocli"
}
var _ register.Plugin = &GoCliPlugin{}
func main() {
if err := register.
NewPluginBuilder(
"gocli",
&GoCliPlugin{},
).
Serve(context.Background()); err != nil {
log.Fatal(err)
}
}