file

package
v0.0.0-...-abb1c5c Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Payload

type Payload struct {
	multipart.File
	Size      int64
	Filename  string
	MimeType  string
	Extension string
}

func NewPayload

func NewPayload(file multipart.File, fh *multipart.FileHeader, mimetype string) (*Payload, error)

type Service

type Service struct {
	Directory string
}

func NewService

func NewService(path string) (*Service, error)

func (*Service) UploadBook

func (s *Service) UploadBook(payload *Payload) (*dusk.Book, error)

Upload new format for new book

func (*Service) UploadBookCover

func (s *Service) UploadBookCover(payload *Payload, book *dusk.Book) error

Upload book cover for existing book

func (*Service) UploadBookCoverFromUrl

func (s *Service) UploadBookCoverFromUrl(url string, book *dusk.Book) error

Upload book cover from URL for existing book

func (*Service) UploadBookFormat

func (s *Service) UploadBookFormat(payload *Payload, book *dusk.Book) error

Upload new format for existing book

func (*Service) UploadEpub

func (s *Service) UploadEpub(payload *Payload, book *dusk.Book) error

Upload EPUB format for existing book

func (*Service) UploadFile

func (s *Service) UploadFile(file io.Reader, path string) error

Upload file to path

func (*Service) UploadNewEpub

func (s *Service) UploadNewEpub(payload *Payload) (*dusk.Book, error)

Upload EPUB format for new book

func (*Service) UploadOtherFormat

func (s *Service) UploadOtherFormat(payload *Payload, book *dusk.Book) error

Upload other format for existing book

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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