diff options
| author | Guillermo Serrahima <dev@vylion.com> | 2026-03-12 17:18:37 +0100 |
|---|---|---|
| committer | Guillermo Serrahima <dev@vylion.com> | 2026-03-12 17:18:37 +0100 |
| commit | 5c5028eff2681946fe1c3b330a89c65de6f134b5 (patch) | |
| tree | e661aeaa2e3c35682506113f74e274434ab3a166 /backend/notes/note.go | |
| parent | e757316366f9308718566feda5f9570a3b4a7f5f (diff) | |
| download | llostre-5c5028eff2681946fe1c3b330a89c65de6f134b5.tar.xz llostre-5c5028eff2681946fe1c3b330a89c65de6f134b5.zip | |
Note struct refactor
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 } |
