manga

package
v0.17.3 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2022 License: BSD-3-Clause Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FolderID

func FolderID(dir string) (string, error)

func ParseSeries

func ParseSeries(ctx context.Context, dir string) (Series, []Entry, error)

Types

type Archive

type Archive struct {
	Title string       `json:"title"` // Filename without the extension
	Path  string       `json:"path"`  // Filepath on the file system
	Type  archive.Type `json:"type"`  // File format i.e. ZIP/RAR
}

func (*Archive) Exists

func (a *Archive) Exists() bool

func (*Archive) FilenameWithExt

func (a *Archive) FilenameWithExt() string

func (*Archive) Filesize

func (a *Archive) Filesize() float64

func (*Archive) ReaderForFile

func (a *Archive) ReaderForFile(fp string) (io.Reader, int64, error)

func (*Archive) Scan

func (a *Archive) Scan(src interface{}) error

func (Archive) Value

func (a Archive) Value() (driver.Value, error)

func (*Archive) Walk

func (a *Archive) Walk(ctx context.Context, fh archiver.FileHandler) error

type Entry

type Entry struct {
	SID          string            `json:"sid" db:"sid"`
	EID          string            `json:"eid" db:"eid"`
	FileTitle    string            `json:"title" db:"title"`
	Archive      Archive           `json:"archive" db:"archive"`
	Pages        Pages             `json:"pages" db:"pages"`
	ModTime      dbutil.Time       `json:"mod_time" db:"mod_time"`
	DisplayTitle dbutil.NullString `json:"display_title" db:"display_title"`
}

Entry represents an entry which you read, i.e. an archive file

func ParseEntry

func ParseEntry(ctx context.Context, fp string) (Entry, error)

func (Entry) Title

func (e Entry) Title() string

type Page

type Page struct {
	Path string     `json:"path"`
	Type image.Type `json:"type"`
}

type Pages

type Pages []Page

func (*Pages) Scan

func (p *Pages) Scan(src interface{}) error

func (Pages) Total

func (p Pages) Total() int

func (Pages) Value

func (p Pages) Value() (driver.Value, error)

type Series

type Series struct {
	SID         string      `json:"sid" db:"sid"`
	FolderTitle string      `json:"folder_title" db:"folder_title"`
	NumEntries  int         `json:"num_entries" db:"num_entries"`
	NumPages    int         `json:"num_pages" db:"num_pages"`
	ModTime     dbutil.Time `json:"mod_time" db:"mod_time"`

	// Below are fields which aren't picked up by
	// the scan and shouldn't overwrite current
	// values that could exist
	Tags         *Tags             `json:"tags" db:"tags"`
	DisplayTitle dbutil.NullString `json:"display_title" db:"display_title"`
}

func (Series) Title

func (s Series) Title() string

type Subscription

type Subscription struct {
	SID                 string            `json:"sid" db:"sid"`
	Title               string            `json:"title" db:"title"`
	MdexUUID            dbutil.NullString `json:"mangadex_uuid" db:"mangadex_uuid"`
	MdexLastPublishedAt dbutil.Time       `json:"mangadex_last_published_at" db:"mangadex_last_published_at"`
}

type Tags

type Tags struct {
	// contains filtered or unexported fields
}

func NewTags

func NewTags() *Tags

func (*Tags) Add

func (t *Tags) Add(values ...string)

func (*Tags) Combine

func (t *Tags) Combine(tags *Tags)

func (*Tags) Empty

func (t *Tags) Empty() bool

func (*Tags) Has

func (t *Tags) Has(value string) bool

func (Tags) List

func (t Tags) List() []string

func (Tags) MarshalJSON

func (t Tags) MarshalJSON() ([]byte, error)

func (*Tags) Scan

func (t *Tags) Scan(src interface{}) error

func (*Tags) UnmarshalJSON

func (t *Tags) UnmarshalJSON(b []byte) error

func (Tags) Value

func (t Tags) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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