Documentation
¶
Index ¶
- type Hook
- type Registry
- func (r *Registry) AddScript(hookName string, script *Script) error
- func (r *Registry) Clear()
- func (r *Registry) Count() int
- func (r *Registry) GetAllHooks() []*Hook
- func (r *Registry) GetHook(name string) (*Hook, error)
- func (r *Registry) GetScripts(hookName string) []*Script
- func (r *Registry) ListHooks() []string
- func (r *Registry) RegisterHook(name, description string) error
- func (r *Registry) RemoveScript(hookName, scriptName string) error
- func (r *Registry) ScriptCount() int
- type Script
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry manages hooks and their scripts
func (*Registry) AddScript ¶
AddScript adds a script to a hook. Upsert semantics: a script with the same name replaces the existing one — this is what makes script hot-reload (re-register after source change) work.
func (*Registry) GetAllHooks ¶
GetAllHooks returns all hooks with their scripts
func (*Registry) GetScripts ¶
GetScripts returns all scripts for a hook
func (*Registry) RegisterHook ¶
RegisterHook registers a new hook point
func (*Registry) RemoveScript ¶
RemoveScript removes a script from a hook
func (*Registry) ScriptCount ¶
ScriptCount returns the total number of scripts across all hooks
Click to show internal directories.
Click to hide internal directories.