Versions in this module Expand all Collapse all v1 v1.0.0 Aug 25, 2026 Changes in this version + var ErrConfirmationRequired = errors.New("schema registry: deletion confirmation required") + var ErrFingerprintCollision = errors.New("schema registry: fingerprint collision") + var ErrIncompatible = errors.New("schema registry: incompatible") + var ErrInvalidRequest = errors.New("schema registry: invalid request") + var ErrInvalidSchema = errors.New("schema registry: invalid schema") + var ErrLimitExceeded = errors.New("schema registry: limit exceeded") + var ErrNotFound = errors.New("schema registry: not found") + var ErrOfflineMiss = errors.New("schema registry: offline cache miss") + var ErrReferenceCycle = errors.New("schema registry: reference cycle") + var ErrReferenceLimit = errors.New("schema registry: reference limit exceeded") + var ErrReferenceMissing = errors.New("schema registry: missing reference") + var ErrRejected = errors.New("schema registry: rejected") + var ErrResolutionMismatch = errors.New("schema registry: resolution identity mismatch") + var ErrUnauthorized = errors.New("schema registry: unauthorized") + var ErrUnavailable = errors.New("schema registry: unavailable") + var ErrUnknownOutcome = errors.New("schema registry: unknown outcome") + var ErrUnsupportedFormat = errors.New("schema registry: unsupported format") + var ErrUnsupportedOperation = errors.New("schema registry: unsupported operation") + type AvailabilityPolicy string + const AllowStale + const CacheOnly + const FailClosed + const ReturnUnavailable + type Bundle struct + func LoadBundle(ctx context.Context, encoded []byte, canonicalizers map[Format]Canonicalizer, ...) (Bundle, error) + func NewBundle(root Schema, dependencies []Schema, limits GraphLimits, provenance Provenance) (Bundle, error) + func (bundle Bundle) MarshalBinary() ([]byte, error) + func (bundle Bundle) Provenance() Provenance + func (bundle Bundle) Resolve(fingerprint Fingerprint) (Schema, bool) + func (bundle Bundle) Root() Schema + type CacheResolution struct + Age time.Duration + Result ResolveResult + StaleCause error + State CacheState + type CacheState string + const CacheFresh + const CacheLoaded + const CacheNegative + const CacheStale + type Canonicalizer interface + Canonicalize func(context.Context, Definition) ([]byte, error) + type Capabilities struct + BoundedListing bool + CompatibilityModes []CompatibilityMode + Formats []Format + HardDelete bool + Lookups []LookupKind + NumericVersions bool + OpaqueVersions bool + Provider string + RegistrationCreationOutcome bool + SchemaReferences bool + SoftDelete bool + type Client struct + func NewClient(provider Provider, limits Limits) (*Client, error) + func (client *Client) Capabilities() Capabilities + func (client *Client) CheckCompatibility(ctx context.Context, request CompatibilityRequest) (CompatibilityResult, error) + func (client *Client) Delete(ctx context.Context, request DeleteRequest) (DeleteResult, error) + func (client *Client) List(ctx context.Context, request ListRequest) (ListPage, error) + func (client *Client) Register(ctx context.Context, request RegisterRequest) (RegisterResult, error) + func (client *Client) Resolve(ctx context.Context, lookup Lookup) (ResolveResult, error) + type Clock interface + Now func() time.Time + type CodecIntegration struct + func NewCodecIntegration(codec ValueCodec, framer Framer, limits CodecLimits) (*CodecIntegration, error) + func (integration *CodecIntegration) Decode(ctx context.Context, schema Schema, message WireMessage, target any) error + func (integration *CodecIntegration) Encode(ctx context.Context, schema Schema, id ProviderID, value any) ([]byte, error) + func (integration *CodecIntegration) Parse(ctx context.Context, framed []byte) (WireMessage, error) + type CodecLimits struct + MaxFrameBytes int + MaxPayloadBytes int + type CompatibilityMode string + const CompatibilityBackward + const CompatibilityBackwardTransitive + const CompatibilityForward + const CompatibilityForwardTransitive + const CompatibilityFull + const CompatibilityFullTransitive + const CompatibilityNone + const CompatibilityProviderSpecific + type CompatibilityRequest struct + Candidate Schema + Mode CompatibilityMode + ProviderMode string + Subject Subject + type CompatibilityResult struct + Compatible bool + Diagnostics []Diagnostic + Supported bool + type CompileLimits struct + MaxCanonicalBytes int + MaxMetadata int + MaxReferences int + MaxSchemaBytes int + func DefaultCompileLimits() CompileLimits + type Definition struct + Content []byte + Format Format + Metadata map[string]string + References []Reference + type DeleteRequest struct + Policy DeletionPolicy + Subject Subject + Version Version + type DeleteResult struct + Lifecycle LifecycleState + type DeletingProvider interface + Delete func(context.Context, DeleteRequest) (DeleteResult, error) + type DeletionMode string + const DeleteHard + const DeleteSoft + type DeletionPolicy struct + ExpectedFingerprint Fingerprint + Mode DeletionMode + type Diagnostic struct + Code string + Message string + Path string + type Fingerprint struct + func ParseFingerprint(value string) (Fingerprint, error) + func (fingerprint Fingerprint) String() string + type Format string + const FormatAvro + const FormatJSONSchema + const FormatProtobuf + type Framer interface + Frame func(context.Context, ProviderID, []byte) ([]byte, error) + Unframe func(context.Context, []byte) (ProviderID, []byte, error) + type GraphLimits struct + MaxDepth int + MaxReferences int + MaxSchemas int + type LifecycleState string + const LifecycleAvailable + const LifecycleDeleted + const LifecycleDeleting + const LifecycleFailed + const LifecyclePending + const LifecycleUnknown + type Limits struct + MaxConcurrent int + MaxListResults int + MaxSchemaBytes int + type ListPage struct + NextPageToken string + Schemas []SchemaDescriptor + type ListRequest struct + Limit int + PageToken string + SubjectPrefix string + type ListingProvider interface + List func(context.Context, ListRequest) (ListPage, error) + type Lookup struct + func AtVersion(subject Subject, version Version) Lookup + func ByFingerprint(fingerprint Fingerprint) Lookup + func ByProviderID(id ProviderID) Lookup + func Latest(subject Subject) Lookup + func (lookup Lookup) Fingerprint() Fingerprint + func (lookup Lookup) Kind() LookupKind + func (lookup Lookup) ProviderID() ProviderID + func (lookup Lookup) Subject() Subject + func (lookup Lookup) Version() Version + type LookupKind string + const LookupByFingerprint + const LookupByProviderID + const LookupByVersion + const LookupLatest + type Provenance struct + Revision string + Source string + type Provider interface + Capabilities func() Capabilities + CheckCompatibility func(context.Context, CompatibilityRequest) (CompatibilityResult, error) + Register func(context.Context, RegisterRequest) (RegisterResult, error) + Resolve func(context.Context, Lookup) (ResolveResult, error) + type ProviderID struct + Provider string + Scope string + Value string + type ProviderReference struct + Name string + Target ReferenceCoordinate + type Reference struct + Fingerprint Fingerprint + Name string + Subject string + Version uint64 + type ReferenceCoordinate struct + Subject Subject + Version Version + type ReferenceDocument struct + Coordinate ReferenceCoordinate + References []ProviderReference + type ReferenceGraph struct + func BuildReferenceGraph(ctx context.Context, roots []ReferenceCoordinate, resolver ReferenceResolver, ...) (ReferenceGraph, error) + func (graph ReferenceGraph) Documents() []ReferenceDocument + type ReferenceResolver interface + ResolveReference func(context.Context, ReferenceCoordinate) (ReferenceDocument, error) + type RegisterRequest struct + Schema Schema + Subject Subject + type RegisterResult struct + ID ProviderID + Outcome RegistrationOutcome + Version Version + type RegistrationOutcome string + const RegistrationCreated + const RegistrationExisting + const RegistrationIncompatible + const RegistrationRejected + const RegistrationUnauthorized + const RegistrationUnavailable + const RegistrationUnknown + type ResolveCache struct + func NewResolveCache(resolver Resolver, config ResolveCacheConfig) (*ResolveCache, error) + func (cache *ResolveCache) Invalidate(lookup Lookup) error + func (cache *ResolveCache) Prime(lookup Lookup, result ResolveResult) error + func (cache *ResolveCache) Resolve(ctx context.Context, lookup Lookup, policy AvailabilityPolicy) (resolution CacheResolution, err error) + type ResolveCacheConfig struct + Clock Clock + FreshFor time.Duration + MaxConcurrent int + MaxEntries int + NegativeFor time.Duration + Observer ResolveCacheObserver + StaleFor time.Duration + type ResolveCacheEvent struct + Outcome string + State CacheState + type ResolveCacheObserver interface + ObserveResolveCache func(context.Context, ResolveCacheEvent) + type ResolveResult struct + ID ProviderID + Lifecycle LifecycleState + Schema Schema + Subject Subject + Version Version + type Resolver interface + Resolve func(context.Context, Lookup) (ResolveResult, error) + type Schema struct + func Compile(ctx context.Context, definition Definition, canonicalizer Canonicalizer) (Schema, error) + func CompileWithLimits(ctx context.Context, definition Definition, canonicalizer Canonicalizer, ...) (Schema, error) + func (schema Schema) Canonical() []byte + func (schema Schema) Definition() Definition + func (schema Schema) Fingerprint() Fingerprint + type SchemaDescriptor struct + Fingerprint Fingerprint + Format Format + ID ProviderID + Lifecycle LifecycleState + Subject Subject + Version Version + type Subject struct + Name string + Registry string + type ValueCodec interface + Decode func(context.Context, Schema, []byte, any) error + Encode func(context.Context, Schema, any) ([]byte, error) + type Version struct + Number uint64 + Opaque string + type WireMessage struct + ID ProviderID + Payload []byte