Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCatalogDataStore ¶
func NewCatalogDataStore(config CatalogDataStoreConfig) *catalogDataStore
func ThrowAndCatch ¶
func ThrowAndCatch( catalog *catalogDataStore, request *pb.DataAccessRequest, ) (*pb.DataAccessResponse, error)
Types ¶
type CatalogClient ¶
type CatalogClient struct {
// contains filtered or unexported fields
}
func NewCatalogClient ¶
func NewCatalogClient(ctx context.Context, cfg CatalogConfig) (*CatalogClient, error)
NewCatalogClient creates a new CatalogClient with the provided configuration.
Example usage:
cfg := CatalogConfig{
GRPC: "op-catalog.example.com:443",
Creds: credentials.NewTLS(&tls.Config{}),
HMACConfig: &HMACAuthConfig{
KeyID: "kms-key-id",
KeyRegion: "us-west-2",
Authority: "op-catalog.example.com",
},
}
client, err := NewCatalogClient(ctx, cfg)
func (*CatalogClient) Close ¶ added in v0.67.0
func (c *CatalogClient) Close() error
Close closes the underlying gRPC connection.
func (*CatalogClient) CloseStream ¶
func (c *CatalogClient) CloseStream() error
CloseStream closes the current stream.
func (*CatalogClient) DataAccess ¶
func (c *CatalogClient) DataAccess(req proto.Message) (grpc.BidiStreamingClient[pb.DataAccessRequest, pb.DataAccessResponse], error)
type CatalogConfig ¶
type CatalogConfig struct {
GRPC string
Creds credentials.TransportCredentials
HMACConfig *HMACAuthConfig
}
type CatalogDataStoreConfig ¶
type CatalogDataStoreConfig struct {
Domain string
Environment string
Client *CatalogClient
}
type HMACAuthConfig ¶ added in v0.65.0
type HMACAuthConfig struct {
KeyID string
KeyRegion string
Authority string // The gRPC authority (hostname without port) used for HMAC signing
}
HMACAuthConfig holds HMAC authentication configuration.
type TestContainerSetup ¶ added in v0.60.0
type TestContainerSetup struct {
PostgresContainer *postgres.PostgresContainer
CatalogContainer testcontainers.Container
PostgresDSN string
CatalogGRPCAddr string
Network *testcontainers.DockerNetwork
}
TestContainerSetup holds all testcontainer resources for catalog service testing
func SetupCatalogTestContainers ¶ added in v0.60.0
func SetupCatalogTestContainers(ctx context.Context) (*TestContainerSetup, error)
SetupCatalogTestContainers initializes all required containers for testing: 1. PostgreSQL database 2. Catalog service (with db migration)
func (*TestContainerSetup) GetCatalogGRPCAddress ¶ added in v0.60.0
func (s *TestContainerSetup) GetCatalogGRPCAddress() string
GetCatalogGRPCAddress returns the gRPC address for catalog service
Click to show internal directories.
Click to hide internal directories.