Support tag property on objects

This commit is contained in:
Matt Baer
2018-08-18 12:34:29 -04:00
parent 63de2e6491
commit eba1520b79
2 changed files with 15 additions and 0 deletions
+1
View File
@@ -112,6 +112,7 @@ type Object struct {
Name string `json:"name,omitempty"`
Content string `json:"content"`
ContentMap map[string]string `json:"contentMap,omitempty"`
Tag []Tag `json:"tag"`
}
// NewNoteObject creates a basic Note object that includes the public
+14
View File
@@ -0,0 +1,14 @@
package activitystreams
type Tag struct {
Type TagType `json:"type"`
HRef string `json:"href"`
Name string `json:"name"`
}
type TagType string
const (
TagHashtag TagType = "Hashtag"
TagMention = "Mention"
)