aboutsummaryrefslogtreecommitdiff
path: root/backend/notes/note.go
blob: 3b32aa195b9d4616ccc9f2835c91fe44898045f0 (plain)
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
package notes

import (
	"time"
)

type Note struct {
	URI            string    `json:"uri"`
	AuthorDID      string    `json:"authorDid"`
	AuthorHandle   string    `json:"authorHandle"`
	AuthorName     string    `json:"authorName"`
	AuthorNoUnauth bool      `json:"authorNoUnauth"` // author has !no-unauthenticated label
	AvatarURL      string    `json:"avatarURL"`
	Text           string    `json:"text"`
	CreatedAt      time.Time `json:"createdAt"`
	ReplyTo        *string   `json:"replyTo,omitempty"`
	Facets         []Facet   `json:"facets,omitempty"`
	Parents        []string  `json:"parents,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
}