Documentation
¶
Index ¶
- Constants
- func GraphChangedEventKey(pluginID, connectionID string) string
- func WithObservation(ctx context.Context, observation Observation) context.Context
- type ActionEventDTO
- type ActionSnapshot
- type AuthorityEvidence
- type AuthorityResolution
- type AuthorityResolver
- func (r *AuthorityResolver) InvalidateConnection(pluginID, connectionID string) error
- func (r *AuthorityResolver) Matches(pluginID, connectionID, provider, resourceType, authority string) bool
- func (r *AuthorityResolver) ObserveCatalog(pluginID, connectionID string, catalog resourcev2.Catalog) (map[string]AuthorityResolution, error)
- type ConnectionProfile
- type ConnectionProfileResult
- type ConnectionReader
- type ConnectionState
- type ConnectionStatusPayload
- type Controller
- type EventEmitter
- type GraphService
- func (s *GraphService) GetDependencyTree(ctx context.Context, pluginID string, reference resourcev2.ResourceReference, ...) (_result *graph.DependencyTree, retErr error)
- func (s *GraphService) GetRelated(ctx context.Context, pluginID string, reference resourcev2.ResourceReference, ...) (_result []graph.GraphEdge, retErr error)
- func (s *GraphService) GetRelationshipChain(ctx context.Context, pluginID string, reference resourcev2.ResourceReference, ...) (_result [][]graph.GraphEdge, retErr error)
- func (s *GraphService) GetSubgraph(ctx context.Context, pluginID string, reference resourcev2.ResourceReference, ...) (_result *graph.Subgraph, retErr error)
- type HostEnumerateRequest
- type HostGetRequest
- type HostNativeQueryRequest
- type HostRecord
- type HostSourcePage
- type HostSubscription
- type HostWatchDeleteEvent
- type HostWatchRecordEvent
- type HostWatchStateEvent
- type NoopEmitter
- type Observation
- type ReferenceAdmitter
- type ResolveReferenceRequest
- type ResolveTargetRequest
- type ResolvedReference
- type ResolvedTarget
- type ResourceProvider
- type Service
- type ServiceWrapper
- func (s *ServiceWrapper) Action(ctx context.Context, pluginID string, encoded string) (resourcev2.Value, error)
- func (s *ServiceWrapper) AttachStreamAction(ctx context.Context, handleID string) (ActionSnapshot, error)
- func (s *ServiceWrapper) CancelStreamAction(ctx context.Context, handleID string) error
- func (s *ServiceWrapper) Catalog(ctx context.Context, pluginID string, request resourcev2.CatalogRequest) (resourcev2.Catalog, error)
- func (s *ServiceWrapper) CheckConnection(ctx context.Context, pluginID string, connectionID string) (types.ConnectionStatus, error)
- func (s *ServiceWrapper) EnsureResourceWatch(ctx context.Context, pluginID string, target resourcev2.ReadTarget) error
- func (s *ServiceWrapper) Enumerate(ctx context.Context, pluginID string, request HostEnumerateRequest) (HostSourcePage, error)
- func (s *ServiceWrapper) Features(ctx context.Context, pluginID string) (resourcev2.FeatureSet, error)
- func (s *ServiceWrapper) Get(ctx context.Context, pluginID string, request HostGetRequest) (HostRecord, error)
- func (s *ServiceWrapper) GetActions(ctx context.Context, pluginID string, route resourcev2.AccessRoute, ...) ([]resourcev2.ActionDescriptor, error)
- func (s *ServiceWrapper) GetAllConnectionStates(ctx context.Context) (map[string][]ConnectionState, error)
- func (s *ServiceWrapper) GetConnection(ctx context.Context, pluginID string, connectionID string) (types.Connection, error)
- func (s *ServiceWrapper) GetEditorSchemas(ctx context.Context, pluginID string, route resourcev2.AccessRoute) ([]resourcev2.EditorSchema, error)
- func (s *ServiceWrapper) GetHealth(ctx context.Context, pluginID string, encoded string) (*resourcev2.ResourceHealth, error)
- func (s *ServiceWrapper) GetRelationships(ctx context.Context, pluginID string, route resourcev2.AccessRoute, ...) ([]resourcev2.RelationshipDescriptor, error)
- func (s *ServiceWrapper) GetResourceDefinition(ctx context.Context, pluginID string, route resourcev2.AccessRoute, ...) (resourcev2.ResourceDefinition, error)
- func (s *ServiceWrapper) GetResourceEvents(ctx context.Context, pluginID string, request resourcev2.GetRequest, ...) ([]resourcev2.ResourceEvent, error)
- func (s *ServiceWrapper) GetResourceGroups(ctx context.Context, pluginID string, route resourcev2.AccessRoute) ([]resourcev2.ResourceGroup, error)
- func (s *ServiceWrapper) GetSchemaDocument(ctx context.Context, pluginID string, route resourcev2.AccessRoute, ...) (resourcev2.SchemaDocument, error)
- func (s *ServiceWrapper) GetWatchState(ctx context.Context, pluginID string, route resourcev2.AccessRoute) (*resourcev2.WatchConnectionSummary, error)
- func (s *ServiceWrapper) HasPlugin(ctx context.Context, pluginID string) (bool, error)
- func (s *ServiceWrapper) ImportConnectionProfile(ctx context.Context, pluginID string, connectionID string) (ConnectionProfileResult, error)
- func (s *ServiceWrapper) IsResourceWatchRunning(ctx context.Context, pluginID string, route resourcev2.AccessRoute, ...) (bool, error)
- func (s *ServiceWrapper) ListAllConnections(ctx context.Context) (map[string][]types.Connection, error)
- func (s *ServiceWrapper) ListConnectionProfiles(ctx context.Context, pluginID string) ([]ConnectionProfile, error)
- func (s *ServiceWrapper) ListConnections(ctx context.Context, pluginID string) ([]types.Connection, error)
- func (s *ServiceWrapper) ListPlugins(ctx context.Context) ([]string, error)
- func (s *ServiceWrapper) LoadConnections(ctx context.Context, pluginID string) ([]types.Connection, error)
- func (s *ServiceWrapper) Mutate(ctx context.Context, pluginID string, encoded string) (resourcev2.Record, error)
- func (s *ServiceWrapper) NativeQuery(ctx context.Context, pluginID string, encoded string) (HostSourcePage, error)
- func (s *ServiceWrapper) RemoveConnection(ctx context.Context, pluginID string, connectionID string) error
- func (s *ServiceWrapper) ResetConnectionProfile(ctx context.Context, pluginID string, connectionID string) (ConnectionProfileResult, error)
- func (s *ServiceWrapper) ResolveReference(ctx context.Context, pluginID string, request ResolveReferenceRequest) (ResolvedReference, error)
- func (s *ServiceWrapper) ResolveRelationships(ctx context.Context, pluginID string, request resourcev2.GetRequest) ([]resourcev2.ResolvedRelationship, error)
- func (s *ServiceWrapper) ResolveTarget(ctx context.Context, pluginID string, request ResolveTargetRequest) (ResolvedTarget, error)
- func (s *ServiceWrapper) RestartResourceWatch(ctx context.Context, pluginID string, target resourcev2.ReadTarget) error
- func (s *ServiceWrapper) SaveConnectionProfile(ctx context.Context, pluginID string, connection types.Connection) (ConnectionProfileResult, error)
- func (s *ServiceWrapper) ScopeValues(ctx context.Context, pluginID string, route resourcev2.AccessRoute, ...) ([]string, error)
- func (s *ServiceWrapper) ServiceShutdown() error
- func (s *ServiceWrapper) ServiceStartup(ctx context.Context, options application.ServiceOptions) error
- func (s *ServiceWrapper) StartConnection(ctx context.Context, pluginID string, connectionID string) (types.ConnectionStatus, error)
- func (s *ServiceWrapper) StartConnectionWatch(ctx context.Context, pluginID string, targets []resourcev2.ReadTarget) error
- func (s *ServiceWrapper) StopConnection(ctx context.Context, pluginID string, connectionID string) (types.Connection, error)
- func (s *ServiceWrapper) StopConnectionWatch(ctx context.Context, pluginID string, route resourcev2.AccessRoute) error
- func (s *ServiceWrapper) StopResourceWatch(ctx context.Context, pluginID string, route resourcev2.AccessRoute, ...) error
- func (s *ServiceWrapper) StreamAction(ctx context.Context, pluginID string, encoded string) (string, error)
- func (s *ServiceWrapper) SubscribeResource(ctx context.Context, pluginID string, subscription HostSubscription) error
- func (s *ServiceWrapper) UnsubscribeResource(ctx context.Context, pluginID string, subscription HostSubscription) error
- type SourcePageMetadata
Constants ¶
const ( EventConnectionStatus = "connection/status" EventWatchState = "watch/STATE" )
Event constants for resource controller events.
const PluginName = "resource"
Variables ¶
This section is empty.
Functions ¶
func GraphChangedEventKey ¶ added in v0.4.2
GraphChangedEventKey is the event emitted when edges touching a connection change. The payload is {"pluginId": ..., "connectionId": ...}.
func WithObservation ¶ added in v0.12.0
func WithObservation(ctx context.Context, observation Observation) context.Context
WithObservation retains discovery provenance until the actual native admission.
Types ¶
type ActionEventDTO ¶ added in v0.6.0
type ActionEventDTO struct {
Type string `json:"type"`
Data *resourcev2.Value `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 AuthorityEvidence ¶ added in v0.12.0
type AuthorityResolution ¶ added in v0.12.0
type AuthorityResolution struct {
Authority string
Continuity string
Limitations []string
Changed bool
}
AuthorityResolution is host identity evidence, never authorization or permission to share bodies, caches, or projections. Changed requires acquisition invalidation.
type AuthorityResolver ¶ added in v0.12.0
type AuthorityResolver struct {
// contains filtered or unexported fields
}
AuthorityResolver owns one plugin-scoped store. The controller must retain one resolver per store; concurrent resolver instances must not write the same store. Equal validated hints may share only within one coherent connection catalog. No native scheme is reviewed for stable continuity across routes or epochs. Missing hints cannot detect retargeting. Deleting local state loses continuity. No incarnation is inferred. Neither endpoints nor credentials are inspected.
func NewAuthorityResolver ¶ added in v0.12.0
func NewAuthorityResolver(root *appstate.ScopedRoot) (*AuthorityResolver, error)
func (*AuthorityResolver) InvalidateConnection ¶ added in v0.12.0
func (r *AuthorityResolver) InvalidateConnection(pluginID, connectionID string) error
InvalidateConnection retires every provider binding for an explicitly changed route. Retargeting must not reuse authority merely because its hint is equal. A failed durable write restores the old in-memory bindings and returns error.
func (*AuthorityResolver) Matches ¶ added in v0.12.0
func (r *AuthorityResolver) Matches(pluginID, connectionID, provider, resourceType, authority string) bool
Matches checks a current host-issued binding without creating identity state.
func (*AuthorityResolver) ObserveCatalog ¶ added in v0.12.0
func (r *AuthorityResolver) ObserveCatalog(pluginID, connectionID string, catalog resourcev2.Catalog) (map[string]AuthorityResolution, error)
ObserveCatalog atomically assigns all Types in one validated source observation. Nil hints remain Type-local. Equal typed hints share a host-issued backing ID only in this route's current catalog. A surviving member with the same typed hint justifies reusing its active cohort ID when Types join, leave, or return. With no such current member, a fresh ID is issued; historical cohorts are never searched or resurrected. Removed Types and replaced providers are retired. Saved references are never rewritten to a replacement authority.
type ConnectionProfile ¶ added in v0.12.0
type ConnectionProfile struct {
ID string `json:"id"`
Source string `json:"source"`
Connection *types.Connection `json:"connection,omitempty"`
Active bool `json:"active"`
}
ConnectionProfile separates source facts, explicit desired state, and passive legacy review candidates. Active means effective source inventory membership, not connected/readiness. Disabled native configurations never mutate source files.
type ConnectionProfileResult ¶ added in v0.12.0
type ConnectionProfileResult struct {
Applied bool `json:"applied"`
Profile ConnectionProfile `json:"profile"`
}
type ConnectionReader ¶ added in v0.12.0
type ConnectionReader interface {
GetConnection(ctx context.Context, pluginID string, connectionID string) (types.Connection, error)
}
ConnectionReader is the native connection lookup required by resource utilities.
type ConnectionState ¶ added in v0.2.0
type ConnectionState struct {
// Connection metadata (name, avatar, labels, etc.)
Connection types.Connection `json:"connection"`
// Registered native-client state, not network health. UNKNOWN is not stopped.
Readiness types.ConnectionStatusCode `json:"readiness"`
ReadinessError *apperror.AppError `json:"readinessError,omitempty"`
// Per-resource watch states (resource key → WatchState enum).
Resources map[string]sdkresource.WatchState `json:"resources"`
// Observed cache membership, not source totals.
ResourceCounts map[string]sdkresource.Count `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
ValidateReference(context.Context, string, resource.AccessRoute, resource.ResourceReference) error
SetConnectionChangeHook(func(pluginID, connectionID string) func())
AdmitReference(context.Context, string, string, resource.AccessRoute, resource.ResourceReference) (context.Context, error)
}
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
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 observed relationships and rejects incomplete whole results.
func NewGraphService ¶ added in v0.3.0
func NewGraphService(g *graph.RelationshipGraph, realm *invocation.Scope, boundary *invocation.Boundary, validateReference func(context.Context, string, resourcev2.AccessRoute, resourcev2.ResourceReference) error) *GraphService
func (*GraphService) GetDependencyTree ¶ added in v0.3.0
func (s *GraphService) GetDependencyTree(ctx context.Context, pluginID string, reference resourcev2.ResourceReference, route resourcev2.AccessRoute, maxDepth int) (_result *graph.DependencyTree, retErr error)
func (*GraphService) GetRelated ¶ added in v0.3.0
func (s *GraphService) GetRelated(ctx context.Context, pluginID string, reference resourcev2.ResourceReference, route resourcev2.AccessRoute, direction string, relType *string) (_result []graph.GraphEdge, retErr error)
func (*GraphService) GetRelationshipChain ¶ added in v0.3.0
func (s *GraphService) GetRelationshipChain(ctx context.Context, pluginID string, reference resourcev2.ResourceReference, route resourcev2.AccessRoute, relType string, maxDepth int) (_result [][]graph.GraphEdge, retErr error)
func (*GraphService) GetSubgraph ¶ added in v0.4.2
func (s *GraphService) GetSubgraph(ctx context.Context, pluginID string, reference resourcev2.ResourceReference, route resourcev2.AccessRoute, upDepth, downDepth int) (_result *graph.Subgraph, retErr error)
type HostEnumerateRequest ¶ added in v0.12.0
type HostEnumerateRequest struct {
TargetID string `json:"targetId"`
Request resourcev2.EnumerateRequest `json:"request"`
}
func (*HostEnumerateRequest) UnmarshalJSON ¶ added in v0.12.0
func (request *HostEnumerateRequest) UnmarshalJSON(data []byte) error
type HostGetRequest ¶ added in v0.12.0
type HostGetRequest struct {
TargetID string `json:"targetId"`
Request resourcev2.GetRequest `json:"request"`
}
func (*HostGetRequest) UnmarshalJSON ¶ added in v0.12.0
func (request *HostGetRequest) UnmarshalJSON(data []byte) error
type HostNativeQueryRequest ¶ added in v0.12.0
type HostNativeQueryRequest struct {
TargetID string `json:"targetId"`
Request resourcev2.NativeQueryRequest `json:"request"`
}
func (*HostNativeQueryRequest) UnmarshalJSON ¶ added in v0.12.0
func (request *HostNativeQueryRequest) UnmarshalJSON(data []byte) error
type HostRecord ¶ added in v0.12.0
type HostRecord struct {
Key string `json:"key"`
AddressKey string `json:"addressKey"`
TargetID string `json:"targetId"`
Record resourcev2.Record `json:"record"`
Route resourcev2.AccessRoute `json:"route"`
}
These host envelopes add acquisition membership, never a second resource identity. Source cursors remain native cursors, not host query continuations.
type HostSourcePage ¶ added in v0.12.0
type HostSourcePage struct {
Records []HostRecord `json:"records"`
SourcePage SourcePageMetadata `json:"sourcePage"`
}
type HostSubscription ¶ added in v0.12.0
type HostSubscription struct {
TargetID string `json:"targetId"`
Target resourcev2.ReadTarget `json:"target"`
}
HostSubscription is one actual live frontend subscription, not a target lease.
func (*HostSubscription) UnmarshalJSON ¶ added in v0.12.0
func (request *HostSubscription) UnmarshalJSON(data []byte) error
type HostWatchDeleteEvent ¶ added in v0.12.0
type HostWatchDeleteEvent struct {
Route resource.AccessRoute `json:"route"`
Reference resource.ResourceReference `json:"reference"`
Key string `json:"key"`
AddressKey string `json:"addressKey"`
TargetID string `json:"targetId"`
LastKnown *HostRecord `json:"lastKnown,omitempty"`
Guarantee string `json:"guarantee"`
}
type HostWatchRecordEvent ¶ added in v0.12.0
type HostWatchRecordEvent struct {
Route resource.AccessRoute `json:"route"`
Record HostRecord `json:"record"`
Metadata resource.ResourceMetadata `json:"metadata"`
Guarantee string `json:"guarantee"`
}
HostWatchRecordEvent retains the acquisition membership of each live consumer.
type HostWatchStateEvent ¶ added in v0.12.0
type HostWatchStateEvent struct {
resource.WatchStateEvent
PluginID string `json:"pluginID"`
}
HostWatchStateEvent adds host provenance only to the global state channel.
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 Observation ¶ added in v0.12.0
type Observation struct {
// contains filtered or unexported fields
}
Observation is an opaque, retained advertisement of one native route catalog. Its private admission identity cannot be supplied by an external caller.
type ReferenceAdmitter ¶ added in v0.12.0
type ReferenceAdmitter func(context.Context, string, string, resourcev2.AccessRoute, resourcev2.ResourceReference) (context.Context, error)
ReferenceAdmitter admits a native utility against one exact resource catalog. It does not fetch a resource body or grant resource Get permission.
type ResolveReferenceRequest ¶ added in v0.12.0
type ResolveReferenceRequest struct {
Route resourcev2.AccessRoute `json:"route"`
Type string `json:"type"`
Scope []resourcev2.ScopeEntry `json:"scope"`
ID string `json:"id"`
Incarnation *string `json:"incarnation,omitempty"`
Representation string `json:"representation,omitempty"`
}
func (*ResolveReferenceRequest) UnmarshalJSON ¶ added in v0.12.0
func (request *ResolveReferenceRequest) UnmarshalJSON(data []byte) error
type ResolveTargetRequest ¶ added in v0.12.0
type ResolveTargetRequest struct {
Route resourcev2.AccessRoute `json:"route"`
Type string `json:"type"`
Representation string `json:"representation,omitempty"`
Scope resourcev2.QueryScope `json:"scope"`
}
func (*ResolveTargetRequest) UnmarshalJSON ¶ added in v0.12.0
func (request *ResolveTargetRequest) UnmarshalJSON(data []byte) error
type ResolvedReference ¶ added in v0.12.0
type ResolvedReference struct {
Reference resourcev2.ResourceReference `json:"reference"`
Route resourcev2.AccessRoute `json:"route"`
Key string `json:"key"`
AddressKey string `json:"addressKey"`
TargetID string `json:"targetId"`
Representation string `json:"representation"`
Authority AuthorityEvidence `json:"authority"`
}
type ResolvedTarget ¶ added in v0.12.0
type ResolvedTarget struct {
TargetID string `json:"targetId"`
Target resourcev2.ReadTarget `json:"target"`
Authority AuthorityEvidence `json:"authority"`
CatalogRevision string `json:"catalogRevision"`
}
type ResourceProvider ¶ added in v0.2.0
type ResourceProvider interface {
resourcev2.Provider
}
ResourceProvider is the canonical provider-facing boundary. Catalog is the only required operation. Callers discover optional operation interfaces and qualified catalog support independently; transport messages never escape 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)
Features(ctx context.Context, pluginID string) (resourcev2.FeatureSet, error)
Catalog(ctx context.Context, pluginID string, request resourcev2.CatalogRequest) (resourcev2.Catalog, error)
ResolveTarget(ctx context.Context, pluginID string, request ResolveTargetRequest) (ResolvedTarget, error)
ResolveReference(ctx context.Context, pluginID string, request ResolveReferenceRequest) (ResolvedReference, error)
Get(ctx context.Context, pluginID string, request HostGetRequest) (HostRecord, error)
Enumerate(ctx context.Context, pluginID string, request HostEnumerateRequest) (HostSourcePage, error)
NativeQuery(ctx context.Context, pluginID string, request HostNativeQueryRequest) (HostSourcePage, error)
Mutate(ctx context.Context, pluginID string, request resourcev2.MutationRequest) (resourcev2.Record, error)
Action(ctx context.Context, pluginID string, request resourcev2.ActionRequest) (resourcev2.Value, error)
StartConnection(ctx context.Context, pluginID string, connectionID string) (types.ConnectionStatus, error)
StopConnection(ctx context.Context, pluginID string, connectionID string) (types.Connection, error)
CheckConnection(ctx context.Context, pluginID string, 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 string, connectionID string) (types.Connection, error)
ScopeValues(ctx context.Context, pluginID string, route resourcev2.AccessRoute, dimension string) ([]string, error)
SaveConnectionProfile(ctx context.Context, pluginID string, connection types.Connection) (ConnectionProfileResult, error)
ListConnectionProfiles(ctx context.Context, pluginID string) ([]ConnectionProfile, error)
ImportConnectionProfile(ctx context.Context, pluginID string, connectionID string) (ConnectionProfileResult, error)
ResetConnectionProfile(ctx context.Context, pluginID string, connectionID string) (ConnectionProfileResult, error)
RemoveConnection(ctx context.Context, pluginID string, connectionID string) error
StartConnectionWatch(ctx context.Context, pluginID string, targets []resourcev2.ReadTarget) error
StopConnectionWatch(ctx context.Context, pluginID string, route resourcev2.AccessRoute) error
GetWatchState(ctx context.Context, pluginID string, route resourcev2.AccessRoute) (*resourcev2.WatchConnectionSummary, error)
EnsureResourceWatch(ctx context.Context, pluginID string, target resourcev2.ReadTarget) error
StopResourceWatch(ctx context.Context, pluginID string, route resourcev2.AccessRoute, resourceType string) error
RestartResourceWatch(ctx context.Context, pluginID string, target resourcev2.ReadTarget) error
IsResourceWatchRunning(ctx context.Context, pluginID string, route resourcev2.AccessRoute, resourceType string) (bool, error)
SubscribeResource(ctx context.Context, pluginID string, subscription HostSubscription) error
UnsubscribeResource(ctx context.Context, pluginID string, subscription HostSubscription) error
GetResourceGroups(ctx context.Context, pluginID string, route resourcev2.AccessRoute) ([]resourcev2.ResourceGroup, error)
GetResourceDefinition(ctx context.Context, pluginID string, route resourcev2.AccessRoute, resourceType string) (resourcev2.ResourceDefinition, error)
GetEditorSchemas(ctx context.Context, pluginID string, route resourcev2.AccessRoute) ([]resourcev2.EditorSchema, error)
GetSchemaDocument(ctx context.Context, pluginID string, route resourcev2.AccessRoute, reference resourcev2.SchemaDocumentReference) (resourcev2.SchemaDocument, error)
GetRelationships(ctx context.Context, pluginID string, route resourcev2.AccessRoute, resourceType string) ([]resourcev2.RelationshipDescriptor, error)
ResolveRelationships(ctx context.Context, pluginID string, request resourcev2.GetRequest) ([]resourcev2.ResolvedRelationship, error)
GetHealth(ctx context.Context, pluginID string, request resourcev2.GetRequest, body resourcev2.Value) (*resourcev2.ResourceHealth, error)
GetResourceEvents(ctx context.Context, pluginID string, request resourcev2.GetRequest, limit uint32) ([]resourcev2.ResourceEvent, error)
GetActions(ctx context.Context, pluginID string, route resourcev2.AccessRoute, resourceType string) ([]resourcev2.ActionDescriptor, error)
StreamAction(ctx context.Context, pluginID string, request resourcev2.ActionRequest) (string, error)
AttachStreamAction(ctx context.Context, handleID string) (ActionSnapshot, error)
CancelStreamAction(ctx context.Context, handleID string) error
}
Service is the typed native resource boundary. Wails uses explicit transport adapters; only host envelopes add row membership.
type ServiceWrapper ¶ added in v0.4.0
type ServiceWrapper struct {
Ctrl Controller
Realm *invocation.Scope
}
ServiceWrapper binds only admitted resource operations. Native lifecycle and graph reference validation are deliberately not frontend methods.
func (*ServiceWrapper) Action ¶ added in v0.12.0
func (s *ServiceWrapper) Action(ctx context.Context, pluginID string, encoded string) (resourcev2.Value, 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) Catalog ¶ added in v0.12.0
func (s *ServiceWrapper) Catalog(ctx context.Context, pluginID string, request resourcev2.CatalogRequest) (resourcev2.Catalog, error)
func (*ServiceWrapper) CheckConnection ¶ added in v0.4.0
func (s *ServiceWrapper) CheckConnection(ctx context.Context, pluginID string, connectionID string) (types.ConnectionStatus, error)
func (*ServiceWrapper) EnsureResourceWatch ¶ added in v0.4.0
func (s *ServiceWrapper) EnsureResourceWatch(ctx context.Context, pluginID string, target resourcev2.ReadTarget) error
func (*ServiceWrapper) Enumerate ¶ added in v0.12.0
func (s *ServiceWrapper) Enumerate(ctx context.Context, pluginID string, request HostEnumerateRequest) (HostSourcePage, error)
func (*ServiceWrapper) Features ¶ added in v0.12.0
func (s *ServiceWrapper) Features(ctx context.Context, pluginID string) (resourcev2.FeatureSet, error)
func (*ServiceWrapper) Get ¶ added in v0.4.0
func (s *ServiceWrapper) Get(ctx context.Context, pluginID string, request HostGetRequest) (HostRecord, error)
func (*ServiceWrapper) GetActions ¶ added in v0.4.0
func (s *ServiceWrapper) GetActions(ctx context.Context, pluginID string, route resourcev2.AccessRoute, resourceType string) ([]resourcev2.ActionDescriptor, error)
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 string, connectionID string) (types.Connection, error)
func (*ServiceWrapper) GetEditorSchemas ¶ added in v0.4.0
func (s *ServiceWrapper) GetEditorSchemas(ctx context.Context, pluginID string, route resourcev2.AccessRoute) ([]resourcev2.EditorSchema, error)
func (*ServiceWrapper) GetHealth ¶ added in v0.4.0
func (s *ServiceWrapper) GetHealth(ctx context.Context, pluginID string, encoded string) (*resourcev2.ResourceHealth, error)
func (*ServiceWrapper) GetRelationships ¶ added in v0.4.0
func (s *ServiceWrapper) GetRelationships(ctx context.Context, pluginID string, route resourcev2.AccessRoute, resourceType string) ([]resourcev2.RelationshipDescriptor, error)
func (*ServiceWrapper) GetResourceDefinition ¶ added in v0.4.0
func (s *ServiceWrapper) GetResourceDefinition(ctx context.Context, pluginID string, route resourcev2.AccessRoute, resourceType string) (resourcev2.ResourceDefinition, error)
func (*ServiceWrapper) GetResourceEvents ¶ added in v0.4.0
func (s *ServiceWrapper) GetResourceEvents(ctx context.Context, pluginID string, request resourcev2.GetRequest, limit uint32) ([]resourcev2.ResourceEvent, error)
func (*ServiceWrapper) GetResourceGroups ¶ added in v0.4.0
func (s *ServiceWrapper) GetResourceGroups(ctx context.Context, pluginID string, route resourcev2.AccessRoute) ([]resourcev2.ResourceGroup, error)
func (*ServiceWrapper) GetSchemaDocument ¶ added in v0.12.0
func (s *ServiceWrapper) GetSchemaDocument(ctx context.Context, pluginID string, route resourcev2.AccessRoute, reference resourcev2.SchemaDocumentReference) (resourcev2.SchemaDocument, error)
func (*ServiceWrapper) GetWatchState ¶ added in v0.4.0
func (s *ServiceWrapper) GetWatchState(ctx context.Context, pluginID string, route resourcev2.AccessRoute) (*resourcev2.WatchConnectionSummary, error)
func (*ServiceWrapper) ImportConnectionProfile ¶ added in v0.12.0
func (s *ServiceWrapper) ImportConnectionProfile(ctx context.Context, pluginID string, connectionID string) (ConnectionProfileResult, error)
func (*ServiceWrapper) IsResourceWatchRunning ¶ added in v0.4.0
func (s *ServiceWrapper) IsResourceWatchRunning(ctx context.Context, pluginID string, route resourcev2.AccessRoute, resourceType string) (bool, error)
func (*ServiceWrapper) ListAllConnections ¶ added in v0.4.0
func (s *ServiceWrapper) ListAllConnections(ctx context.Context) (map[string][]types.Connection, error)
func (*ServiceWrapper) ListConnectionProfiles ¶ added in v0.12.0
func (s *ServiceWrapper) ListConnectionProfiles(ctx context.Context, pluginID string) ([]ConnectionProfile, error)
func (*ServiceWrapper) ListConnections ¶ added in v0.4.0
func (s *ServiceWrapper) ListConnections(ctx context.Context, pluginID string) ([]types.Connection, error)
func (*ServiceWrapper) ListPlugins ¶ added in v0.4.0
func (s *ServiceWrapper) ListPlugins(ctx context.Context) ([]string, error)
func (*ServiceWrapper) LoadConnections ¶ added in v0.4.0
func (s *ServiceWrapper) LoadConnections(ctx context.Context, pluginID string) ([]types.Connection, error)
func (*ServiceWrapper) Mutate ¶ added in v0.12.0
func (s *ServiceWrapper) Mutate(ctx context.Context, pluginID string, encoded string) (resourcev2.Record, error)
func (*ServiceWrapper) NativeQuery ¶ added in v0.12.0
func (s *ServiceWrapper) NativeQuery(ctx context.Context, pluginID string, encoded string) (HostSourcePage, error)
func (*ServiceWrapper) RemoveConnection ¶ added in v0.4.0
func (*ServiceWrapper) ResetConnectionProfile ¶ added in v0.12.0
func (s *ServiceWrapper) ResetConnectionProfile(ctx context.Context, pluginID string, connectionID string) (ConnectionProfileResult, error)
func (*ServiceWrapper) ResolveReference ¶ added in v0.12.0
func (s *ServiceWrapper) ResolveReference(ctx context.Context, pluginID string, request ResolveReferenceRequest) (ResolvedReference, error)
func (*ServiceWrapper) ResolveRelationships ¶ added in v0.4.0
func (s *ServiceWrapper) ResolveRelationships(ctx context.Context, pluginID string, request resourcev2.GetRequest) ([]resourcev2.ResolvedRelationship, error)
func (*ServiceWrapper) ResolveTarget ¶ added in v0.12.0
func (s *ServiceWrapper) ResolveTarget(ctx context.Context, pluginID string, request ResolveTargetRequest) (ResolvedTarget, error)
func (*ServiceWrapper) RestartResourceWatch ¶ added in v0.4.0
func (s *ServiceWrapper) RestartResourceWatch(ctx context.Context, pluginID string, target resourcev2.ReadTarget) error
func (*ServiceWrapper) SaveConnectionProfile ¶ added in v0.12.0
func (s *ServiceWrapper) SaveConnectionProfile(ctx context.Context, pluginID string, connection types.Connection) (ConnectionProfileResult, error)
func (*ServiceWrapper) ScopeValues ¶ added in v0.12.0
func (s *ServiceWrapper) ScopeValues(ctx context.Context, pluginID string, route resourcev2.AccessRoute, dimension string) ([]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 string, connectionID string) (types.ConnectionStatus, error)
func (*ServiceWrapper) StartConnectionWatch ¶ added in v0.4.0
func (s *ServiceWrapper) StartConnectionWatch(ctx context.Context, pluginID string, targets []resourcev2.ReadTarget) error
func (*ServiceWrapper) StopConnection ¶ added in v0.4.0
func (s *ServiceWrapper) StopConnection(ctx context.Context, pluginID string, connectionID string) (types.Connection, error)
func (*ServiceWrapper) StopConnectionWatch ¶ added in v0.4.0
func (s *ServiceWrapper) StopConnectionWatch(ctx context.Context, pluginID string, route resourcev2.AccessRoute) error
func (*ServiceWrapper) StopResourceWatch ¶ added in v0.4.0
func (s *ServiceWrapper) StopResourceWatch(ctx context.Context, pluginID string, route resourcev2.AccessRoute, resourceType string) error
func (*ServiceWrapper) StreamAction ¶ added in v0.4.0
func (*ServiceWrapper) SubscribeResource ¶ added in v0.4.0
func (s *ServiceWrapper) SubscribeResource(ctx context.Context, pluginID string, subscription HostSubscription) error
func (*ServiceWrapper) UnsubscribeResource ¶ added in v0.4.0
func (s *ServiceWrapper) UnsubscribeResource(ctx context.Context, pluginID string, subscription HostSubscription) error
type SourcePageMetadata ¶ added in v0.12.0
type SourcePageMetadata struct {
NextCursor *string `json:"nextCursor,omitempty"`
Count resourcev2.Count `json:"count"`
Coverage resourcev2.Coverage `json:"coverage"`
Consistency string `json:"consistency"`
SourceRevision *string `json:"sourceRevision,omitempty"`
}
Source Files
¶
- action_registry.go
- action_service.go
- action_target.go
- ancillary_service.go
- authority.go
- catalog_binding.go
- connection_change.go
- connection_profiles.go
- connection_updates.go
- connections.go
- controller.go
- emitter.go
- finite_operations.go
- finite_service.go
- graph_events.go
- graph_service.go
- inventory_notifications.go
- invocation.go
- observation.go
- observation_stop.go
- profile_invalidation.go
- provider.go
- reference_admission.go
- reference_service.go
- relationship_bindings.go
- relationship_bootstrap.go
- request_json.go
- service.go
- service_wrapper.go
- sink.go
- subscriptions.go
- subscriptions_service.go
- types.go
- watch_service.go