resource

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: AGPL-3.0 Imports: 43 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 EventConnectionMetadata = "resource/connection/metadata"
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": ...}.

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 AuthorityEvidence struct {
	Continuity  string   `json:"continuity"`
	Limitations []string `json:"limitations"`
}

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

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 observed relationships and rejects incomplete whole results.

func NewGraphService added in v0.3.0

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 HostConnectionMetadata added in v0.13.0

type HostConnectionMetadata struct {
	PluginID           string                                 `json:"pluginID"`
	RegistrationID     string                                 `json:"registrationID"`
	Supported          bool                                   `json:"supported"`
	TransportAvailable bool                                   `json:"transportAvailable"`
	ConnectionID       string                                 `json:"connectionID,omitempty"`
	Revision           string                                 `json:"revision,omitempty"`
	Snapshot           *resourcev2.ConnectionMetadataSnapshot `json:"snapshot,omitempty"`
	Removed            bool                                   `json:"removed,omitempty"`
}

HostConnectionMetadata adds transport identity without changing SDK-owned facts. A provider-wide event omits ConnectionID and Snapshot.

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

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)
	GetConnectionMetadata(ctx context.Context, pluginID, connectionID string) (HostConnectionMetadata, error)
	RefreshConnectionMetadata(ctx context.Context, pluginID, connectionID string) (HostConnectionMetadata, 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) GetConnectionMetadata added in v0.13.0

func (s *ServiceWrapper) GetConnectionMetadata(ctx context.Context, pluginID, connectionID string) (HostConnectionMetadata, 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 (*ServiceWrapper) GetWatchState added in v0.4.0

func (*ServiceWrapper) HasPlugin added in v0.4.0

func (s *ServiceWrapper) HasPlugin(ctx context.Context, pluginID string) (bool, 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) RefreshConnectionMetadata added in v0.13.0

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

func (*ServiceWrapper) RemoveConnection added in v0.4.0

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

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 (s *ServiceWrapper) StreamAction(ctx context.Context, pluginID string, encoded string) (string, error)

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"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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