github.com/geniusesgroup/libgo@v0.0.0-20220713101832-828057a9d3d4/protocol/uri.go (about) 1 /* For license and copyright information please see LEGAL file in repository */ 2 3 package protocol 4 5 // https://en.wikipedia.org/wiki/List_of_URI_schemes 6 type URI interface { 7 Init(uri string) 8 URI() string 9 Scheme() string 10 11 // Codec 12 } 13 14 // https://en.wikipedia.org/wiki/Uniform_Resource_Name 15 type URN interface { 16 URI 17 // URI() string // e.g. "urn:isbn:0451450523" 18 // Scheme() string // always return "urn" 19 NID() string // NID is the namespace identifier 20 NSS() string // NSS is the namespace-specific 21 }