linkwallet/entity/bookmark.go

39 lines
638 B
Go
Raw Normal View History

2022-05-24 18:03:31 +09:30
package entity
2025-05-01 23:39:51 +09:30
import (
"html/template"
"time"
)
2022-05-24 18:03:31 +09:30
type Bookmark struct {
ID uint64 `boltholdKey:"ID"`
2022-05-24 18:03:31 +09:30
URL string
Info PageInfo
Tags []string
PreserveTitle bool
2022-05-24 18:03:31 +09:30
TimestampCreated time.Time
TimestampLastScraped time.Time
}
2025-05-01 23:39:51 +09:30
func (bm Bookmark) Type() string {
return "bookmark"
}
2022-05-24 18:03:31 +09:30
type PageInfo struct {
Fetched time.Time
Title string
Size int
StatusCode int
RawText string
}
2025-05-01 23:39:51 +09:30
func (pi PageInfo) Type() string {
return "info"
}
type BookmarkSearchResult struct {
Bookmark Bookmark
Score float64
Highlight template.HTML
}