Documentation
¶
Index ¶
Constants ¶
View Source
const MaxNodeSize = 464
MaxNodeSize is the maximum size of a binary tree node, which is request chunk size.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a hitomi client
func (*Client) FileRequest ¶
FileRequest returns *http.Request for file useful when displaying download progress.
func (*Client) FileURL ¶
FileURL returns calculated url for file returned file url is not permanent, usually it lasts 30~ minutes after gg.js updated
func (*Client) UpdateScript ¶
UpdateScript updates script from https://ltn.hitomi.la/gg.js This is required to calculate file url.
type Gallery ¶
type Gallery struct { Language string Id string Blocked bool Related []string LanguageUrl string LanguageLocalName string Title string Date string Type string GalleryUrl string JapaneseTitle *string Languages []struct { LocalName string GalleryId string Name string Url string } Tags []struct { Tag string Url string } Artists []struct { Artist string Url string } Files []struct { HasJXL bool HasAVIF bool HasWEBP bool Width int Height int Name string Hash string Single bool } Characters []struct { Character string Url string } Parodies []struct { Parody string Url string } Groups []struct { Group string Url string } }
Gallery represents gallery information.
type Options ¶
type Options struct { Client *http.Client Logger zerolog.Logger // UpdateScriptInterval is an option to update the script every interval. // if it is set to -1, it will never update the script. UpdateScriptInterval time.Duration // CacheWholeIndex is an option to download the whole index and cache it. // it can be extremely slow the first time (especially for gallery index) and consume much memory space, // but it will be a lot faster when you search. CacheWholeIndex bool }
func DefaultOptions ¶
func DefaultOptions() *Options
func (*Options) WithCacheWholeIndex ¶ added in v0.0.3
type Search ¶ added in v0.0.2
type Search struct {
// contains filtered or unexported fields
}
Search is a hitomi search client.
func (*Search) IndexVersion ¶ added in v0.0.2
IndexVersion returns the version of the index.
Click to show internal directories.
Click to hide internal directories.