- 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
31 lines
657 B
Go
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{})
|
|
}
|