diff options
Diffstat (limited to 'backend/notes/note.go')
| -rw-r--r-- | backend/notes/note.go | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/backend/notes/note.go b/backend/notes/note.go index 1d92948..7c8de36 100644 --- a/backend/notes/note.go +++ b/backend/notes/note.go @@ -4,10 +4,21 @@ import ( "time" ) -type Note interface { - GetID() string - GetAuthorDID() string - GetAuthorHandle() string - GetTimestamp() time.Time - GetReplyTo() *string +type Note struct { + URI string `json:"uri"` + AuthorDID string `json:"authorDid"` + AuthorHandle string `json:"authorHandle"` + AuthorName string `json:"authorName"` + AvatarURL string `json:"avatarURL"` + Text string `json:"text"` + CreatedAt time.Time `json:"createdAt"` + ReplyTo *string `json:"replyTo,omitempty"` + Facets []Facet `json:"facets,omitempty"` +} + +type Facet struct { + ByteStart int `json:"byteStart"` + ByteEnd int `json:"byteEnd"` + Type string `json:"type"` + Value string `json:"value"` // the link destination, whether url, profile or tag } |
