initial commit

This commit is contained in:
Zoe
2025-01-07 12:15:09 +00:00
commit 3d6c4c72a7
9 changed files with 281 additions and 0 deletions

30
plugin/main.go Normal file
View File

@@ -0,0 +1,30 @@
package main
import "github.com/gofiber/fiber/v3"
type MyPlugin struct{}
func (p MyPlugin) Name() string {
return "my plugin"
}
func (p MyPlugin) Init() error {
return nil
}
func (p MyPlugin) Domains() []string {
return []string{"myplugin.local"}
}
func (p MyPlugin) RegisterRoutes(router fiber.Router) {
router.Get("/", func(c fiber.Ctx) error {
return c.SendString("Welcome to MyPlugin!")
})
router.Get("/hello", func(c fiber.Ctx) error {
return c.SendString("Hello from MyPlugin!")
})
}
// Exported symbol
var Plugin MyPlugin