Documentation
¶
Index ¶
Constants ¶
const ( // ULIDLength is the standard length of a ULID ULIDLength = 26 // ValidULIDChars contains all valid characters for a ULID (Crockford's base32) // Excludes I, L, O, U to avoid confusion ValidULIDChars = "0123456789ABCDEFGHJKMNPQRSTVWXYZabcdefghjkmnpqrstvwxyz" )
Variables ¶
This section is empty.
Functions ¶
func ExtractULIDFromIdentifier ¶
ExtractULIDFromIdentifier extracts a ULID from a string that may contain other text For example: "My Org (01HKT3M4Y8Z5V6R9S7X2F0Q3WE)" returns "01HKT3M4Y8Z5V6R9S7X2F0Q3WE"
func GetULIDFromOrg ¶
func GetULIDFromOrg(org *dotenv.Organization) string
GetULIDFromOrg extracts the ULID from an organization, checking both ULID and ID fields This handles the API inconsistency where ULID is sometimes returned in the ID field
func IsValidULID ¶
IsValidULID checks if a string is a valid ULID format
func NormalizeULID ¶
NormalizeULID converts a ULID to uppercase for consistent comparison
func Slugify ¶
Slugify converts a string into a URL-friendly slug Rules: - Convert to lowercase - Replace spaces with hyphens - Remove special characters except: a-z, 0-9, -, _, . - Collapse multiple hyphens - Trim hyphens from start/end
func ValidateULID ¶
ValidateULID validates a ULID and returns an error if invalid
Types ¶
This section is empty.