Documentation
¶
Index ¶
- Variables
- func Option(key string, dval any) *options.OptionSpec
- type Addon
- func (addon *Addon) Deprecated(msg string) *Addon
- func (addon *Addon) OnRegister(action action.Register) *Addon
- func (addon *Addon) ProvideAPI(api api.Provider) *Addon
- func (addon *Addon) ProvideCommands(cmds ...*command.Command) *Addon
- func (addon *Addon) ProvideServices(svcs ...*services.Service) *Addon
- func (addon *Addon) WithConfig(cfg Config) *Addon
- func (addon *Addon) WithEvents(evs ...events.Event) *Addon
- func (addon *Addon) WithOptions(opts ...*options.OptionSpec) *Addon
- func (addon *Addon) WithSettings(s settings.Settings) *Addon
- type Config
- type Info
- type Manager
- func (m *Manager) Add(addon *Addon) error
- func (m *Manager) Commands() []*command.Command
- func (m *Manager) Events() []events.Event
- func (m *Manager) ExtendOptions(opts *options.Spec) error
- func (m *Manager) ExtendSettings(sb *settings.Blueprint) error
- func (m *Manager) GetAPIs() map[string]api.Provider
- func (m *Manager) Register(sess session.Register) error
- func (m *Manager) Services() []*services.Service
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrInvalidAddonName = fmt.Errorf("%s: invalid addon name", Error)
)
View Source
var (
Error = errors.New("addon")
)
Functions ¶
Types ¶
type Addon ¶
type Addon struct {
// contains filtered or unexported fields
}
func (*Addon) Deprecated ¶ added in v0.100.0
Deprecated allows developers to mark an addon or some of its as deprecated.
func (*Addon) ProvideCommands ¶ added in v0.26.0
func (*Addon) ProvideServices ¶ added in v0.26.0
func (*Addon) WithConfig ¶ added in v0.100.0
func (*Addon) WithEvents ¶ added in v0.100.0
func (*Addon) WithOptions ¶ added in v0.100.0
func (addon *Addon) WithOptions(opts ...*options.OptionSpec) *Addon
type Config ¶
type Config struct {
// Slug is the unique identifier for this addon.
Slug string
// DiscardEvents tells application to discard all events this addon emits.
DiscardEvents bool
// WithoutCommands tells application to discard all commands this addon registers.
WithoutCommands bool
// WithoutServices tells application to discard all services this addon registers.
WithoutServices bool
}
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager() *Manager
Click to show internal directories.
Click to hide internal directories.