Files
summercms/examples/hello/plugins/base/plugin.go
Jakub Zych 86969739ae feat(01-02): add optional plugin services and HasPlugin
- App-scoped typed Publish/Lookup with duplicate-provider errors
- Set plugin IDs before Register so HasPlugin sees the full set
- Greeter uses pact.OptionalMessage without importing optional
2026-09-16 13:24:30 +02:00

31 lines
657 B
Go

package base
import (
"embed"
"io/fs"
"git.golem15.com/golem15/summercms/backpack"
"git.golem15.com/golem15/summercms/pact"
"git.golem15.com/golem15/summercms/party"
)
var _ pact.HasConfig = (*Plugin)(nil)
//go:embed config
var configFS embed.FS
// Plugin is the golem15.hello plugin.
type Plugin struct{}
func (p *Plugin) ID() string { return "golem15.hello" }
func (p *Plugin) Requires() []string { return nil }
func (p *Plugin) Register(*backpack.App) error { return nil }
func (p *Plugin) Boot(*backpack.App) error { return nil }
func (p *Plugin) ConfigFS() fs.FS { return configFS }
func init() {
party.Register(&Plugin{})
}