Versions in this module Expand all Collapse all v0 v0.6.4 Feb 2, 2026 Changes in this version + type DefaultHostAPI struct + func NewDefaultHostAPI() *DefaultHostAPI + func (h *DefaultHostAPI) CacheDelete(ctx context.Context, key string) error + func (h *DefaultHostAPI) CacheGet(ctx context.Context, key string) ([]byte, bool, error) + func (h *DefaultHostAPI) CacheSet(ctx context.Context, key string, value []byte, ttlSeconds int) error + func (h *DefaultHostAPI) ConfigGet(ctx context.Context, key string) (string, error) + func (h *DefaultHostAPI) DBExec(ctx context.Context, query string, args ...any) (int64, error) + func (h *DefaultHostAPI) DBQuery(ctx context.Context, query string, args ...any) ([]map[string]any, error) + func (h *DefaultHostAPI) HTTPRequest(ctx context.Context, method, url string, headers map[string]string, ...) (int, []byte, error) + func (h *DefaultHostAPI) Log(ctx context.Context, level, message string, fields map[string]any) + func (h *DefaultHostAPI) SendEmail(ctx context.Context, to, subject, body string, html bool) error + func (h *DefaultHostAPI) Translate(ctx context.Context, key string, args ...any) string + type GKRegistration struct + Author string + Description string + Homepage string + Jobs []JobSpec + License string + MenuItems []MenuItemSpec + MinHostVersion string + Name string + Permissions []string + Routes []RouteSpec + Templates []TemplateSpec + Version string + Widgets []WidgetSpec + type HostAPI interface + CacheDelete func(ctx context.Context, key string) error + CacheGet func(ctx context.Context, key string) ([]byte, bool, error) + CacheSet func(ctx context.Context, key string, value []byte, ttlSeconds int) error + ConfigGet func(ctx context.Context, key string) (string, error) + DBExec func(ctx context.Context, query string, args ...any) (int64, error) + DBQuery func(ctx context.Context, query string, args ...any) ([]map[string]any, error) + HTTPRequest func(ctx context.Context, method, url string, headers map[string]string, ...) (int, []byte, error) + Log func(ctx context.Context, level, message string, fields map[string]any) + SendEmail func(ctx context.Context, to, subject, body string, html bool) error + Translate func(ctx context.Context, key string, args ...any) string + type JobSpec struct + Description string + Enabled bool + Handler string + ID string + Schedule string + Timeout string + type Manager struct + func NewManager(host HostAPI) *Manager + func (m *Manager) Call(ctx context.Context, pluginName, fn string, args []byte) ([]byte, error) + func (m *Manager) Disable(name string) error + func (m *Manager) Enable(name string) error + func (m *Manager) Get(name string) (Plugin, bool) + func (m *Manager) Jobs() []PluginJob + func (m *Manager) List() []GKRegistration + func (m *Manager) MenuItems(location string) []PluginMenuItem + func (m *Manager) Register(ctx context.Context, p Plugin) error + func (m *Manager) Routes() []PluginRoute + func (m *Manager) ShutdownAll(ctx context.Context) error + func (m *Manager) Unregister(ctx context.Context, name string) error + func (m *Manager) Widgets(location string) []PluginWidget + type MenuItemSpec struct + Children []MenuItemSpec + ID string + Icon string + Label string + Location string + Order int + Parent string + Path string + type Plugin interface + Call func(ctx context.Context, fn string, args json.RawMessage) (json.RawMessage, error) + GKRegister func() GKRegistration + Init func(ctx context.Context, host HostAPI) error + Shutdown func(ctx context.Context) error + type PluginJob struct + PluginName string + type PluginMenuItem struct + PluginName string + type PluginRoute struct + PluginName string + RouteSpec RouteSpec + type PluginWidget struct + PluginName string + type RouteSpec struct + Description string + Handler string + Method string + Middleware []string + Path string + type TemplateSpec struct + Name string + Override bool + Path string + type WidgetSpec struct + Description string + Handler string + ID string + Location string + Order int + RefreshSec int + Refreshable bool + Size string + Title string