bolt

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCoverEmpty     = errors.New("cover is empty")
	ErrThumbnailEmpty = errors.New("thumbnail is empty")
)
View Source
var (
	ErrNotEnoughAdmins  = errors.New("not enough admins in the db")
	ErrProgressNotExist = errors.New("progress does not exist")
)

Functions

This section is empty.

Types

type DB

type DB struct {
	*bolt.DB
	// contains filtered or unexported fields
}

func Startup

func Startup(path string) (*DB, error)

func (*DB) AddDownload

func (db *DB) AddDownload(dl *api.Download) error

func (*DB) AdminCount

func (db *DB) AdminCount() int

func (*DB) ChangePassword

func (db *DB) ChangePassword(uid, password string) error

func (*DB) ChangeProgress

func (db *DB) ChangeProgress(uid string, p *users.CatalogProgress) error

func (*DB) ChangeUserType

func (db *DB) ChangeUserType(uid string, uType users.Type) error

func (*DB) ChangeUsername

func (db *DB) ChangeUsername(uid, name string) error

func (*DB) ClearFinishedDownloads

func (db *DB) ClearFinishedDownloads() error

func (*DB) CreateUser

func (db *DB) CreateUser(u *users.User) error

func (*DB) DeleteEntryCover

func (db *DB) DeleteEntryCover(sid, eid string) error

func (*DB) DeleteMissingItems

func (db *DB) DeleteMissingItems() error

func (*DB) DeleteSeriesCover

func (db *DB) DeleteSeriesCover(seriesHash string) error

func (*DB) DeleteUser

func (db *DB) DeleteUser(uid string) error

func (*DB) GenerateEntryThumbnail

func (db *DB) GenerateEntryThumbnail(sid, eid string, forceNew bool) error

func (*DB) GenerateSeriesThumbnail

func (db *DB) GenerateSeriesThumbnail(sid string, forceNew bool) error

func (*DB) GenerateThumbnails

func (db *DB) GenerateThumbnails(forceNew bool) error

func (*DB) GetCatalog

func (db *DB) GetCatalog() api.Catalog

func (*DB) GetCatalogModTime

func (db *DB) GetCatalogModTime() (time.Time, error)

func (*DB) GetDownloads

func (db *DB) GetDownloads() []*api.Download

func (*DB) GetEntries

func (db *DB) GetEntries(sid string) (api.Entries, error)

func (*DB) GetEntry

func (db *DB) GetEntry(sid, eid string) (*api.Entry, error)

func (*DB) GetEntryArchive

func (db *DB) GetEntryArchive(sid, eid string) (*manga.Archive, error)

func (*DB) GetEntryCover

func (db *DB) GetEntryCover(sid, eid string) (*manga.Cover, error)

func (*DB) GetEntryCoverFile

func (db *DB) GetEntryCoverFile(sid, eid string) ([]byte, string, error)

func (*DB) GetEntryModTime

func (db *DB) GetEntryModTime(sid, eid string) (time.Time, error)

func (*DB) GetEntryOrder

func (db *DB) GetEntryOrder(sid, eid string) (int, error)

func (*DB) GetEntryPage

func (db *DB) GetEntryPage(sid, eid string, num int) (*manga.Page, error)

func (*DB) GetEntryThumbnail

func (db *DB) GetEntryThumbnail(sid, eid string) ([]byte, string, error)

func (*DB) GetFailedDownloads

func (db *DB) GetFailedDownloads() []*api.Download

func (*DB) GetMissingItems

func (db *DB) GetMissingItems() api.MissingItems

func (*DB) GetSeries

func (db *DB) GetSeries(sid string) (*api.Series, error)

func (*DB) GetSeriesCover

func (db *DB) GetSeriesCover(sid string) (*manga.Cover, error)

func (*DB) GetSeriesCoverFile

func (db *DB) GetSeriesCoverFile(sid string) ([]byte, string, error)

func (*DB) GetSeriesFolderTitle

func (db *DB) GetSeriesFolderTitle(sid string) (string, error)

func (*DB) GetSeriesModTime

func (db *DB) GetSeriesModTime(sid string) (time.Time, error)

func (*DB) GetSeriesTags

func (db *DB) GetSeriesTags(sid string) (*sets.Set, error)

func (*DB) GetSeriesThumbnail

func (db *DB) GetSeriesThumbnail(sid string) ([]byte, string, error)

func (*DB) GetSeriesWithTag

func (db *DB) GetSeriesWithTag(tag string) api.Catalog

func (*DB) GetTags

func (db *DB) GetTags() *sets.Set

func (*DB) GetUser

func (db *DB) GetUser(uid string) (*users.User, error)

func (*DB) GetUserProgress

func (db *DB) GetUserProgress(uid string) (*users.CatalogProgress, error)

func (*DB) GetUsers

func (db *DB) GetUsers(safe bool) []users.User

func (*DB) HasEntry

func (db *DB) HasEntry(sid, eid string) bool

func (*DB) HasSeries

func (db *DB) HasSeries(sid string) bool

func (*DB) HasUser

func (db *DB) HasUser(uid string) bool

func (*DB) HasUsers

func (db *DB) HasUsers() bool

func (*DB) IsAdmin

func (db *DB) IsAdmin(uid string) (bool, error)

func (*DB) PopulateCatalog

func (db *DB) PopulateCatalog(series []*manga.ParsedSeries) error

func (*DB) SaveUser

func (db *DB) SaveUser(u *users.User, overwrite bool) error

func (*DB) SetEntryCover

func (db *DB) SetEntryCover(sid, eid string, cover *manga.Cover) error

func (*DB) SetEntryMetadata

func (db *DB) SetEntryMetadata(sid, eid string, m *manga.EntryMetadata) error

func (*DB) SetSeriesCover

func (db *DB) SetSeriesCover(sid string, cover *manga.Cover) error

func (*DB) SetSeriesMetadata

func (db *DB) SetSeriesMetadata(sid string, m *manga.SeriesMetadata) error

func (*DB) SetSeriesTags

func (db *DB) SetSeriesTags(sid string, tags []string) error

func (*DB) String

func (db *DB) String() string

func (*DB) ValidateLogin

func (db *DB) ValidateLogin(name, pass string) bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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