MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / AvailableMetadata

Function AvailableMetadata

internal/ui/plugins/loader.go:88–104  ·  view source on GitHub ↗

AvailableMetadata returns metadata for all registered plugins sorted by name.

()

Source from the content-addressed store, hash-verified

86
87// AvailableMetadata returns metadata for all registered plugins sorted by name.
88func AvailableMetadata() []Info {
89 infos := make([]Info, 0, len(registry))
90 for id, factory := range registry {
91 instance := factory()
92 infos = append(infos, Info{
93 ID: id,
94 Name: instance.Name(),
95 Description: instance.Description(),
96 })
97 }
98
99 sort.Slice(infos, func(i, j int) bool {
100 return infos[i].Name < infos[j].Name
101 })
102
103 return infos
104}

Callers 2

RunAppFunction · 0.92
TestAvailableMetadataFunction · 0.85

Calls 3

factoryFuncType · 0.85
NameMethod · 0.65
DescriptionMethod · 0.65

Tested by 1

TestAvailableMetadataFunction · 0.68