Documentation ¶
Overview ¶
Package urn provides a Uniform Resource Name that implemnets RFC8141.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type URN ¶
type URN struct {
// contains filtered or unexported fields
}
URN represents a Uniform Resource Name that implemnets RFC8141 https://www.ietf.org/rfc/rfc8141.txt.
func NewURN ¶
NewURN creates a new URN with the specified namespace ID and namespace-specific string.
func TryParseString ¶
TryParseString attempts to create a new URN from the specified string.
func (*URN) GetNamespaceID ¶
GetNamespaceID returns the URN's namespace ID (NID).
func (*URN) GetNamespaceSpecificString ¶
GetNamespaceSpecificString returns the URN's namespace-specific string (NSS).
func (*URN) MarshalJSON ¶
MarshalJSON marshals the URN into a JSON string.
func (*URN) UnmarshalJSON ¶
UnmarshalJSON unmarshals the URN from a JSON string.
Click to show internal directories.
Click to hide internal directories.