search and/or read your saved and liked bluesky posts
wails go svelte sqlite desktop bluesky
at main 44 lines 1.7 kB view raw
1package main 2 3import ( 4 "time" 5) 6 7// Post represents a Bluesky post in the database 8type Post struct { 9 URI string `json:"uri"` 10 CID string `json:"cid"` 11 AuthorDID string `json:"author_did"` 12 AuthorHandle string `json:"author_handle"` 13 Text string `json:"text"` 14 CreatedAt time.Time `json:"created_at"` 15 LikeCount int `json:"like_count"` 16 RepostCount int `json:"repost_count"` 17 ReplyCount int `json:"reply_count"` 18 Source string `json:"source"` // 'saved' or 'liked' 19 Facets string `json:"facets"` // JSON-encoded facets 20 IndexedAt time.Time `json:"indexed_at"` 21} 22 23// Auth represents OAuth authentication information 24type Auth struct { 25 DID string `json:"did"` 26 Handle string `json:"handle"` 27 AccessJWT string `json:"access_jwt"` 28 RefreshJWT string `json:"refresh_jwt"` 29 PDSURL string `json:"pds_url"` 30 SessionID string `json:"session_id"` 31 AuthServerURL string `json:"auth_server_url"` 32 AuthServerTokenEndpoint string `json:"auth_server_token_endpoint"` 33 AuthServerRevocationEndpoint string `json:"auth_server_revocation_endpoint"` 34 DPoPAuthNonce string `json:"dpop_auth_nonce"` 35 DPoPHostNonce string `json:"dpop_host_nonce"` 36 DPoPPrivateKey string `json:"dpop_private_key"` 37 UpdatedAt time.Time `json:"updated_at"` 38} 39 40// SearchResult represents a search result with BM25 ranking 41type SearchResult struct { 42 Post 43 Rank float64 `json:"rank"` 44}