Skip to content

Add the ability to combine multiple UUIDs using Multi*

Latest

Choose a tag to compare

@minhajuddin minhajuddin released this 10 Feb 02:43

Add support for encoding multiple related UUIDs into a single prefixed string, useful for composite keys (e.g., a user-post pair as up.{base64}).

  • New MultiPrefixInfo type for defining composite UUID types with ordered component entities
  • New NewRegistry2 constructor that accepts both []PrefixInfo and []MultiPrefixInfo for one-step registry setup
  • SerializeMulti / DeserializeMulti methods for encoding and decoding multi-UUID strings with entity order enforcement
  • New error types: ErrNotMultiEntity, ErrUUIDCountMismatch, ErrEntityOrderMismatch
  • Internal decodePayload helper to share parsing logic between single and multi deserialization

Full Changelog: v0.2.0...v0.3.0