Documentation
¶
Overview ¶
Package bundle loads and validates the read-only descriptor bundle (descriptors.binpb + openapi.json + versions.yaml) at boot, fail-fast. The route → message binding is read verbatim (zero inference); every binding is resolved against the FileDescriptorSet here so the runtime never has to. Transform stanzas live in the operator-owned resolution.yaml at the bundle root; the per-version layer manifests are binding-only. Unknown keys are refused by strict decode.
Index ¶
- type Bundle
- type Contract
- func (c *Contract) Chain() []*Contract
- func (c *Contract) ContractVersion() string
- func (c *Contract) Method() string
- func (c *Contract) RequestMessage() string
- func (c *Contract) RequestOps() []transform.Op
- func (c *Contract) ResponseMessage() string
- func (c *Contract) ResponseOps() []transform.Op
- func (c *Contract) Route() string
- func (c *Contract) Target() string
- func (c *Contract) TransformTarget() string
- type MessageNotFoundError
- type ParseError
- type ReadError
- type UnsupportedVersionError
- type ValidationError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Bundle ¶
type Bundle struct {
// contains filtered or unexported fields
}
func Load ¶
Load reads, parses, validates, and resolves the bundle in dir. The bundle is a directory of layer subdirectories, each holding descriptors.binpb, openapi.json, and versions.yaml. Any failure is fatal (a typed error); the caller refuses to start.
func (*Bundle) Message ¶
func (b *Bundle) Message(fullName string) (protoreflect.MessageDescriptor, error)
Message resolves a fully-qualified proto message name against the bundle's FileDescriptorSet.
type Contract ¶
type Contract struct {
// contains filtered or unexported fields
}
Contract is one resolved binding. Fields are unexported with accessors so it satisfies an adapter Binding interface (RequestMessage/ResponseMessage) structurally, with no import cycle.
func (*Contract) ContractVersion ¶
func (*Contract) RequestMessage ¶
func (*Contract) RequestOps ¶ added in v0.2.0
func (*Contract) ResponseMessage ¶
func (*Contract) ResponseOps ¶ added in v0.2.0
func (*Contract) TransformTarget ¶ added in v0.3.0
type MessageNotFoundError ¶
func (*MessageNotFoundError) Error ¶
func (e *MessageNotFoundError) Error() string
type ParseError ¶
func (*ParseError) Error ¶
func (e *ParseError) Error() string
func (*ParseError) Unwrap ¶
func (e *ParseError) Unwrap() error
type UnsupportedVersionError ¶
type UnsupportedVersionError struct{ Version int }
func (*UnsupportedVersionError) Error ¶
func (e *UnsupportedVersionError) Error() string
type ValidationError ¶
func (*ValidationError) Error ¶
func (e *ValidationError) Error() string