server

package
v0.0.0-...-9626b3f Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Data scraped from site: https://meusmangas.net/comienzo

Index

Constants

This section is empty.

Variables

View Source
var ErrDataNotCollected = errors.New("manga data data not collected")
View Source
var ErrFirstPageNotFound = errors.New("first page not found")
View Source
var ErrMangaNotFound = errors.New("manga not found")
View Source
var ErrPageNotFound = errors.New("manga page not found")
View Source
var ErrSiteWithoutContentData = errors.New("manga page without content")

Functions

This section is empty.

Types

type Host

type Host interface {
	// GetMangaDetail returns a manga hosted on mangaURL.
	GetMangaDetail(mangaURL string) (manga web.Manga, statusCode int)
	// GetMangaPages returns all chapter pages found on that site.
	GetMangaPages(mangaTitle, chapter string) (ch web.Chapter, err error)
	// FetchAllMangaByLetter returns all manga links hosted on site at specified letter.
	FetchAllMangaByLetter(letter string) (links []string)
	// GetManga returns a manga from the database.
	GetManga(mangaTitle string) (manga web.Manga, err error)
}

A Host is any site where it's possible scrape data from it.

func Client

func Client(server int) Host

Client returns the site representation where users will be able to request data

type Mangainn

type Mangainn struct{}

func (*Mangainn) FetchAllMangaByLetter

func (m *Mangainn) FetchAllMangaByLetter(letter string) (links []string)

func (*Mangainn) GetManga

func (m *Mangainn) GetManga(mangaTitle string) (manga web.Manga, err error)

func (*Mangainn) GetMangaDetail

func (m *Mangainn) GetMangaDetail(mangaURL string) (manga web.Manga, statusCode int)

func (*Mangainn) GetMangaPages

func (m *Mangainn) GetMangaPages(mangaTitle, chapter string) (ch web.Chapter, err error)

type MangasChan

type MangasChan struct{}

func (*MangasChan) FetchAllMangaByLetter

func (m *MangasChan) FetchAllMangaByLetter(letter string) (links []string)

func (*MangasChan) FetchAllMangaByPageNumber

func (m *MangasChan) FetchAllMangaByPageNumber(page int) (links []string)

func (*MangasChan) GetManga

func (m *MangasChan) GetManga(mangaTitle string) (manga web.Manga, err error)

func (*MangasChan) GetMangaDetail

func (m *MangasChan) GetMangaDetail(mangaURL string) (manga web.Manga, statusCode int)

func (*MangasChan) GetMangaPages

func (m *MangasChan) GetMangaPages(mangaTitle, chapter string) (ch web.Chapter, err error)

type MeusMangas

type MeusMangas struct{}

func (*MeusMangas) FetchAllMangaByLetter

func (m *MeusMangas) FetchAllMangaByLetter(letter string) (links []string)

func (*MeusMangas) GetManga

func (m *MeusMangas) GetManga(mangaTitle string) (manga web.Manga, err error)

func (*MeusMangas) GetMangaDetail

func (m *MeusMangas) GetMangaDetail(mangaURL string) (manga web.Manga, statusCode int)

func (*MeusMangas) GetMangaPages

func (m *MeusMangas) GetMangaPages(mangaTitle, chapter string) (ch web.Chapter, err error)

Jump to

Keyboard shortcuts

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