storage

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: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidCover = errors.New("cover is invalid")
View Source
var ErrInvalidProgressAmount = errors.New("progress amount is invalid (below zero or above total number of pages)")
View Source
var ErrItemNotExist = errors.New("item does not exist")
View Source
var ErrNotEnoughAdmins = errors.New("not enough admins in the db")
View Source
var ErrNotEnoughUsers = errors.New("not enough users in the db")
View Source
var ErrUserExist = errors.New("user already exists")
View Source
var ErrUserNotExist = errors.New("user does not exist")

Functions

This section is empty.

Types

type MissingItem

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

type Store

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

func MustCreateNewStore

func MustCreateNewStore(dbPath, libraryPath string, recreate bool) *Store

func NewStore

func NewStore(dbPath, libraryPath string, recreate bool) (*Store, error)

func (*Store) AddDownloads

func (s *Store) AddDownloads(dls ...*mangadex.Download) error

func (*Store) AddSeries

func (s *Store) AddSeries(series manga.Series, entries []manga.Entry) error

func (*Store) AddUser

func (s *Store) AddUser(u human.User, overwrite bool) error

func (*Store) ChangePassword

func (s *Store) ChangePassword(uid, password string) error

func (*Store) ChangeType

func (s *Store) ChangeType(uid string, t human.Type) error

func (*Store) ChangeUsername

func (s *Store) ChangeUsername(currentUID, newName string) error

func (*Store) Close

func (s *Store) Close() error

func (*Store) DeleteAllDownloads

func (s *Store) DeleteAllDownloads() error

func (*Store) DeleteEntryCustomCover

func (s *Store) DeleteEntryCustomCover(sid, eid string) error

func (*Store) DeleteMissingItems

func (s *Store) DeleteMissingItems() error

func (*Store) DeleteSeries

func (s *Store) DeleteSeries(sid string) error

func (*Store) DeleteSeriesCustomCover

func (s *Store) DeleteSeriesCustomCover(sid string) error

func (*Store) DeleteSubscription

func (s *Store) DeleteSubscription(sid string) error

func (*Store) DeleteSuccessfulDownloads

func (s *Store) DeleteSuccessfulDownloads() error

func (*Store) DeleteUser

func (s *Store) DeleteUser(uid string) error

func (*Store) Dump

func (s *Store) Dump() (string, error)

func (*Store) GenerateThumbnails

func (s *Store) GenerateThumbnails(overwrite bool) error

func (*Store) GetAllDownloads

func (s *Store) GetAllDownloads() ([]*mangadex.Download, error)

func (*Store) GetAllSubscriptions

func (s *Store) GetAllSubscriptions() ([]manga.Subscription, error)

func (*Store) GetAllTags

func (s *Store) GetAllTags() (*manga.Tags, error)

func (*Store) GetCatalog

func (s *Store) GetCatalog() ([]manga.Series, error)

func (*Store) GetCatalogProgress

func (s *Store) GetCatalogProgress(uid string) (human.CatalogProgress, error)

func (*Store) GetEntries

func (s *Store) GetEntries(sid string) ([]manga.Entry, error)

func (*Store) GetEntry

func (s *Store) GetEntry(sid, eid string) (manga.Entry, error)

func (*Store) GetEntryCover

func (s *Store) GetEntryCover(sid, eid string) ([]byte, image.Type, error)

func (*Store) GetEntryCoverType

func (s *Store) GetEntryCoverType(sid, eid string) (image.Type, error)

func (*Store) GetEntryProgress

func (s *Store) GetEntryProgress(sid, eid, uid string) (human.EntryProgress, error)

func (*Store) GetEntryThumbnail

func (s *Store) GetEntryThumbnail(sid, eid string) ([]byte, image.Type, error)

func (*Store) GetFailedDownloads

func (s *Store) GetFailedDownloads() ([]*mangadex.Download, error)

func (*Store) GetMissingItems

func (s *Store) GetMissingItems() ([]MissingItem, error)

func (*Store) GetPage

func (s *Store) GetPage(sid, eid string, page int, zeroBased bool) (io.Reader, int64, image.Type, error)

func (*Store) GetSeries

func (s *Store) GetSeries(sid string) (manga.Series, error)

func (*Store) GetSeriesCover

func (s *Store) GetSeriesCover(sid string) ([]byte, image.Type, error)

func (*Store) GetSeriesProgress

func (s *Store) GetSeriesProgress(sid, uid string) (human.SeriesProgress, error)

func (*Store) GetSeriesThumbnail

func (s *Store) GetSeriesThumbnail(sid string) ([]byte, image.Type, error)

func (*Store) GetSeriesWithTag

func (s *Store) GetSeriesWithTag(t string) ([]manga.Series, error)

func (*Store) GetSubscription

func (s *Store) GetSubscription(sid string) (manga.Subscription, error)

func (*Store) GetUser

func (s *Store) GetUser(uid string) (human.User, error)

func (*Store) GetUsers

func (s *Store) GetUsers() ([]human.User, error)

func (*Store) HasEntry

func (s *Store) HasEntry(sid, eid string) (bool, error)

func (*Store) HasSeries

func (s *Store) HasSeries(sid string) (bool, error)

func (*Store) HasUser

func (s *Store) HasUser(uid string) (bool, error)

func (*Store) HasUsers

func (s *Store) HasUsers() (bool, error)

func (*Store) IsAdmin

func (s *Store) IsAdmin(uid string) bool

func (*Store) PopulateCatalog

func (s *Store) PopulateCatalog() error

func (*Store) SetEntryCover

func (s *Store) SetEntryCover(sid, eid, name string, data []byte) error

func (*Store) SetEntryDisplayTitle

func (s *Store) SetEntryDisplayTitle(sid, eid string, title string) error

func (*Store) SetEntryProgressAmount

func (s *Store) SetEntryProgressAmount(sid, eid, uid string, num int) error

func (*Store) SetEntryProgressRead

func (s *Store) SetEntryProgressRead(sid, eid, uid string) error

func (*Store) SetEntryProgressUnread

func (s *Store) SetEntryProgressUnread(sid, eid, uid string) error

func (*Store) SetSeriesCover

func (s *Store) SetSeriesCover(sid, name string, data []byte) error

func (*Store) SetSeriesDisplayTitle

func (s *Store) SetSeriesDisplayTitle(sid string, title string) error

func (*Store) SetSeriesProgressRead

func (s *Store) SetSeriesProgressRead(sid, uid string) error

func (*Store) SetSeriesProgressUnread

func (s *Store) SetSeriesProgressUnread(sid, uid string) error

func (*Store) SetSeriesTags

func (s *Store) SetSeriesTags(sid string, tags *manga.Tags) error

func (*Store) SetSubscription

func (s *Store) SetSubscription(sid, title string, uuid dbutil.NullString, ensureNewest bool) error

func (*Store) SetSubscriptionWithTime

func (s *Store) SetSubscriptionWithTime(sid, title string, uuid dbutil.NullString, t dbutil.Time, ensureNewest bool) error

func (*Store) Vacuum

func (s *Store) Vacuum() error

func (*Store) ValidateLogin

func (s *Store) ValidateLogin(name, pass string) bool

Jump to

Keyboard shortcuts

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