Debian Codegraph @

object_id.go

raw symbols SCIP
1 package activitypub
2
3 // ID designates a unique global identifier.
4 // All Objects in [ActivityStreams] should have unique global identifiers.
5 // ActivityPub extends this requirement; all objects distributed by the ActivityPub protocol MUST
6 // have unique global identifiers, unless they are intentionally transient
7 // (short-lived activities that are not intended to be able to be looked up,
8 // such as some kinds of chat messages or game notifications).
9 // These identifiers must fall into one of the following groups:
10 //
11 // 1. Publicly de-referenceable URIs, such as HTTPS URIs, with their authority belonging
12 // to that of their originating server. (Publicly facing content SHOULD use HTTPS URIs).
13 // 2. An ID explicitly specified as the JSON null object, which implies an anonymous object
14 // (a part of its parent context)
15 type ID = IRI
16
17 // IsValid returns if the receiver pointer is not nil and if dereferenced it has a positive length.
18 func (i *ID) IsValid() bool {
19 return i != nil && len(*i) > 0
20 }