api

package
v0.16.3 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2022 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDownloadCancelled = errors.New("download cancelled")

Functions

This section is empty.

Types

type Catalog

type Catalog []*Series

func UnmarshalCatalog

func UnmarshalCatalog(data []byte) Catalog

type Download

type Download struct {
	Manga   string            `json:"manga"`
	Chapter *mangadex.Chapter `json:"chapter"`

	Status      DownloadStatus `json:"status"`
	CurrentPage int            `json:"current_page"`
	TotalPages  int            `json:"total_pages"`

	StartTime time.Time `json:"-"`
	TimeTaken string    `json:"time_taken"`
}

func NewDownload

func NewDownload(manga string, ch *mangadex.Chapter) *Download

func UnmarshalDownload

func UnmarshalDownload(data []byte) *Download

func (*Download) Filepath

func (d *Download) Filepath() string

func (*Download) Finish

func (d *Download) Finish()

func (*Download) FinishCancelled

func (d *Download) FinishCancelled()

func (*Download) FinishExists

func (d *Download) FinishExists()

func (*Download) FinishFailed

func (d *Download) FinishFailed()

func (*Download) IsFinished

func (d *Download) IsFinished() bool

func (*Download) Key

func (d *Download) Key() string

func (*Download) Start

func (d *Download) Start()

func (*Download) Time

func (d *Download) Time()

type DownloadStatus

type DownloadStatus string
const (
	DownloadQueued    DownloadStatus = "Queued"
	DownloadStarted   DownloadStatus = "Started"
	DownloadFinished  DownloadStatus = "Finished"
	DownloadCancelled DownloadStatus = "Cancelled"
	DownloadExists    DownloadStatus = "Already Downloaded"
	DownloadFailed    DownloadStatus = "Failed"
)

func (DownloadStatus) Finished

func (ds DownloadStatus) Finished() bool

type Entries

type Entries []*Entry

func UnmarshalEntries

func UnmarshalEntries(data []byte) Entries

type Entry

type Entry struct {
	Order        int        `json:"order"`
	Hash         string     `json:"hash"`
	Title        string     `json:"title"`
	Pages        int        `json:"pages"`
	Path         string     `json:"path"`
	Chapter      int        `json:"chapter"`
	Volume       int        `json:"volume"`
	Author       string     `json:"author"`
	DateReleased *date.Date `json:"date_released"`
}

type MissingItem

type MissingItem struct {
	Type  string `json:"type"`
	Title string `json:"title"`
	Path  string `json:"path"`
}

type MissingItems

type MissingItems []*MissingItem

type Series

type Series struct {
	Order        int        `json:"order"`
	Hash         string     `json:"hash"`
	Title        string     `json:"title"`
	Entries      int        `json:"entries"`
	TotalPages   int        `json:"total_pages"`
	Tags         []string   `json:"tags"`
	Author       string     `json:"author"`
	DateReleased *date.Date `json:"date_released"`
}

Jump to

Keyboard shortcuts

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