ui

package
v0.35.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2026 License: AGPL-3.0 Imports: 7 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewComponentManager

func NewComponentManager(logger logging.Logger) *componentManager

Types

type GetPluginComponentsInput

type GetPluginComponentsInput struct {
	Plugin string `json:"plugin"`
}

type GetResourceAreaComponentInput

type GetResourceAreaComponentInput struct {
	Plugin   string                `json:"plugin"`
	Resource string                `json:"resource"`
	Area     ResourceComponentArea `json:"area"`
}

type GetResourceComponentsInput

type GetResourceComponentsInput struct {
	Plugin   string `json:"plugin"`
	Resource string `json:"resource"`
}

type ResourceComponent

type ResourceComponent struct {
	Owner          string                `json:"owner"     yaml:"owner"`
	Name           string                `json:"name"      yaml:"name"`
	Plugin         string                `json:"plugin"    yaml:"plugin"`
	Resource       string                `json:"resource"  yaml:"resource"`
	Area           ResourceComponentArea `json:"area"      yaml:"area"`
	ExtensionPoint string                `json:"extension" yaml:"extension"`
	Extensions     []ResourceComponent   `json:"-"         yaml:"-"`
}

ResourceComponent represents a UI component that can be displayed as part of the UI.

func (ResourceComponent) String

func (rc ResourceComponent) String() string

type ResourceComponentArea

type ResourceComponentArea string
const (
	ResourceComponentAreaSidebar ResourceComponentArea = "SIDEBAR"
	ResourceComponentAreaTable   ResourceComponentArea = "TABLE"
)

type ResourceComponentStore

type ResourceComponentStore map[string]map[string][]ResourceComponent

ResourceComponentStore keeps a nested map of plugin->resourceID->Components so the UI knows what is available to render.

func NewResourceComponentStore

func NewResourceComponentStore() ResourceComponentStore

NewResourceComponentStore creates a new ResourceComponentStore.

func (ResourceComponentStore) AddComponent

func (pcs ResourceComponentStore) AddComponent(resource ResourceComponent) error

AddComponent adds a component to the store.

func (ResourceComponentStore) AddPlugin

func (pcs ResourceComponentStore) AddPlugin(plugin string)

AddPlugin adds a plugin to the store.

func (ResourceComponentStore) GetComponentsByResource

func (pcs ResourceComponentStore) GetComponentsByResource(
	plugin string,
) map[string][]ResourceComponent

GetComponentsByPlugin returns the components for a given plugin.

func (ResourceComponentStore) GetComponentsForResource

func (pcs ResourceComponentStore) GetComponentsForResource(
	plugin, resource string,
) []ResourceComponent

GetComponents returns the components for a given plugin and resource.

func (ResourceComponentStore) RemovePlugin

func (pcs ResourceComponentStore) RemovePlugin(plugin string)

RemovePlugin removes a plugin from the store.

type ServiceWrapper added in v0.4.0

type ServiceWrapper struct {
	// contains filtered or unexported fields
}

ServiceWrapper exposes only frontend-safe methods of componentManager. Internal plugin lifecycle methods (OnPluginInit, OnPluginStart, etc.) are excluded to prevent frontend invocation.

func NewServiceWrapper added in v0.4.0

func NewServiceWrapper(cm *componentManager) *ServiceWrapper

NewServiceWrapper creates a ServiceWrapper around a componentManager.

func (*ServiceWrapper) GetPluginComponents added in v0.4.0

func (s *ServiceWrapper) GetPluginComponents(params GetPluginComponentsInput) map[string][]ResourceComponent

func (*ServiceWrapper) GetResourceAreaComponent added in v0.4.0

func (s *ServiceWrapper) GetResourceAreaComponent(params GetResourceAreaComponentInput) *ResourceComponent

func (*ServiceWrapper) GetResourceComponents added in v0.4.0

func (s *ServiceWrapper) GetResourceComponents(params GetResourceComponentsInput) []ResourceComponent

func (*ServiceWrapper) ServiceShutdown added in v0.4.0

func (s *ServiceWrapper) ServiceShutdown() error

func (*ServiceWrapper) ServiceStartup added in v0.4.0

func (s *ServiceWrapper) ServiceStartup(ctx context.Context, options application.ServiceOptions) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL