Documentation ¶
Index ¶
Constants ¶
View Source
const StdHRP = "su"
View Source
const StdLen = 14
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Id ¶
type Id struct {
T by
}
func MustNew ¶
func MustNew[V st | by](s V) *Id
MustNew is the same as NewId except it doesn't check if you feed it rubbish.
DO NOT USE WITHOUT CHECKING THE ID IS NOT NIL AND > 0 AND <= 64
func NewId ¶
func NewId[V st | by](s V) (*Id, er)
NewId inspects a string and converts to Id if it is valid. Invalid means length == 0 or length > 64.
func (*Id) IsValid ¶
func (si *Id) IsValid() bo
IsValid returns true if the subscription id is between 1 and 64 characters. Invalid means too long or not present.
func (*Id) MarshalJSON ¶
func (si *Id) MarshalJSON(dst by) (b by, err er)
func (*Id) UnmarshalJSON ¶
func (si *Id) UnmarshalJSON(b by) (r by, err er)
Click to show internal directories.
Click to hide internal directories.