pconnutils

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: Apache-2.0 Imports: 3 Imported by: 4

Documentation

Index

Constants

View Source
const (
	EnvConduitConnectorUtilitiesGRPCTarget = "CONDUIT_CONNECTOR_UTILITIES_GRPC_TARGET"
	EnvConduitConnectorToken               = "CONDUIT_CONNECTOR_TOKEN"
)

Variables

View Source
var (
	ErrUnimplemented = errors.New("method not implemented")

	ErrSubjectNotFound = errors.New("schema subject not found")
	ErrVersionNotFound = errors.New("schema version not found")
	ErrInvalidSchema   = errors.New("invalid schema")
)

Functions

func ConnectorTokenFromContext

func ConnectorTokenFromContext(ctx context.Context) string

ConnectorTokenFromContext fetches the connector token from the context. If the context does not contain a connector token it returns an empty string.

func ContextWithConnectorToken

func ContextWithConnectorToken(ctx context.Context, connectorToken string) context.Context

ContextWithConnectorToken wraps ctx and returns a context that contains the connector token.

Types

type CreateSchemaRequest

type CreateSchemaRequest struct {
	Subject string
	Type    schema.Type
	Bytes   []byte
}

type CreateSchemaResponse

type CreateSchemaResponse struct {
	Schema schema.Schema
}

type GetSchemaRequest

type GetSchemaRequest struct {
	Subject string
	Version int
}

type GetSchemaResponse

type GetSchemaResponse struct {
	Schema schema.Schema
}

type SchemaService

type SchemaService interface {
	CreateSchema(context.Context, CreateSchemaRequest) (CreateSchemaResponse, error)
	GetSchema(context.Context, GetSchemaRequest) (GetSchemaResponse, error)
}

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
v1

Jump to

Keyboard shortcuts

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