Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var GenerateChallenge = func() string {
return generateSecureRandomStr(64)
}
var GenerateRequestId = func() string {
return generateSecureRandomStr(32)
}
var GenerateScheduleID = func() string { b := make([]byte, scheduleIDLength) for i := range b { b[i] = cryptoRandChar(groupIDCharset) } return string(b) }
GenerateScheduleID mints a schedule ID. Kept short because it travels to the device on every schedule push and firmware bounds the field; drawn from the same lowercase alphanumeric charset as group IDs so it is unambiguous when a user reads it aloud.
Functions ¶
func FormatUsername ¶
FormatUsername is the single canonical form (lower+trim) shared by the derived user_id, the stored email, and the email-index lookup key so they cannot drift.
func GenerateGroupID ¶
func GenerateGroupID() string
GenerateGroupID generates a random group ID of 6 characters. The first character is guaranteed to be a lowercase letter, followed by 5 alphanumeric characters (lowercase letters and digits).
func GenerateSubGroupID ¶
func GenerateSubGroupID() string
GenerateSubGroupID generates a random subgroup ID of 3 characters. The ID consists of lowercase letters and digits.
Types ¶
This section is empty.