resource

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2026 License: AGPL-3.0 Imports: 33 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

View Source
const (
	EventConnectionStatus = "connection/status"
	EventWatchState       = "watch/STATE"
)

Event constants for resource controller events.

View Source
const PluginName = "resource"

Variables

This section is empty.

Functions

This section is empty.

Types

type AdapterV1 added in v0.2.0

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

AdapterV1 wraps SDK v1 resource.Provider as the engine canonical ResourceProvider. For v1, this is a direct pass-through (types are identical). When v2 ships and canonical types diverge, AdapterV1 translates v1 → canonical.

func NewAdapterV1 added in v0.2.0

func NewAdapterV1(inner resource.Provider) *AdapterV1

NewAdapterV1 creates a new AdapterV1.

func (*AdapterV1) CheckConnection added in v0.2.3

func (a *AdapterV1) CheckConnection(ctx context.Context, connectionID string) (types.ConnectionStatus, error)

func (*AdapterV1) Create added in v0.2.0

func (a *AdapterV1) Create(
	ctx context.Context,
	key string,
	input resource.CreateInput,
) (*resource.CreateResult, error)

func (*AdapterV1) Delete added in v0.2.0

func (a *AdapterV1) Delete(
	ctx context.Context,
	key string,
	input resource.DeleteInput,
) (*resource.DeleteResult, error)

func (*AdapterV1) DeleteConnection added in v0.2.0

func (a *AdapterV1) DeleteConnection(ctx context.Context, id string) error

func (*AdapterV1) EnsureResourceWatch added in v0.2.0

func (a *AdapterV1) EnsureResourceWatch(ctx context.Context, connectionID, resourceKey string) error

func (*AdapterV1) ExecuteAction added in v0.2.0

func (a *AdapterV1) ExecuteAction(
	ctx context.Context,
	key, actionID string,
	input resource.ActionInput,
) (*resource.ActionResult, error)

func (*AdapterV1) Find added in v0.2.0

func (a *AdapterV1) Find(ctx context.Context, key string, input resource.FindInput) (*resource.FindResult, error)

func (*AdapterV1) Get added in v0.2.0

func (a *AdapterV1) Get(ctx context.Context, key string, input resource.GetInput) (*resource.GetResult, error)

func (*AdapterV1) GetActions added in v0.2.0

func (a *AdapterV1) GetActions(ctx context.Context, key string) ([]resource.ActionDescriptor, error)

func (*AdapterV1) GetConnection added in v0.2.0

func (a *AdapterV1) GetConnection(ctx context.Context, id string) (types.Connection, error)

func (*AdapterV1) GetConnectionNamespaces added in v0.2.0

func (a *AdapterV1) GetConnectionNamespaces(ctx context.Context, id string) ([]string, error)

func (*AdapterV1) GetEditorSchemas added in v0.2.0

func (a *AdapterV1) GetEditorSchemas(ctx context.Context, connectionID string) ([]resource.EditorSchema, error)

func (*AdapterV1) GetFilterFields added in v0.2.0

func (a *AdapterV1) GetFilterFields(
	ctx context.Context,
	connectionID, resourceKey string,
) ([]resource.FilterField, error)

func (*AdapterV1) GetHealth added in v0.2.0

func (a *AdapterV1) GetHealth(
	ctx context.Context,
	connectionID, resourceKey string,
	data json.RawMessage,
) (*resource.ResourceHealth, error)

func (*AdapterV1) GetRelationships added in v0.2.0

func (a *AdapterV1) GetRelationships(
	ctx context.Context,
	resourceKey string,
) ([]resource.RelationshipDescriptor, error)

func (*AdapterV1) GetResourceCapabilities added in v0.2.0

func (a *AdapterV1) GetResourceCapabilities(
	ctx context.Context,
	resourceKey string,
) (*resource.ResourceCapabilities, error)

func (*AdapterV1) GetResourceDefinition added in v0.2.0

func (a *AdapterV1) GetResourceDefinition(ctx context.Context, id string) (resource.ResourceDefinition, error)

func (*AdapterV1) GetResourceEvents added in v0.2.0

func (a *AdapterV1) GetResourceEvents(
	ctx context.Context,
	connectionID, resourceKey, id, namespace string,
	limit int32,
) ([]resource.ResourceEvent, error)

func (*AdapterV1) GetResourceGroup added in v0.2.0

func (a *AdapterV1) GetResourceGroup(ctx context.Context, id string) (resource.ResourceGroup, error)

func (*AdapterV1) GetResourceGroups added in v0.2.0

func (a *AdapterV1) GetResourceGroups(ctx context.Context, connectionID string) map[string]resource.ResourceGroup

func (*AdapterV1) GetResourceSchema added in v0.2.0

func (a *AdapterV1) GetResourceSchema(ctx context.Context, connectionID, resourceKey string) (json.RawMessage, error)

func (*AdapterV1) GetResourceType added in v0.2.0

func (a *AdapterV1) GetResourceType(ctx context.Context, id string) (*resource.ResourceMeta, error)

func (*AdapterV1) GetResourceTypes added in v0.2.0

func (a *AdapterV1) GetResourceTypes(ctx context.Context, connectionID string) map[string]resource.ResourceMeta

func (*AdapterV1) GetWatchState added in v0.2.0

func (a *AdapterV1) GetWatchState(ctx context.Context, connectionID string) (*resource.WatchConnectionSummary, error)

func (*AdapterV1) HasResourceType added in v0.2.0

func (a *AdapterV1) HasResourceType(ctx context.Context, id string) bool

func (*AdapterV1) HasWatch added in v0.2.0

func (a *AdapterV1) HasWatch(ctx context.Context, connectionID string) bool

func (*AdapterV1) IsResourceWatchRunning added in v0.2.0

func (a *AdapterV1) IsResourceWatchRunning(ctx context.Context, connectionID, resourceKey string) (bool, error)

func (*AdapterV1) List added in v0.2.0

func (a *AdapterV1) List(ctx context.Context, key string, input resource.ListInput) (*resource.ListResult, error)

func (*AdapterV1) ListConnections added in v0.2.0

func (a *AdapterV1) ListConnections(ctx context.Context) ([]types.Connection, error)

func (*AdapterV1) ListenForEvents added in v0.2.0

func (a *AdapterV1) ListenForEvents(ctx context.Context, sink resource.WatchEventSink) error

func (*AdapterV1) LoadConnections added in v0.2.0

func (a *AdapterV1) LoadConnections(ctx context.Context) ([]types.Connection, error)

func (*AdapterV1) ResolveRelationships added in v0.2.0

func (a *AdapterV1) ResolveRelationships(
	ctx context.Context,
	connectionID, resourceKey, id, namespace string,
) ([]resource.ResolvedRelationship, error)

func (*AdapterV1) RestartResourceWatch added in v0.2.0

func (a *AdapterV1) RestartResourceWatch(ctx context.Context, connectionID, resourceKey string) error

func (*AdapterV1) StartConnection added in v0.2.0

func (a *AdapterV1) StartConnection(ctx context.Context, connectionID string) (types.ConnectionStatus, error)

func (*AdapterV1) StartConnectionWatch added in v0.2.0

func (a *AdapterV1) StartConnectionWatch(ctx context.Context, connectionID string) error

func (*AdapterV1) StopConnection added in v0.2.0

func (a *AdapterV1) StopConnection(ctx context.Context, connectionID string) (types.Connection, error)

func (*AdapterV1) StopConnectionWatch added in v0.2.0

func (a *AdapterV1) StopConnectionWatch(ctx context.Context, connectionID string) error

func (*AdapterV1) StopResourceWatch added in v0.2.0

func (a *AdapterV1) StopResourceWatch(ctx context.Context, connectionID, resourceKey string) error

func (*AdapterV1) StreamAction added in v0.2.0

func (a *AdapterV1) StreamAction(
	ctx context.Context,
	key, actionID string,
	input resource.ActionInput,
	stream chan<- resource.ActionEvent,
) error

func (*AdapterV1) Update added in v0.2.0

func (a *AdapterV1) Update(
	ctx context.Context,
	key string,
	input resource.UpdateInput,
) (*resource.UpdateResult, error)

func (*AdapterV1) UpdateConnection added in v0.2.0

func (a *AdapterV1) UpdateConnection(ctx context.Context, connection types.Connection) (types.Connection, error)

func (*AdapterV1) WatchConnections added in v0.2.0

func (a *AdapterV1) WatchConnections(ctx context.Context, stream chan<- []types.Connection) error

type ClientCreateInput added in v0.2.1

type ClientCreateInput struct {
	Input     interface{} `json:"input"`
	Namespace string      `json:"namespace"`
}

ClientCreateInput accepts interface{} from the frontend instead of json.RawMessage.

type ClientListResult added in v0.2.1

type ClientListResult struct {
	Result     []interface{} `json:"result"`
	Success    bool          `json:"success"`
	TotalCount int           `json:"totalCount"`
	NextCursor string        `json:"nextCursor,omitempty"`
}

ClientListResult wraps a multi-resource SDK result for the frontend.

type ClientResult added in v0.2.1

type ClientResult struct {
	Result  interface{} `json:"result"`
	Success bool        `json:"success"`
}

ClientResult wraps a single-resource SDK result for the frontend.

type ClientUpdateInput added in v0.2.1

type ClientUpdateInput struct {
	Input     interface{} `json:"input"`
	ID        string      `json:"id"`
	Namespace string      `json:"namespace"`
}

ClientUpdateInput accepts interface{} from the frontend instead of json.RawMessage.

type ConnectionState added in v0.2.0

type ConnectionState struct {
	// Connection metadata (name, avatar, labels, etc.)
	Connection types.Connection `json:"connection"`

	// Whether this connection is actively started/connected.
	Started bool `json:"started"`

	// Per-resource watch states (resource key → WatchState enum).
	Resources map[string]sdkresource.WatchState `json:"resources"`

	// Per-resource object counts (resource key → count of cached objects).
	ResourceCounts map[string]int `json:"resourceCounts"`

	// Aggregate counts computed server-side.
	TotalResources int `json:"totalResources"`
	SyncedCount    int `json:"syncedCount"`
	ErrorCount     int `json:"errorCount"`

	// ISO 8601 timestamp of the last successful sync, or empty if never synced.
	// String instead of time.Time for Wails serialization compatibility.
	LastSyncTime string `json:"lastSyncTime,omitempty"`
}

ConnectionState is the full state snapshot for a single connection, combining metadata, lifecycle, and watch state. Returned by GetAllConnectionStates so the frontend can hydrate everything in a single call.

type ConnectionStatusPayload added in v0.4.0

type ConnectionStatusPayload struct {
	PluginID     string `json:"pluginID"`
	ConnectionID string `json:"connectionID"`
	Status       string `json:"status"`
	Name         string `json:"name"`
}

ConnectionStatusPayload is emitted when a connection's status changes.

type Controller

type Controller interface {
	plugintypes.ConnectedController
	Service
	SetCrashCallback(cb func(pluginID string))
	Graph() *graph.RelationshipGraph
}

Controller is the lifecycle + service interface for the resource capability.

func NewController

func NewController(
	logger logging.Logger,
	sp pkgsettings.Provider,
	pluginStoreFn func(string) (*appstate.ScopedRoot, error),
) Controller

NewController creates a new resource Controller. pluginStoreFn returns a ScopedRoot for the given plugin's store directory.

type EventEmitter added in v0.2.0

type EventEmitter interface {
	Emit(eventKey string, data ...any)
}

EventEmitter abstracts event emission for testability. Production uses appEmitter; tests use recordingEmitter.

type GraphService added in v0.3.0

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

GraphService exposes graph query methods to the frontend via Wails binding.

func NewGraphService added in v0.3.0

func NewGraphService(g *graph.RelationshipGraph) *GraphService

NewGraphService creates a new GraphService.

func (*GraphService) GetDependencyTree added in v0.3.0

func (s *GraphService) GetDependencyTree(
	pluginID, connectionID, resourceKey, namespace, id string,
	maxDepth int,
) (*graph.DependencyTree, error)

GetDependencyTree follows all outgoing edges recursively.

func (*GraphService) GetRelated added in v0.3.0

func (s *GraphService) GetRelated(
	pluginID, connectionID, resourceKey, namespace, id string,
	direction string,
	relType *string,
) ([]graph.GraphEdge, error)

GetRelated returns edges connected to the given node.

func (*GraphService) GetRelationshipChain added in v0.3.0

func (s *GraphService) GetRelationshipChain(
	pluginID, connectionID, resourceKey, namespace, id string,
	relType string, maxDepth int,
) ([][]graph.GraphEdge, error)

GetRelationshipChain follows edges of a specific type up to maxDepth hops.

type NoopEmitter added in v0.4.0

type NoopEmitter struct{}

NoopEmitter silently discards all events. Used before the app is initialized.

func (NoopEmitter) Emit added in v0.4.0

func (NoopEmitter) Emit(string, ...any)

type ResourceProvider added in v0.2.0

type ResourceProvider interface {
	// CRUD
	Get(ctx context.Context, key string, input resource.GetInput) (*resource.GetResult, error)
	List(ctx context.Context, key string, input resource.ListInput) (*resource.ListResult, error)
	Find(ctx context.Context, key string, input resource.FindInput) (*resource.FindResult, error)
	Create(ctx context.Context, key string, input resource.CreateInput) (*resource.CreateResult, error)
	Update(ctx context.Context, key string, input resource.UpdateInput) (*resource.UpdateResult, error)
	Delete(ctx context.Context, key string, input resource.DeleteInput) (*resource.DeleteResult, error)

	// Connection lifecycle
	StartConnection(ctx context.Context, connectionID string) (types.ConnectionStatus, error)
	StopConnection(ctx context.Context, connectionID string) (types.Connection, error)
	CheckConnection(ctx context.Context, connectionID string) (types.ConnectionStatus, error)
	LoadConnections(ctx context.Context) ([]types.Connection, error)
	ListConnections(ctx context.Context) ([]types.Connection, error)
	GetConnection(ctx context.Context, id string) (types.Connection, error)
	GetConnectionNamespaces(ctx context.Context, id string) ([]string, error)
	UpdateConnection(ctx context.Context, connection types.Connection) (types.Connection, error)
	DeleteConnection(ctx context.Context, id string) error
	WatchConnections(ctx context.Context, stream chan<- []types.Connection) error

	// Watch
	StartConnectionWatch(ctx context.Context, connectionID string) error
	StopConnectionWatch(ctx context.Context, connectionID string) error
	HasWatch(ctx context.Context, connectionID string) bool
	GetWatchState(ctx context.Context, connectionID string) (*resource.WatchConnectionSummary, error)
	ListenForEvents(ctx context.Context, sink resource.WatchEventSink) error
	EnsureResourceWatch(ctx context.Context, connectionID, resourceKey string) error
	StopResourceWatch(ctx context.Context, connectionID, resourceKey string) error
	RestartResourceWatch(ctx context.Context, connectionID, resourceKey string) error
	IsResourceWatchRunning(ctx context.Context, connectionID, resourceKey string) (bool, error)

	// Type metadata
	GetResourceGroups(ctx context.Context, connectionID string) map[string]resource.ResourceGroup
	GetResourceGroup(ctx context.Context, id string) (resource.ResourceGroup, error)
	GetResourceTypes(ctx context.Context, connectionID string) map[string]resource.ResourceMeta
	GetResourceType(ctx context.Context, id string) (*resource.ResourceMeta, error)
	HasResourceType(ctx context.Context, id string) bool
	GetResourceDefinition(ctx context.Context, id string) (resource.ResourceDefinition, error)
	GetResourceCapabilities(ctx context.Context, resourceKey string) (*resource.ResourceCapabilities, error)
	GetResourceSchema(ctx context.Context, connectionID, resourceKey string) (json.RawMessage, error)
	GetFilterFields(ctx context.Context, connectionID, resourceKey string) ([]resource.FilterField, error)

	// Actions
	GetActions(ctx context.Context, key string) ([]resource.ActionDescriptor, error)
	ExecuteAction(ctx context.Context, key, actionID string, input resource.ActionInput) (*resource.ActionResult, error)
	StreamAction(
		ctx context.Context,
		key, actionID string,
		input resource.ActionInput,
		stream chan<- resource.ActionEvent,
	) error

	// Editor schemas
	GetEditorSchemas(ctx context.Context, connectionID string) ([]resource.EditorSchema, error)

	// Relationships
	GetRelationships(ctx context.Context, resourceKey string) ([]resource.RelationshipDescriptor, error)
	ResolveRelationships(
		ctx context.Context,
		connectionID, resourceKey, id, namespace string,
	) ([]resource.ResolvedRelationship, error)

	// Health
	GetHealth(
		ctx context.Context,
		connectionID, resourceKey string,
		data json.RawMessage,
	) (*resource.ResourceHealth, error)
	GetResourceEvents(
		ctx context.Context,
		connectionID, resourceKey, id, namespace string,
		limit int32,
	) ([]resource.ResourceEvent, error)
}

ResourceProvider is the engine's version-independent interface for resource plugins. The controller and frontend bindings use this interface exclusively. Adapters translate between versioned SDK types and this interface.

For v1, method signatures use SDK v1 types directly (they're identical). When v2 introduces breaking type changes, canonical types diverge here.

type Service added in v0.2.0

type Service interface {
	ListPlugins() ([]string, error)

	// CRUD
	Get(pluginID, connectionID, key string, input resource.GetInput) (*resource.GetResult, error)
	List(pluginID, connectionID, key string, input resource.ListInput) (*resource.ListResult, error)
	Find(pluginID, connectionID, key string, input resource.FindInput) (*resource.FindResult, error)
	Create(pluginID, connectionID, key string, input resource.CreateInput) (*resource.CreateResult, error)
	Update(pluginID, connectionID, key string, input resource.UpdateInput) (*resource.UpdateResult, error)
	Delete(pluginID, connectionID, key string, input resource.DeleteInput) (*resource.DeleteResult, error)

	// Connection lifecycle
	StartConnection(pluginID, connectionID string) (types.ConnectionStatus, error)
	StopConnection(pluginID, connectionID string) (types.Connection, error)
	CheckConnection(pluginID, connectionID string) (types.ConnectionStatus, error)
	LoadConnections(pluginID string) ([]types.Connection, error)
	ListConnections(pluginID string) ([]types.Connection, error)
	ListAllConnections() (map[string][]types.Connection, error)
	GetAllConnectionStates() (map[string][]ConnectionState, error)
	GetConnection(pluginID, connectionID string) (types.Connection, error)
	GetConnectionNamespaces(pluginID, connectionID string) ([]string, error)
	AddConnection(pluginID string, connection types.Connection) error
	UpdateConnection(pluginID string, connection types.Connection) (types.Connection, error)
	RemoveConnection(pluginID, connectionID string) error

	// Watch lifecycle
	StartConnectionWatch(pluginID, connectionID string) error
	StopConnectionWatch(pluginID, connectionID string) error
	GetWatchState(pluginID, connectionID string) (*resource.WatchConnectionSummary, error)
	EnsureResourceWatch(pluginID, connectionID, resourceKey string) error
	StopResourceWatch(pluginID, connectionID, resourceKey string) error
	RestartResourceWatch(pluginID, connectionID, resourceKey string) error
	IsResourceWatchRunning(pluginID, connectionID, resourceKey string) (bool, error)

	// Subscriptions (engine-side, ref-counted)
	SubscribeResource(pluginID, connectionID, resourceKey string) error
	UnsubscribeResource(pluginID, connectionID, resourceKey string) error

	// Type metadata
	GetResourceGroups(pluginID, connectionID string) map[string]resource.ResourceGroup
	GetResourceGroup(pluginID, groupID string) (resource.ResourceGroup, error)
	GetResourceTypes(pluginID, connectionID string) map[string]resource.ResourceMeta
	GetResourceType(pluginID, typeID string) (*resource.ResourceMeta, error)
	HasResourceType(pluginID, typeID string) bool
	GetResourceDefinition(pluginID, typeID string) (resource.ResourceDefinition, error)
	GetResourceCapabilities(pluginID, key string) (*resource.ResourceCapabilities, error)
	GetFilterFields(pluginID, connectionID, key string) ([]resource.FilterField, error)
	GetResourceSchema(pluginID, connectionID, key string) (json.RawMessage, error)

	// Actions
	GetActions(pluginID, connectionID, key string) ([]resource.ActionDescriptor, error)
	ExecuteAction(pluginID, connectionID, key, actionID string, input resource.ActionInput) (*resource.ActionResult, error)
	StreamAction(pluginID, connectionID, key, actionID string, input resource.ActionInput) (string, error)

	// Editor schemas
	GetEditorSchemas(pluginID, connectionID string) ([]resource.EditorSchema, error)

	// Relationships
	GetRelationships(pluginID, key string) ([]resource.RelationshipDescriptor, error)
	ResolveRelationships(pluginID, connectionID, key, id, namespace string) ([]resource.ResolvedRelationship, error)

	// Health
	GetHealth(pluginID, connectionID, key string, data json.RawMessage) (*resource.ResourceHealth, error)
	GetResourceEvents(pluginID, connectionID, key, id, namespace string, limit int32) ([]resource.ResourceEvent, error)
}

Service is the Wails-bound public API for resource operations. Every method prefixes with pluginID to route to the correct plugin's ResourceProvider.

type ServiceWrapper added in v0.4.0

type ServiceWrapper struct {
	Ctrl Controller
}

ServiceWrapper is an explicit delegation wrapper around resource.Controller. Excluded: OnPluginInit, OnPluginStart, OnPluginStop, OnPluginShutdown,

OnPluginDestroy, Run, SetCrashCallback, Graph

func (*ServiceWrapper) AddConnection added in v0.4.0

func (s *ServiceWrapper) AddConnection(pluginID string, connection sdktypes.Connection) error

func (*ServiceWrapper) CheckConnection added in v0.4.0

func (s *ServiceWrapper) CheckConnection(pluginID, connectionID string) (sdktypes.ConnectionStatus, error)

func (*ServiceWrapper) Create added in v0.4.0

func (s *ServiceWrapper) Create(
	pluginID, connectionID, key string,
	input sdkresource.CreateInput,
) (*sdkresource.CreateResult, error)

func (*ServiceWrapper) Delete added in v0.4.0

func (s *ServiceWrapper) Delete(
	pluginID, connectionID, key string,
	input sdkresource.DeleteInput,
) (*sdkresource.DeleteResult, error)

func (*ServiceWrapper) EnsureResourceWatch added in v0.4.0

func (s *ServiceWrapper) EnsureResourceWatch(pluginID, connectionID, resourceKey string) error

func (*ServiceWrapper) ExecuteAction added in v0.4.0

func (s *ServiceWrapper) ExecuteAction(
	pluginID, connectionID, key, actionID string,
	input sdkresource.ActionInput,
) (*sdkresource.ActionResult, error)

func (*ServiceWrapper) Find added in v0.4.0

func (s *ServiceWrapper) Find(
	pluginID, connectionID, key string,
	input sdkresource.FindInput,
) (*sdkresource.FindResult, error)

func (*ServiceWrapper) Get added in v0.4.0

func (s *ServiceWrapper) Get(
	pluginID, connectionID, key string,
	input sdkresource.GetInput,
) (*sdkresource.GetResult, error)

CRUD.

func (*ServiceWrapper) GetActions added in v0.4.0

func (s *ServiceWrapper) GetActions(pluginID, connectionID, key string) ([]sdkresource.ActionDescriptor, error)

Actions.

func (*ServiceWrapper) GetAllConnectionStates added in v0.4.0

func (s *ServiceWrapper) GetAllConnectionStates() (map[string][]ConnectionState, error)

func (*ServiceWrapper) GetConnection added in v0.4.0

func (s *ServiceWrapper) GetConnection(pluginID, connectionID string) (sdktypes.Connection, error)

func (*ServiceWrapper) GetConnectionNamespaces added in v0.4.0

func (s *ServiceWrapper) GetConnectionNamespaces(pluginID, connectionID string) ([]string, error)

func (*ServiceWrapper) GetEditorSchemas added in v0.4.0

func (s *ServiceWrapper) GetEditorSchemas(pluginID, connectionID string) ([]sdkresource.EditorSchema, error)

Editor schemas.

func (*ServiceWrapper) GetFilterFields added in v0.4.0

func (s *ServiceWrapper) GetFilterFields(pluginID, connectionID, key string) ([]sdkresource.FilterField, error)

func (*ServiceWrapper) GetHealth added in v0.4.0

func (s *ServiceWrapper) GetHealth(
	pluginID, connectionID, key string,
	data json.RawMessage,
) (*sdkresource.ResourceHealth, error)

Health.

func (*ServiceWrapper) GetRelationships added in v0.4.0

func (s *ServiceWrapper) GetRelationships(pluginID, key string) ([]sdkresource.RelationshipDescriptor, error)

Relationships.

func (*ServiceWrapper) GetResourceCapabilities added in v0.4.0

func (s *ServiceWrapper) GetResourceCapabilities(pluginID, key string) (*sdkresource.ResourceCapabilities, error)

func (*ServiceWrapper) GetResourceDefinition added in v0.4.0

func (s *ServiceWrapper) GetResourceDefinition(pluginID, typeID string) (sdkresource.ResourceDefinition, error)

func (*ServiceWrapper) GetResourceEvents added in v0.4.0

func (s *ServiceWrapper) GetResourceEvents(
	pluginID, connectionID, key, id, namespace string,
	limit int32,
) ([]sdkresource.ResourceEvent, error)

func (*ServiceWrapper) GetResourceGroup added in v0.4.0

func (s *ServiceWrapper) GetResourceGroup(pluginID, groupID string) (sdkresource.ResourceGroup, error)

func (*ServiceWrapper) GetResourceGroups added in v0.4.0

func (s *ServiceWrapper) GetResourceGroups(pluginID, connectionID string) map[string]sdkresource.ResourceGroup

Type metadata.

func (*ServiceWrapper) GetResourceSchema added in v0.4.0

func (s *ServiceWrapper) GetResourceSchema(pluginID, connectionID, key string) (json.RawMessage, error)

func (*ServiceWrapper) GetResourceType added in v0.4.0

func (s *ServiceWrapper) GetResourceType(pluginID, typeID string) (*sdkresource.ResourceMeta, error)

func (*ServiceWrapper) GetResourceTypes added in v0.4.0

func (s *ServiceWrapper) GetResourceTypes(pluginID, connectionID string) map[string]sdkresource.ResourceMeta

func (*ServiceWrapper) GetWatchState added in v0.4.0

func (s *ServiceWrapper) GetWatchState(pluginID, connectionID string) (*sdkresource.WatchConnectionSummary, error)

func (*ServiceWrapper) HasPlugin added in v0.4.0

func (s *ServiceWrapper) HasPlugin(pluginID string) bool

HasPlugin.

func (*ServiceWrapper) HasResourceType added in v0.4.0

func (s *ServiceWrapper) HasResourceType(pluginID, typeID string) bool

func (*ServiceWrapper) IsResourceWatchRunning added in v0.4.0

func (s *ServiceWrapper) IsResourceWatchRunning(pluginID, connectionID, resourceKey string) (bool, error)

func (*ServiceWrapper) List added in v0.4.0

func (s *ServiceWrapper) List(
	pluginID, connectionID, key string,
	input sdkresource.ListInput,
) (*sdkresource.ListResult, error)

func (*ServiceWrapper) ListAllConnections added in v0.4.0

func (s *ServiceWrapper) ListAllConnections() (map[string][]sdktypes.Connection, error)

func (*ServiceWrapper) ListConnections added in v0.4.0

func (s *ServiceWrapper) ListConnections(pluginID string) ([]sdktypes.Connection, error)

func (*ServiceWrapper) ListPlugins added in v0.4.0

func (s *ServiceWrapper) ListPlugins() ([]string, error)

ListPlugins.

func (*ServiceWrapper) LoadConnections added in v0.4.0

func (s *ServiceWrapper) LoadConnections(pluginID string) ([]sdktypes.Connection, error)

func (*ServiceWrapper) RemoveConnection added in v0.4.0

func (s *ServiceWrapper) RemoveConnection(pluginID, connectionID string) error

func (*ServiceWrapper) ResolveRelationships added in v0.4.0

func (s *ServiceWrapper) ResolveRelationships(
	pluginID, connectionID, key, id, namespace string,
) ([]sdkresource.ResolvedRelationship, error)

func (*ServiceWrapper) RestartResourceWatch added in v0.4.0

func (s *ServiceWrapper) RestartResourceWatch(pluginID, connectionID, resourceKey string) error

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

func (*ServiceWrapper) StartConnection added in v0.4.0

func (s *ServiceWrapper) StartConnection(pluginID, connectionID string) (sdktypes.ConnectionStatus, error)

Connection lifecycle.

func (*ServiceWrapper) StartConnectionWatch added in v0.4.0

func (s *ServiceWrapper) StartConnectionWatch(pluginID, connectionID string) error

Watch lifecycle.

func (*ServiceWrapper) StopConnection added in v0.4.0

func (s *ServiceWrapper) StopConnection(pluginID, connectionID string) (sdktypes.Connection, error)

func (*ServiceWrapper) StopConnectionWatch added in v0.4.0

func (s *ServiceWrapper) StopConnectionWatch(pluginID, connectionID string) error

func (*ServiceWrapper) StopResourceWatch added in v0.4.0

func (s *ServiceWrapper) StopResourceWatch(pluginID, connectionID, resourceKey string) error

func (*ServiceWrapper) StreamAction added in v0.4.0

func (s *ServiceWrapper) StreamAction(
	pluginID, connectionID, key, actionID string,
	input sdkresource.ActionInput,
) (string, error)

func (*ServiceWrapper) SubscribeResource added in v0.4.0

func (s *ServiceWrapper) SubscribeResource(pluginID, connectionID, resourceKey string) error

Subscriptions.

func (*ServiceWrapper) UnsubscribeResource added in v0.4.0

func (s *ServiceWrapper) UnsubscribeResource(pluginID, connectionID, resourceKey string) error

func (*ServiceWrapper) Update added in v0.4.0

func (s *ServiceWrapper) Update(
	pluginID, connectionID, key string,
	input sdkresource.UpdateInput,
) (*sdkresource.UpdateResult, error)

func (*ServiceWrapper) UpdateConnection added in v0.4.0

func (s *ServiceWrapper) UpdateConnection(
	pluginID string,
	connection sdktypes.Connection,
) (sdktypes.Connection, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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