Documentation
¶
Index ¶
- Constants
- Variables
- func Log(msg string)
- type Chapter
- type Filter
- type Functions
- type Headless
- type Loader
- type Manga
- func (m *Manga) AnilistManga() (libmangal.AnilistManga, error)
- func (m *Manga) Info() libmangal.MangaInfo
- func (m *Manga) MarshalJSON() ([]byte, error)
- func (m *Manga) SeriesJSON() (libmangal.SeriesJSON, bool, error)
- func (m *Manga) SetAnilistManga(anilist libmangal.AnilistManga)
- func (m *Manga) String() string
- type Options
- type Page
- type Provider
- func (p *Provider) ChapterPages(ctx context.Context, chapter libmangal.Chapter) ([]libmangal.Page, error)
- func (p *Provider) Close() error
- func (p *Provider) GenericGetPageImage(ctx context.Context, page Page) ([]byte, error)
- func (p *Provider) GetPageImage(ctx context.Context, page libmangal.Page) ([]byte, error)
- func (p *Provider) Info() libmangal.ProviderInfo
- func (p *Provider) MangaVolumes(ctx context.Context, manga libmangal.Manga) ([]libmangal.Volume, error)
- func (p *Provider) SearchMangas(ctx context.Context, query string) ([]libmangal.Manga, error)
- func (p *Provider) SetLogger(_logger *libmangal.Logger)
- func (p *Provider) String() string
- func (p *Provider) VolumeChapters(ctx context.Context, volume libmangal.Volume) ([]libmangal.Chapter, error)
- type Volume
Constants ¶
View Source
const ( BundleID = "mango" UserAgent = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36" )
Variables ¶
View Source
var ImageExtensionRegex = regexp.MustCompile(`^\.[a-zA-Z0-9][a-zA-Z0-9.]*[a-zA-Z0-9]$`)
Functions ¶
func Log ¶ added in v0.5.3
func Log(msg string)
Log calls (*libmangal.Logger).Log(msg) when set, else it appends the message to the backlog. Once the logger is set, it logs all backlog on the next log.
It is the logger created by libmangal and used internally. Mangal also plugs into the logger (via (*libmangal.Client).Logger()) and uses it for info display.
Types ¶
type Chapter ¶ added in v0.5.0
type Chapter struct { Title string `json:"title"` ID string `json:"id"` URL string `json:"url"` Number float32 `json:"number"` Date libmangal.Date `json:"date"` ScanlationGroup string `json:"scanlation_group"` Volume_ *Volume `json:"-"` }
func (*Chapter) Info ¶ added in v0.5.0
func (c *Chapter) Info() libmangal.ChapterInfo
func (*Chapter) MarshalJSON ¶ added in v0.5.0
type Filter ¶ added in v0.5.0
type Functions ¶ added in v0.5.3
type Functions struct { SearchMangas func(context.Context, gokv.Store, string) ([]libmangal.Manga, error) MangaVolumes func(context.Context, gokv.Store, Manga) ([]libmangal.Volume, error) VolumeChapters func(context.Context, gokv.Store, Volume) ([]libmangal.Chapter, error) ChapterPages func(context.Context, gokv.Store, Chapter) ([]libmangal.Page, error) GetPageImage func(context.Context, Page) ([]byte, error) }
type Loader ¶ added in v0.5.3
type Loader struct { libmangal.ProviderInfo Options Options F func() Functions // So that the scrapers are loaded on ProviderLoader.Load(ctx) }
func (*Loader) Info ¶ added in v0.5.3
func (l *Loader) Info() libmangal.ProviderInfo
type Manga ¶ added in v0.5.0
type Manga struct { Title string `json:"title"` AnilistSearch string `json:"anilist_search"` URL string `json:"url"` ID string `json:"id"` Cover string `json:"cover"` Banner string `json:"banner"` AnilistSet_ bool `json:"-"` Anilist_ libmangal.AnilistManga `json:"-"` }
func (*Manga) AnilistManga ¶ added in v0.7.4
func (m *Manga) AnilistManga() (libmangal.AnilistManga, error)
func (*Manga) MarshalJSON ¶ added in v0.5.0
func (*Manga) SeriesJSON ¶ added in v0.7.4
func (m *Manga) SeriesJSON() (libmangal.SeriesJSON, bool, error)
func (*Manga) SetAnilistManga ¶ added in v0.7.4
func (m *Manga) SetAnilistManga(anilist libmangal.AnilistManga)
type Page ¶ added in v0.5.0
type Page struct { Extension string `json:"-"` URL string `json:"url"` Headers map[string]string `json:"-"` Cookies map[string]string `json:"-"` Chapter_ *Chapter `json:"-"` }
func (*Page) GetExtension ¶ added in v0.5.0
type Provider ¶ added in v0.5.0
type Provider struct { libmangal.ProviderInfo Options Options F Functions // contains filtered or unexported fields }
func (*Provider) ChapterPages ¶ added in v0.5.0
func (*Provider) GenericGetPageImage ¶ added in v0.5.0
func (*Provider) GetPageImage ¶ added in v0.5.0
func (*Provider) Info ¶ added in v0.5.0
func (p *Provider) Info() libmangal.ProviderInfo
func (*Provider) MangaVolumes ¶ added in v0.5.0
func (*Provider) SearchMangas ¶ added in v0.5.0
type Volume ¶ added in v0.5.0
func (*Volume) Info ¶ added in v0.5.0
func (v *Volume) Info() libmangal.VolumeInfo
func (*Volume) MarshalJSON ¶ added in v0.5.0
Source Files
¶
Click to show internal directories.
Click to hide internal directories.