Versions in this module Expand all Collapse all v0 v0.2.0 Jun 21, 2026 v0.1.0 Jun 21, 2026 Changes in this version + const SpecVersion + var Err = errors.New("subjectid") + var ErrAliasesEmpty = fmt.Errorf("%w: aliases identifier must contain at least one element", Err) + var ErrFormatAccount = FormatErr("invalid acct URI") + var ErrFormatDID = FormatErr("invalid DID URL") + var ErrFormatEmail = FormatErr("invalid email addr-spec") + var ErrFormatIssSub = FormatErr("invalid iss/sub identifier") + var ErrFormatPhoneNumber = FormatErr("invalid E.164 phone number") + var ErrFormatReserved = FormatErr("format name is reserved for a built-in") + var ErrFormatURI = FormatErr("invalid absolute URI") + var ErrJSON = fmt.Errorf("%w: input is not a Subject Identifier JSON object", Err) + var ErrNestedAliases = fmt.Errorf("%w: aliases identifier must not contain a nested aliases identifier", Err) + var ErrOpaqueEmpty = fmt.Errorf("%w: opaque identifier is the empty string", Err) + func FormatErr(msg string) error + func MissingFields(names ...string) error + func RegisterFormat(name string, ctor Constructor) error + type AccountID struct + URI string + func (AccountID) Format() string + func (a *AccountID) UnmarshalJSON(data []byte) error + func (a AccountID) MarshalJSON() ([]byte, error) + func (a AccountID) Validate() error + type AliasesID struct + Identifiers []SubjectIdentifier + func (AliasesID) Format() string + func (a *AliasesID) UnmarshalJSON(data []byte) error + func (a AliasesID) MarshalJSON() ([]byte, error) + func (a AliasesID) Validate() error + type Constructor func() SubjectIdentifier + type DIDID struct + URL string + func (DIDID) Format() string + func (d *DIDID) UnmarshalJSON(data []byte) error + func (d DIDID) MarshalJSON() ([]byte, error) + func (d DIDID) Validate() error + type EmailID struct + Email string + func (EmailID) Format() string + func (e *EmailID) UnmarshalJSON(data []byte) error + func (e EmailID) MarshalJSON() ([]byte, error) + func (e EmailID) Validate() error + type ErrRequired struct + Fields []string + func (ErrRequired) Is(target error) bool + func (e ErrRequired) Error() string + type IssSubID struct + Iss string + Sub string + func (IssSubID) Format() string + func (i *IssSubID) UnmarshalJSON(data []byte) error + func (i IssSubID) MarshalJSON() ([]byte, error) + func (i IssSubID) Validate() error + type OpaqueID struct + ID string + func (OpaqueID) Format() string + func (o *OpaqueID) UnmarshalJSON(data []byte) error + func (o OpaqueID) MarshalJSON() ([]byte, error) + func (o OpaqueID) Validate() error + type PhoneNumberID struct + PhoneNumber string + func (PhoneNumberID) Format() string + func (p *PhoneNumberID) UnmarshalJSON(data []byte) error + func (p PhoneNumberID) MarshalJSON() ([]byte, error) + func (p PhoneNumberID) Validate() error + type Seal = sealMarker + type SubjectIdentifier interface + Format func() string + Validate func() error + func Parse(raw json.RawMessage) (SubjectIdentifier, error) + type URIID struct + URI string + func (URIID) Format() string + func (u *URIID) UnmarshalJSON(data []byte) error + func (u URIID) MarshalJSON() ([]byte, error) + func (u URIID) Validate() error + type UnknownFormat struct + FormatName string + Raw json.RawMessage + func (UnknownFormat) Validate() error + func (u *UnknownFormat) UnmarshalJSON(data []byte) error + func (u UnknownFormat) Format() string + func (u UnknownFormat) MarshalJSON() ([]byte, error)