Documentation
¶
Overview ¶
Package id generates prefixed, sortable, opaque identifiers: app_01HQ8..., spec_..., usr_...
ULID body. The prefix is load-bearing — it makes log lines self-describing and copy-paste mistakes visible, which is why IDs are text rather than uuid in the schema.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Is ¶
Is reports whether s is a well-formed identifier of kind k.
Use it at API boundaries. Rejecting an app ID handed to a volume endpoint produces a clear error instead of a lookup that mysteriously finds nothing — which is the whole reason the prefix exists.
Types ¶
type Kind ¶
type Kind string
Kind is an object's ID prefix.
The prefix is load-bearing, not decoration (design 00 §3.1): it makes log lines and error messages self-describing, and it makes copy-paste mistakes visible at a glance rather than at the point of a confusing 404.
const ( App Kind = "app" Spec Kind = "spec" Deployment Kind = "dep" User Kind = "usr" Group Kind = "grp" Token Kind = "tok" Session Kind = "ses" Role Kind = "role" Grant Kind = "gr" Volume Kind = "vol" Secret Kind = "sec" Service Kind = "svc" Backup Kind = "bkp" Notification Kind = "ntf" IdentityAdpt Kind = "idp" Request Kind = "req" // Scan is a security scan of one spec revision (R-310). Scan Kind = "scan" // Section is a grouping in one person's launcher (R-342). Not "sec", // which is a secret. Section Kind = "sect" // AuditArchive is one archived month of the audit log (R-347). AuditArchive Kind = "aar" // Upgrade is one in-place upgrade of Pando itself (R-359). Upgrade Kind = "upg" // Event, Subscription and Delivery are the outbox, a subscription to it, // and one event sent to one subscription (issue #50, R-366). Event Kind = "evt" Subscription Kind = "sub" Delivery Kind = "dlv" // Replica is one running Pando process (issue #72). Fresh on every start: // a restarted process is a new replica, which is how work the old one had // under way is recognized as nobody's. Replica Kind = "rep" // Adapter configs are prefixed by category, so a log line naming one says // which kind of adapter it is (design 02 §2.5). AdapterRuntime Kind = "rt" AdapterRouting Kind = "rte" AdapterBuilder Kind = "bld" AdapterSecrets Kind = "sek" AdapterServices Kind = "svcs" AdapterNotify Kind = "ntf" AdapterScanner Kind = "scn" )