-
1
-
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
-
12
-
13
-
14
-
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
-
27
-
28
-
29
-
30
-
31
-
32
-
33
-
34
-
35
-
36
-
37
-
38
-
39
-
40
-
41
-
42
-
43
-
44
-
45
-
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
-
56
-
57
-
58
-
59
-
60
-
61
-
62
-
63
-
64
-
65
-
66
-
67
-
68
-
69
-
70
-
71
-
72
-
73
-
74
-
75
-
76
-
77
-
78
-
79
-
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
package activitypub
import (
"strings"
)
type (
// IRI is a Internationalized Resource Identifiers (IRIs) RFC3987
IRI URI
// URI is a Uniform Resource Identifier (URI) RFC3986
URI string
)
// String returns the String value of the URI object
func (u URI) String() string {
return string(u)
}
// String returns the String value of the IRI object
func (i IRI) String() string {
return string(i)
}
// GetLink returns a copy of itself
func (u URI) GetLink() URI {
return u
}
// GetLink returns a URI type coercion of the IRI object
func (i IRI) GetLink() URI {
return URI(i)
}
// UnmarshalJSON
func (u *URI) UnmarshalJSON(s []byte) error {
*u = URI(strings.Trim(string(s), "\""))
return nil
}
// UnmarshalJSON
func (i *IRI) UnmarshalJSON(s []byte) error {
*i = IRI(strings.Trim(string(s), "\""))
return nil
}
// UnmarshalText
func (u URI) UnmarshalText(s []byte) error {
u = URI(strings.Trim(string(s), "\""))
return nil
}
// UnmarshalText
func (i IRI) UnmarshalText(s []byte) error {
i = IRI(strings.Trim(string(s), "\""))
return nil
}
// IsObject
func (u URI) GetID() *ObjectID {
return nil
}
// IsObject
func (i IRI) GetID() *ObjectID {
return nil
}
// GetType
func (u URI) GetType() ActivityVocabularyType {
return LinkType
}
// GetType
func (i IRI) GetType() ActivityVocabularyType {
return LinkType
}
// IsLink
func (u URI) IsLink() bool {
return true
}
// IsLink
func (i IRI) IsLink() bool {
return true
}
// IsObject
func (u URI) IsObject() bool {
return false
}
// IsObject
func (i IRI) IsObject() bool {
return false
}