datasource

package
v0.27.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const DataSourcePluginName = "data_source"

DataSourcePluginName is the name that should be used in the plugin map.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataSource

type DataSource interface {
	validator.Validator

	AddTrustZone(trustZone *trust_zone_proto.TrustZone) (*trust_zone_proto.TrustZone, error)
	DestroyTrustZone(id string) error
	GetTrustZone(id string) (*trust_zone_proto.TrustZone, error)
	GetTrustZoneByName(name string) (*trust_zone_proto.TrustZone, error)
	ListTrustZones() ([]*trust_zone_proto.TrustZone, error)
	UpdateTrustZone(trustZone *trust_zone_proto.TrustZone) (*trust_zone_proto.TrustZone, error)

	AddCluster(cluster *clusterpb.Cluster) (*clusterpb.Cluster, error)
	DestroyCluster(id string) error
	GetCluster(id string) (*clusterpb.Cluster, error)
	GetClusterByName(name, trustZoneID string) (*clusterpb.Cluster, error)
	ListClusters(filter *datasourcepb.ListClustersRequest_Filter) ([]*clusterpb.Cluster, error)
	UpdateCluster(cluster *clusterpb.Cluster) (*clusterpb.Cluster, error)

	AddAttestationPolicy(policy *attestation_policy_proto.AttestationPolicy) (*attestation_policy_proto.AttestationPolicy, error)
	DestroyAttestationPolicy(id string) error
	GetAttestationPolicy(id string) (*attestation_policy_proto.AttestationPolicy, error)
	GetAttestationPolicyByName(name string) (*attestation_policy_proto.AttestationPolicy, error)
	ListAttestationPolicies() ([]*attestation_policy_proto.AttestationPolicy, error)

	AddAPBinding(binding *ap_binding_proto.APBinding) (*ap_binding_proto.APBinding, error)
	DestroyAPBinding(id string) error
	ListAPBindings(filter *datasourcepb.ListAPBindingsRequest_Filter) ([]*ap_binding_proto.APBinding, error)

	AddFederation(federation *federation_proto.Federation) (*federation_proto.Federation, error)
	DestroyFederation(id string) error
	ListFederations(filter *datasourcepb.ListFederationsRequest_Filter) ([]*federation_proto.Federation, error)
}

DataSource is the interface data source plugins have to implement.

type DataSourcePlugin

type DataSourcePlugin struct {
	go_plugin.Plugin
	Impl DataSource
}

DataSourcePlugin implements the plugin.Plugin interface to provide the GRPC server or client back to the plugin machinery. The server side should proved the Impl field with a concrete implementation of the DataSource interface.

func (*DataSourcePlugin) GRPCClient

func (dsp *DataSourcePlugin) GRPCClient(ctx context.Context, broker *go_plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error)

func (*DataSourcePlugin) GRPCServer

func (dsp *DataSourcePlugin) GRPCServer(broker *go_plugin.GRPCBroker, s *grpc.Server) error

type DataSourcePluginClientGRPC

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

DataSourcePluginClientGRPC is used by clients (main application) to translate the DataSource interface of plugins to GRPC calls.

func (*DataSourcePluginClientGRPC) AddAPBinding

func (*DataSourcePluginClientGRPC) AddCluster added in v0.7.1

func (c *DataSourcePluginClientGRPC) AddCluster(cluster *clusterpb.Cluster) (*clusterpb.Cluster, error)

func (*DataSourcePluginClientGRPC) AddFederation

func (*DataSourcePluginClientGRPC) AddTrustZone

func (*DataSourcePluginClientGRPC) DestroyAPBinding

func (c *DataSourcePluginClientGRPC) DestroyAPBinding(id string) error

func (*DataSourcePluginClientGRPC) DestroyAttestationPolicy added in v0.12.0

func (c *DataSourcePluginClientGRPC) DestroyAttestationPolicy(id string) error

func (*DataSourcePluginClientGRPC) DestroyCluster added in v0.12.0

func (c *DataSourcePluginClientGRPC) DestroyCluster(id string) error

func (*DataSourcePluginClientGRPC) DestroyFederation added in v0.12.0

func (c *DataSourcePluginClientGRPC) DestroyFederation(id string) error

func (*DataSourcePluginClientGRPC) DestroyTrustZone added in v0.12.0

func (c *DataSourcePluginClientGRPC) DestroyTrustZone(id string) error

func (*DataSourcePluginClientGRPC) GetAttestationPolicy

func (*DataSourcePluginClientGRPC) GetAttestationPolicyByName added in v0.15.0

func (c *DataSourcePluginClientGRPC) GetAttestationPolicyByName(name string) (*attestation_policy_proto.AttestationPolicy, error)

func (*DataSourcePluginClientGRPC) GetCluster added in v0.7.1

func (*DataSourcePluginClientGRPC) GetClusterByName added in v0.15.0

func (c *DataSourcePluginClientGRPC) GetClusterByName(name, trustZoneID string) (*clusterpb.Cluster, error)

func (*DataSourcePluginClientGRPC) GetTrustZone

func (*DataSourcePluginClientGRPC) GetTrustZoneByName added in v0.15.0

func (c *DataSourcePluginClientGRPC) GetTrustZoneByName(name string) (*trust_zone_proto.TrustZone, error)

func (*DataSourcePluginClientGRPC) ListAPBindings added in v0.10.1

func (*DataSourcePluginClientGRPC) ListAttestationPolicies

func (*DataSourcePluginClientGRPC) ListClusters added in v0.7.1

func (*DataSourcePluginClientGRPC) ListFederations

func (*DataSourcePluginClientGRPC) ListTrustZones

func (c *DataSourcePluginClientGRPC) ListTrustZones() ([]*trust_zone_proto.TrustZone, error)

func (*DataSourcePluginClientGRPC) UpdateCluster added in v0.7.1

func (c *DataSourcePluginClientGRPC) UpdateCluster(cluster *clusterpb.Cluster) (*clusterpb.Cluster, error)

func (*DataSourcePluginClientGRPC) UpdateTrustZone

func (*DataSourcePluginClientGRPC) Validate

type GRPCServer

func (*GRPCServer) AddCluster added in v0.7.1

func (*GRPCServer) DestroyCluster added in v0.12.0

func (*GRPCServer) DestroyFederation added in v0.12.0

func (*GRPCServer) DestroyTrustZone added in v0.12.0

func (*GRPCServer) GetCluster added in v0.7.1

func (*GRPCServer) GetClusterByName added in v0.15.0

func (*GRPCServer) GetTrustZoneByName added in v0.15.0

func (*GRPCServer) ListAPBindings added in v0.10.1

func (*GRPCServer) ListClusters added in v0.7.1

func (*GRPCServer) UpdateCluster added in v0.7.1

Jump to

Keyboard shortcuts

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