urn¶
gitlab.com/phpboyscout/go/urn is the grammar of the estate's URN identifiers, and their parsers.
A schema URN is what an event's dataschema attribute carries, and what
go/schema resolves. A scope URN is the estate's tenancy attribute.
s, err := urn.ParseSchema("urn:phpboyscout:schema:orders.created:3")
// s.Name == "orders.created", s.Version == 3
- URN grammar: every rule, and the errors that enforce them.
- Why a URN and not a URL: a
dataschemaoutlives the host that served it. - API reference on pkg.go.dev.
The module used to be gitlab.com/phpboyscout/go/cloudevents/urn. The types and functions are
unchanged; only the import path moved.