providers

package
v0.0.0-...-cd4b4ca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchDocument

func FetchDocument(url string) (document *goquery.Document, err error)

General function to query a document from a given URL

Types

type MangaKakalot

type MangaKakalot struct{}

func (MangaKakalot) DownloadChapter

func (mangakakalot MangaKakalot) DownloadChapter(chapter models.Chapter)

func (MangaKakalot) DownloadManga

func (mangakakalot MangaKakalot) DownloadManga(manga *models.Manga) error

Download chapters of a manga according to the download mode

func (MangaKakalot) GetManga

func (m MangaKakalot) GetManga(url string, dlmode string) (models.Manga, error)

Get a manga from a provided URL

func (MangaKakalot) Search

func (m MangaKakalot) Search(name string, page uint64) (SearchResult, error)

type Provider

type Provider interface {
	Search(name string, page uint64) (SearchResult, error)
	DownloadManga(manga *models.Manga) error
	DownloadChapter(chapter models.Chapter)
	GetManga(url string, dlmode string) (models.Manga, error)
}

func FindProvider

func FindProvider(provider string) (Provider, error)

func FindProviderFromUrl

func FindProviderFromUrl(url string) (Provider, error)

Return a supported provider from a given URL. This could possibly be done better but this was the first solution I came up with

type SearchResult

type SearchResult struct {
	Manga       []models.Manga
	TotalPages  uint64
	CurrentPage uint64
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL