Documentation
¶
Overview ¶
Package domain holds the core plugin domain types.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CatalogManifest ¶
type CatalogManifest struct {
ID string `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
Description string `json:"description"`
LongDescription string `json:"longDescription,omitempty"`
Tags []string `json:"tags,omitempty"`
Author string `json:"author"`
Repo string `json:"repo"`
Docs string `json:"docs,omitempty"`
Image string `json:"image"`
Version string `json:"version"`
MinKleffVersion string `json:"minKleffVersion,omitempty"`
License string `json:"license,omitempty"`
Verified bool `json:"verified"`
Logo string `json:"logo,omitempty"`
Screenshots []string `json:"screenshots,omitempty"`
Config []ConfigField `json:"config,omitempty"`
}
CatalogManifest is a plugin's entry in the remote plugin registry. Shape mirrors the kleff-plugin.json manifest documented in PLUGIN_SPEC.md.
type ConfigField ¶
type ConfigField struct {
// Key is the environment variable name injected into the container.
Key string `json:"key"`
// Label is the human-readable form field label.
Label string `json:"label"`
// Description is shown below the input field.
Description string `json:"description,omitempty"`
// Type is one of: string, secret, number, boolean, select, url.
Type string `json:"type"`
// Required indicates the admin must fill this in before installing.
Required bool `json:"required"`
// Default is the pre-filled default value (optional).
Default string `json:"default,omitempty"`
// Options is the list of choices for type "select".
Options []string `json:"options,omitempty"`
}
ConfigField describes one configuration value the plugin expects. These are rendered as form fields in the Install/Configure modal and injected as environment variables into the plugin container.
type Plugin ¶
type Plugin struct {
// ID is the plugin manifest id, e.g. "idp-keycloak".
ID string
// Type is the plugin capability category, e.g. "idp".
Type string
// DisplayName is the human-readable label.
DisplayName string
// Image is the Docker image reference, e.g. "ghcr.io/kleff/idp-keycloak:1.0.0".
Image string
// Version is the installed version string, e.g. "1.0.0".
Version string
// GRPCAddr is the host:port the platform dials to reach the plugin container.
// e.g. "kleff-idp-keycloak:50051"
GRPCAddr string
// Config holds non-secret configuration values as a JSON blob.
// Values are env-var key → value, e.g. {"KEYCLOAK_URL": "http://keycloak:8080"}.
Config json.RawMessage
// Secrets holds secret configuration values as an AES-256-GCM encrypted JSON blob.
// Never returned in API responses.
Secrets json.RawMessage
// Enabled controls whether this plugin is active.
Enabled bool
// Status is the in-memory runtime status (not persisted).
Status PluginStatus
InstalledAt time.Time
UpdatedAt time.Time
}
Plugin is a fully installed, persisted plugin instance. One record per installed plugin; the primary key is the plugin manifest ID (e.g. "idp-keycloak"), not a surrogate.
type PluginStatus ¶
type PluginStatus string
PluginStatus represents the runtime lifecycle state of a plugin.
const ( PluginStatusInstalling PluginStatus = "installing" PluginStatusRunning PluginStatus = "running" PluginStatusDisabled PluginStatus = "disabled" PluginStatusRemoving PluginStatus = "removing" PluginStatusError PluginStatus = "error" PluginStatusUnknown PluginStatus = "unknown" )
Click to show internal directories.
Click to hide internal directories.