Documentation
¶
Index ¶
- func BuildSchemaIDOverrides(files []*ast.File, info *types.Info, pkg *types.Package) map[string]string
- func CanonicalTypeString(t types.Type) string
- func ParseFingerprint(fp string) (codecID CodecID, version CodecVersion, hash string, err error)
- func ResolveSchemaID(typeExpr string, overrides map[string]string) (schemaID string, ok bool)
- func ResolveSchemaIDForType(t types.Type, overrides map[string]string) (schemaID string, ok bool)
- type CodecID
- type CodecVersion
- type FingerprintCalculator
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildSchemaIDOverrides ¶
func BuildSchemaIDOverrides(files []*ast.File, info *types.Info, pkg *types.Package) map[string]string
BuildSchemaIDOverrides scans VangoSchemaID() methods that return a string literal or const and returns a map keyed by fully-qualified type name.
func CanonicalTypeString ¶
CanonicalTypeString returns the canonical type string used for schema fallback IDs.
func ParseFingerprint ¶
func ParseFingerprint(fp string) (codecID CodecID, version CodecVersion, hash string, err error)
ParseFingerprint extracts components from a fingerprint string.
func ResolveSchemaID ¶
ResolveSchemaID returns the schema ID for a type using a precomputed override map. If an override exists (from VangoSchemaID), return it with ok=true. Otherwise return the fully-qualified type name and ok=false.
Types ¶
type CodecVersion ¶
type CodecVersion string
CodecVersion is the codec version string.
const ( CodecVersionV1 CodecVersion = "v1" CodecVersionV2 CodecVersion = "v2" )
type FingerprintCalculator ¶
type FingerprintCalculator struct {
// contains filtered or unexported fields
}
FingerprintCalculator computes codec fingerprints for types.
func NewFingerprintCalculator ¶
func NewFingerprintCalculator() *FingerprintCalculator
NewFingerprintCalculator creates a fingerprint calculator.