Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNotFound ¶
func NotFoundError ¶
Types ¶
type Bookmark ¶
type Bookmark struct {
HatenaBookmarkId int `db:"hatena_bookmark_id"`
Timestamp HatenaBookmarkTime `json:"timestamp" db:"timestamp"`
User string `json:"user" db:"user"`
Tags Tags `json:"tags" db:"tags"`
Comment string `json:"comment" db:"comment"`
}
type Example ¶
type Example struct {
Id int `db:"id"`
Label LabelType `json:"Label" db:"label"`
Fv feature.FeatureVector
Url string `json:"Url" db:"url"`
FinalUrl string `json:"FinalUrl" db:"final_url"`
Title string `json:"Title" db:"title"`
Description string `json:"Description" db:"description"`
OgDescription string `json:"OgDescription" db:"og_description"`
OgType string `json:"OgType" db:"og_type"`
OgImage string `json:"OgImage" db:"og_image"`
Body string `json:"Body" db:"body"`
Score float64 `db:"score"`
IsNew bool `db:"is_new"`
StatusCode int `json:"StatusCode" db:"status_code"`
Favicon string `json:"Favicon" db:"favicon"`
ErrorCount int `json:"ErrorCount" db:"error_count"`
CreatedAt time.Time `json:"CreatedAt" db:"created_at"`
UpdatedAt time.Time `json:"UpdatedAt" db:"updated_at"`
ReferringTweets *ReferringTweets `json:"ReferringTweets"`
HatenaBookmark *HatenaBookmark `json:"HatenaBookmark"`
}
func (*Example) GetFeatureVector ¶
func (example *Example) GetFeatureVector() feature.FeatureVector
func (*Example) IsTwitterUrl ¶
type HatenaBookmark ¶
type HatenaBookmark struct {
Id int `db:"id"`
ExampleId int `db:"example_id"`
Title string `json:"title" db:"title"`
Bookmarks []*Bookmark `json:"bookmarks"`
Screenshot string `json:"screenshot" db:"screenshot"`
EntryUrl string `json:"entry_url" db:"entry_url"`
Count int `json:"count" db:"count"`
Url string `json:"url" db:"url"`
EId string `json:"eid" db:"eid"`
}
func (*HatenaBookmark) MarshalBinary ¶
func (bookmarks *HatenaBookmark) MarshalBinary() ([]byte, error)
func (*HatenaBookmark) UnmarshalBinary ¶
func (bookmarks *HatenaBookmark) UnmarshalBinary(data []byte) error
type HatenaBookmarkTime ¶
func (HatenaBookmarkTime) MarshalJSON ¶
func (hbt HatenaBookmarkTime) MarshalJSON() ([]byte, error)
func (*HatenaBookmarkTime) Scan ¶
func (hbt *HatenaBookmarkTime) Scan(value interface{}) error
ref: https://qiita.com/roothybrid7/items/52623bedb45ff0c26a8a
func (*HatenaBookmarkTime) UnmarshalJSON ¶
func (hbt *HatenaBookmarkTime) UnmarshalJSON(data []byte) error
type LabelType ¶
type LabelType int
func (*LabelType) MarshalBinary ¶
func (*LabelType) UnmarshalBinary ¶
type Recommendation ¶
type Recommendation struct {
RecommendationListType RecommendationListType
ExampleIds []int
}
type RecommendationListType ¶
type RecommendationListType int
const ( GENERAL RecommendationListType = 0 ARTICLE RecommendationListType = 1 GITHUB RecommendationListType = 2 SLIDE RecommendationListType = 3 ARXIV RecommendationListType = 4 VIDEO RecommendationListType = 5 EVENT RecommendationListType = 6 )
func GetRecommendationListType ¶
func GetRecommendationListType(listname string) (RecommendationListType, error)
type ReferringTweets ¶
type RelatedExamples ¶ added in v0.3.0
type Tweet ¶
type Tweet struct {
Id int `db:"id"`
ExampleId int `db:"example_id"`
CreatedAt time.Time `json:"CreatedAt" db:"created_at"`
IdStr string `json:"IdStr" db:"id_str"`
FullText string `json:"FullText" db:"full_text"`
FavoriteCount int `json:"FavoriteCount" db:"favorite_count"`
RetweetCount int `json:"RetweetCount" db:"retweet_count"`
Lang string `json:"Lang" db:"lang"`
ScreenName string `json:"ScreenName" db:"screen_name"`
Name string `json:"Name" db:"name"`
ProfileImageUrl string `json:"ProfileImageUrl" db:"profile_image_url"`
Label LabelType `json:"Label" db:"label"`
Score float64 `json:"Score" db:"score"`
}
Click to show internal directories.
Click to hide internal directories.