1
0
Fork 0

Adding upstream version 0.0~git20250501.71edba4.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-05-18 22:06:39 +02:00
parent c6ff472a6d
commit c8085bda34
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
87 changed files with 24009 additions and 0 deletions

20
object_id.go Normal file
View file

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