resource

package
v0.9.1 Latest Latest
Warning

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

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

func GraphChangedEventKey added in v0.4.2

func GraphChangedEventKey(pluginID, connectionID string) string

GraphChangedEventKey is the event emitted when edges touching a connection change. The payload is {"pluginId": ..., "connectionId": ...}.

Types

type ActionEventDTO added in v0.6.0

type ActionEventDTO struct {
	Type  string             `json:"type"`
	Data  map[string]any     `json:"data,omitempty"`
	Error *apperror.AppError `json:"error,omitempty"`
}

type ActionSnapshot added in v0.6.0

type ActionSnapshot struct {
	Sequence uint64         `json:"sequence"`
	Event    ActionEventDTO `json:"event"`
	Terminal bool           `json:"terminal"`
}

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, error)

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, error)

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, error)

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, onReady func() error) 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.LifecycleController
	Run(context.Context)
	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),
	boundary *invocation.Boundary,
) 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.

func NewAppEmitter added in v0.4.1

func NewAppEmitter(app *application.App) EventEmitter

NewAppEmitter returns an EventEmitter that emits through the given Wails app.

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, realm *invocation.Scope, boundary *invocation.Boundary) *GraphService

NewGraphService creates a new GraphService.

func (*GraphService) GetDependencyTree added in v0.3.0

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

GetDependencyTree follows all outgoing edges recursively.

func (*GraphService) GetRelated added in v0.3.0

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

GetRelated returns edges connected to the given node.

func (*GraphService) GetRelationshipChain added in v0.3.0

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

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

func (*GraphService) GetSubgraph added in v0.4.2

func (s *GraphService) GetSubgraph(ctx context.Context, pluginID, connectionID, resourceKey, namespace, id string,
	upDepth, downDepth int) (_result *graph.Subgraph, retErr error)

GetSubgraph returns the resources around one resource: up to upDepth hops against edge direction (owners, selectors) and downDepth hops along it (dependencies), with every edge between them.

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, onReady func() error) 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, error)
	GetResourceGroup(ctx context.Context, id string) (resource.ResourceGroup, error)
	GetResourceTypes(ctx context.Context, connectionID string) (map[string]resource.ResourceMeta, error)
	GetResourceType(ctx context.Context, id string) (*resource.ResourceMeta, error)
	HasResourceType(ctx context.Context, id string) (bool, error)
	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(ctx context.Context) ([]string, error)
	HasPlugin(ctx context.Context, pluginID string) (bool, error)

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

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

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

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

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

	// Actions
	GetActions(ctx context.Context, pluginID, connectionID, key string) ([]resource.ActionDescriptor, error)
	ExecuteAction(ctx context.Context, pluginID, connectionID, key, actionID string, input resource.ActionInput) (*resource.ActionResult, error)
	StreamAction(ctx context.Context, pluginID, connectionID, key, actionID string, input resource.ActionInput) (string, error)
	AttachStreamAction(ctx context.Context, handleID string) (ActionSnapshot, error)
	CancelStreamAction(ctx context.Context, handleID string) error

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

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

	// Health
	GetHealth(ctx context.Context, pluginID, connectionID, key string, data json.RawMessage) (*resource.ResourceHealth, error)
	GetResourceEvents(ctx context.Context, 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
	Realm *invocation.Scope
}

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(ctx context.Context, pluginID string, connection sdktypes.Connection) error

func (*ServiceWrapper) AttachStreamAction added in v0.6.0

func (s *ServiceWrapper) AttachStreamAction(ctx context.Context, handleID string) (ActionSnapshot, error)

func (*ServiceWrapper) CancelStreamAction added in v0.6.0

func (s *ServiceWrapper) CancelStreamAction(ctx context.Context, handleID string) error

func (*ServiceWrapper) CheckConnection added in v0.4.0

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

func (*ServiceWrapper) Create added in v0.4.0

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

func (*ServiceWrapper) Delete added in v0.4.0

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

func (*ServiceWrapper) EnsureResourceWatch added in v0.4.0

func (s *ServiceWrapper) EnsureResourceWatch(ctx context.Context, pluginID, connectionID, resourceKey string) error

func (*ServiceWrapper) ExecuteAction added in v0.4.0

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

func (*ServiceWrapper) Find added in v0.4.0

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

func (*ServiceWrapper) Get added in v0.4.0

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

CRUD.

func (*ServiceWrapper) GetActions added in v0.4.0

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

Actions.

func (*ServiceWrapper) GetAllConnectionStates added in v0.4.0

func (s *ServiceWrapper) GetAllConnectionStates(ctx context.Context) (map[string][]ConnectionState, error)

func (*ServiceWrapper) GetConnection added in v0.4.0

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

func (*ServiceWrapper) GetConnectionNamespaces added in v0.4.0

func (s *ServiceWrapper) GetConnectionNamespaces(ctx context.Context, pluginID, connectionID string) ([]string, error)

func (*ServiceWrapper) GetEditorSchemas added in v0.4.0

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

Editor schemas.

func (*ServiceWrapper) GetFilterFields added in v0.4.0

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

func (*ServiceWrapper) GetHealth added in v0.4.0

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

Health.

func (*ServiceWrapper) GetRelationships added in v0.4.0

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

Relationships.

func (*ServiceWrapper) GetResourceCapabilities added in v0.4.0

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

func (*ServiceWrapper) GetResourceDefinition added in v0.4.0

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

func (*ServiceWrapper) GetResourceEvents added in v0.4.0

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

func (*ServiceWrapper) GetResourceGroup added in v0.4.0

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

func (*ServiceWrapper) GetResourceGroups added in v0.4.0

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

Type metadata.

func (*ServiceWrapper) GetResourceSchema added in v0.4.0

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

func (*ServiceWrapper) GetResourceType added in v0.4.0

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

func (*ServiceWrapper) GetResourceTypes added in v0.4.0

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

func (*ServiceWrapper) GetWatchState added in v0.4.0

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

func (*ServiceWrapper) HasPlugin added in v0.4.0

func (s *ServiceWrapper) HasPlugin(ctx context.Context, pluginID string) (bool, error)

HasPlugin.

func (*ServiceWrapper) HasResourceType added in v0.4.0

func (s *ServiceWrapper) HasResourceType(ctx context.Context, pluginID, typeID string) (bool, error)

func (*ServiceWrapper) IsResourceWatchRunning added in v0.4.0

func (s *ServiceWrapper) IsResourceWatchRunning(ctx context.Context, pluginID, connectionID, resourceKey string) (bool, error)

func (*ServiceWrapper) List added in v0.4.0

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

func (*ServiceWrapper) ListAllConnections added in v0.4.0

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

func (*ServiceWrapper) ListConnections added in v0.4.0

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

func (*ServiceWrapper) ListPlugins added in v0.4.0

func (s *ServiceWrapper) ListPlugins(ctx context.Context) ([]string, error)

ListPlugins.

func (*ServiceWrapper) LoadConnections added in v0.4.0

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

func (*ServiceWrapper) RemoveConnection added in v0.4.0

func (s *ServiceWrapper) RemoveConnection(ctx context.Context, pluginID, connectionID string) error

func (*ServiceWrapper) ResolveRelationships added in v0.4.0

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

func (*ServiceWrapper) RestartResourceWatch added in v0.4.0

func (s *ServiceWrapper) RestartResourceWatch(ctx context.Context, 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(ctx context.Context, pluginID, connectionID string) (sdktypes.ConnectionStatus, error)

Connection lifecycle.

func (*ServiceWrapper) StartConnectionWatch added in v0.4.0

func (s *ServiceWrapper) StartConnectionWatch(ctx context.Context, pluginID, connectionID string) error

Watch lifecycle.

func (*ServiceWrapper) StopConnection added in v0.4.0

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

func (*ServiceWrapper) StopConnectionWatch added in v0.4.0

func (s *ServiceWrapper) StopConnectionWatch(ctx context.Context, pluginID, connectionID string) error

func (*ServiceWrapper) StopResourceWatch added in v0.4.0

func (s *ServiceWrapper) StopResourceWatch(ctx context.Context, pluginID, connectionID, resourceKey string) error

func (*ServiceWrapper) StreamAction added in v0.4.0

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

func (*ServiceWrapper) SubscribeResource added in v0.4.0

func (s *ServiceWrapper) SubscribeResource(ctx context.Context, pluginID, connectionID, resourceKey string) error

Subscriptions.

func (*ServiceWrapper) UnsubscribeResource added in v0.4.0

func (s *ServiceWrapper) UnsubscribeResource(ctx context.Context, pluginID, connectionID, resourceKey string) error

func (*ServiceWrapper) Update added in v0.4.0

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

func (*ServiceWrapper) UpdateConnection added in v0.4.0

func (s *ServiceWrapper) UpdateConnection(ctx context.Context, 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