Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Scheme is the required scheme for all URNs in the system. Scheme = "urn" // --- Standard Namespaces (Helpers) --- // SecureMessaging is the legacy/core namespace ("sm"). SecureMessaging = "sm" // AuthNamespace is for federated identities ("auth"). AuthNamespace = "auth" // LookupNamespace is for database lookup keys ("lookup"). LookupNamespace = "lookup" // EntityTypeUser is a standard entity type for users. EntityTypeUser = "user" // EntityTypeGroup is a standard entity type for groups. EntityTypeGroup = "group" )
Variables ¶
View Source
var ( // ErrInvalidFormat is returned when a string or components do not conform // to the expected URN structure. ErrInvalidFormat = errors.New("invalid URN format") )
Functions ¶
Types ¶
type URN ¶
type URN struct {
// contains filtered or unexported fields
}
URN represents a parsed, validated Uniform Resource Name.
func New ¶
New is the constructor for a URN. REFACTOR: Removed namespace validation. This is now a general-purpose URN container.
func (URN) EntityType ¶
func (URN) MarshalJSON ¶
func (*URN) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.