43 lines
1.3 KiB
Go
43 lines
1.3 KiB
Go
package main
|
|
|
|
type entry struct {
|
|
ID int64 `json:"_id"`
|
|
PublicID int64 `json:"id"`
|
|
Version int `json:"version"`
|
|
Note string `json:"note"`
|
|
Repos []string `json:"repos,omitempty"`
|
|
Host string `json:"host,omitempty"`
|
|
Tags []string `json:"tags,omitempty"`
|
|
User string `json:"user,omitempty"`
|
|
Context string `json:"context,omitempty"`
|
|
DeleteTimestamp string `json:"delete_timestamp,omitempty"`
|
|
Created string `json:"created"`
|
|
}
|
|
|
|
type flashcardSummary struct {
|
|
URL string `json:"url"`
|
|
PublicID int64 `json:"id"`
|
|
Version int `json:"version"`
|
|
Note string `json:"note"`
|
|
Repos []string `json:"repos,omitempty"`
|
|
Host string `json:"host,omitempty"`
|
|
Tags []string `json:"tags,omitempty"`
|
|
User string `json:"user,omitempty"`
|
|
Created string `json:"created"`
|
|
}
|
|
|
|
type vote struct {
|
|
ID int64 `json:"_id"`
|
|
FlashcardID int64 `json:"flashcard_id"`
|
|
Value int `json:"value"`
|
|
User string `json:"user"`
|
|
Repo string `json:"repo"`
|
|
Message string `json:"message"`
|
|
Created string `json:"created"`
|
|
}
|
|
|
|
type searchResult struct {
|
|
Entry entry `json:",inline"`
|
|
Score float32 `json:"score"`
|
|
}
|