catalogadmission

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: AGPL-3.0 Imports: 4 Imported by: 0 modules, 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

Overview

Package catalogadmission owns SDK-only catalog observation storage and framing. It does not grant access or issue catalog generations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Append

func Append(ctx context.Context, entry Observation) context.Context

Append owns its slice and preserves duplicates for fail-closed validation.

func Clear

func Clear(ctx context.Context) context.Context

Clear masks inherited observations when crossing an RPC boundary.

func Qualified

func Qualified(ctx context.Context, provider, connection string) (string, bool)

Qualified returns an empty, present revision for ambiguous duplicate entries.

Types

type Limits

type Limits struct {
	RevisionBytes int
	MetadataBytes int
	Observations  int
}

Limits are supplied by the domain boundary, not inferred from transport input.

type Observation

type Observation struct {
	Provider   string
	Connection string
	Revision   string
}

Observation is an exact provider/connection catalog observation, not a grant.

func Entries

func Entries(ctx context.Context) []Observation

Entries borrows immutable SDK-owned storage. Callers must not modify it.

type ViolationError

type ViolationError struct {
	Code    string
	Message string
}

ViolationError contains only static, public-safe boundary diagnostics.

func EncodedSize

func EncodedSize(ctx context.Context, defaultRevision string, limits Limits) (int, *ViolationError)

EncodedSize validates every retained entry, uint16 frame widths, and the aggregate metadata budget. An absent qualified set has no frame; the default pin is validated separately.

func Marshal

func Marshal(ctx context.Context, defaultRevision string, limits Limits) ([]byte, *ViolationError)

Marshal encodes the SDK-private version/count/length frame after admission. Counts and field lengths must also fit uint16, even when supplied limits are wider.

func Unmarshal

func Unmarshal(
	ctx context.Context,
	frame []byte,
	defaultRevision string,
	limits Limits,
) (context.Context, *ViolationError)

Unmarshal admits a complete frame without inheriting previous observations. Repeated entries preserve duplicate evidence until rejection; trailing bytes fail.

func ValidateRevision

func ValidateRevision(revision string, maxBytes int) *ViolationError

ValidateRevision checks observation syntax without discovering a catalog.

func (*ViolationError) Error

func (v *ViolationError) Error() string

Error returns the public-safe diagnostic without including observation data.

Jump to

Keyboard shortcuts

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