storage

package
v0.0.0-...-b34fe98 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileStorage

type FileStorage struct {
	BasePath string
}

func (*FileStorage) GetBook

func (f *FileStorage) GetBook(book *models.Book) error

func (*FileStorage) GetBookDir

func (f *FileStorage) GetBookDir(book *models.Book) (string, error)

func (*FileStorage) GetBookInfoFile

func (f *FileStorage) GetBookInfoFile(book *models.Book) (string, error)

func (*FileStorage) GetChapter

func (f *FileStorage) GetChapter(book *models.Book, chapter *models.Chapter) error

func (*FileStorage) GetChapterFile

func (f *FileStorage) GetChapterFile(book *models.Book, chapter *models.Chapter) string

func (*FileStorage) SaveBook

func (f *FileStorage) SaveBook(book *models.Book) error

func (*FileStorage) SaveChapter

func (f *FileStorage) SaveChapter(book *models.Book, chapter *models.Chapter) error

type MobiStorage

type MobiStorage struct {
	M        mobi.Builder
	BasePath string
}

func (*MobiStorage) GetBookFile

func (m *MobiStorage) GetBookFile(book *models.Book) (string, error)

func (*MobiStorage) SaveBook

func (m *MobiStorage) SaveBook(book *models.Book) error

func (*MobiStorage) SaveChapter

func (m *MobiStorage) SaveChapter(book *models.Book, chapter *models.Chapter) error

type Storage

type Storage interface {
	SaveBook(book *models.Book) error
	SaveChapter(book *models.Book, chapter *models.Chapter) error
}

Jump to

Keyboard shortcuts

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