package
Version:
v2.6.1
Opens a new window with list of versions in this module.
Published: Aug 12, 2024
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
AllToString converts a slice of Ids into a slice of strings
ToBytes converts an Id into a byte slice
Id is a generic identifier for entities
FromBytes converts a byte slice into an Id.
MustParse parses a string into an Id.
If the string is empty, returns an empty Id.
If the string is not a valid Id, panics.
func NewID(values ...any) Id
NewID computes a UUID string hashing the provided values
func OrDefault(id Id, defaultId Id) Id
OrDefault returns the defaultId if id is empty, otherwise returns id
OrNew returns a new Id if id is empty, otherwise returns id
Parse parses a string into an Id.
If the string is empty, returns an empty Id.
SelfOrNew returns a new Id if id is empty, otherwise returns id
Deprecated: use OrNew instead
Source Files
¶
Click to show internal directories.
Click to hide internal directories.