plugin_list

package
v0.51.5 Latest Latest
Warning

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

Go to latest
Published: May 10, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrEmptySpaceID = errors.New("space id cannot be empty")

ErrEmptySpaceID is returned when the space ID is empty.

Functions

func NewResolver

func NewResolver(
	b bus.Bus,
	dir ListAvailablePlugins,
	pluginIDs []string,
	volumeID string,
	objectStoreID string,
) directive.Resolver

NewResolver constructs a resolver for ListAvailablePlugins.

pluginIDs is the set of manifest IDs declared in the Space. volumeID and objectStoreID configure KV store access for approval lookups. If empty, the defaults from plugin_approval.CheckApproval are used.

Types

type AvailablePlugin

type AvailablePlugin struct {
	// ManifestID is the manifest identifier.
	ManifestID string
	// Approved indicates the approval state.
	Approved plugin_approval.PluginApprovalState
	// Loaded indicates if the plugin is currently running.
	Loaded bool
	// ManifestInfo contains metadata from the plugin manifest.
	ManifestInfo *ManifestInfo
}

AvailablePlugin describes a plugin's status in a Space.

type AvailablePluginList

type AvailablePluginList struct {
	// Plugins is the list of available plugins.
	Plugins []*AvailablePlugin
}

AvailablePluginList wraps a slice of AvailablePlugin for use as a directive value.

func ExListAvailablePlugins

func ExListAvailablePlugins(
	ctx context.Context,
	b bus.Bus,
	spaceID string,
) (*AvailablePluginList, directive.Reference, error)

ExListAvailablePlugins executes the ListAvailablePlugins directive on the bus.

Returns the list of available plugins for the given space.

type ListAvailablePlugins

type ListAvailablePlugins interface {
	// Directive indicates ListAvailablePlugins is a directive.
	directive.Directive

	// ListAvailablePluginsSpaceID returns the Space ID.
	ListAvailablePluginsSpaceID() string
}

ListAvailablePlugins is a directive to list available plugins for a Space.

Value type: *AvailablePluginList

func NewListAvailablePlugins

func NewListAvailablePlugins(spaceID string) ListAvailablePlugins

NewListAvailablePlugins constructs a new ListAvailablePlugins directive.

type ListAvailablePluginsValue

type ListAvailablePluginsValue = *AvailablePluginList

ListAvailablePluginsValue is the result type for ListAvailablePlugins.

type ManifestInfo

type ManifestInfo struct {

	// Name is the human-readable plugin name (manifest ID).
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// Description is the plugin description from manifest metadata.
	Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
	// Version is the plugin version string (manifest revision).
	Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
	// BuildTypes is the list of build type identifiers (e.g. "dev", "release").
	BuildTypes []string `protobuf:"bytes,4,rep,name=build_types,json=buildTypes,proto3" json:"buildTypes,omitempty"`
	// contains filtered or unexported fields
}

ManifestInfo contains metadata about a plugin's manifest.

func (*ManifestInfo) CloneMessageVT

func (m *ManifestInfo) CloneMessageVT() protobuf_go_lite.CloneMessage

func (*ManifestInfo) CloneVT

func (m *ManifestInfo) CloneVT() *ManifestInfo

func (*ManifestInfo) EqualMessageVT

func (this *ManifestInfo) EqualMessageVT(thatMsg any) bool

func (*ManifestInfo) EqualVT

func (this *ManifestInfo) EqualVT(that *ManifestInfo) bool

func (*ManifestInfo) GetBuildTypes

func (x *ManifestInfo) GetBuildTypes() []string

func (*ManifestInfo) GetDescription

func (x *ManifestInfo) GetDescription() string

func (*ManifestInfo) GetName

func (x *ManifestInfo) GetName() string

func (*ManifestInfo) GetVersion

func (x *ManifestInfo) GetVersion() string

func (*ManifestInfo) MarshalJSON

func (x *ManifestInfo) MarshalJSON() ([]byte, error)

MarshalJSON marshals the ManifestInfo to JSON.

func (*ManifestInfo) MarshalProtoJSON

func (x *ManifestInfo) MarshalProtoJSON(s *json.MarshalState)

MarshalProtoJSON marshals the ManifestInfo message to JSON.

func (*ManifestInfo) MarshalProtoText

func (x *ManifestInfo) MarshalProtoText() string

func (*ManifestInfo) MarshalToSizedBufferVT

func (m *ManifestInfo) MarshalToSizedBufferVT(dAtA []byte) (int, error)

func (*ManifestInfo) MarshalToVT

func (m *ManifestInfo) MarshalToVT(dAtA []byte) (int, error)

func (*ManifestInfo) MarshalVT

func (m *ManifestInfo) MarshalVT() (dAtA []byte, err error)

func (*ManifestInfo) ProtoMessage

func (*ManifestInfo) ProtoMessage()

func (*ManifestInfo) Reset

func (x *ManifestInfo) Reset()

func (*ManifestInfo) SizeVT

func (m *ManifestInfo) SizeVT() (n int)

func (*ManifestInfo) String

func (x *ManifestInfo) String() string

func (*ManifestInfo) UnmarshalJSON

func (x *ManifestInfo) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals the ManifestInfo from JSON.

func (*ManifestInfo) UnmarshalProtoJSON

func (x *ManifestInfo) UnmarshalProtoJSON(s *json.UnmarshalState)

UnmarshalProtoJSON unmarshals the ManifestInfo message from JSON.

func (*ManifestInfo) UnmarshalVT

func (m *ManifestInfo) UnmarshalVT(dAtA []byte) error

Jump to

Keyboard shortcuts

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