mock

package
v0.0.0-...-725ffc3 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2016 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Book

type Book struct {
}

Book represents a mock implementation of endive.GenericBook.

func (*Book) AddEpub

func (b *Book) AddEpub(path string, isRetail bool, hash string) (bool, error)

AddEpub implementation for tests

func (*Book) Check

func (b *Book) Check() (bool, bool, error)

Check implementation for tests

func (*Book) CleanFilename

func (b *Book) CleanFilename() string

CleanFilename implementation for tests

func (*Book) FullPath

func (b *Book) FullPath() string

FullPath implementation for tests

func (*Book) HasEpub

func (b *Book) HasEpub() bool

HasEpub implementation for tests

func (*Book) HasHash

func (b *Book) HasHash(a string) bool

HasHash implementation for tests

func (*Book) ID

func (b *Book) ID() int

ID implementation for tests

func (*Book) Refresh

func (b *Book) Refresh() ([]bool, []string, error)

Refresh implementation for tests

func (*Book) SetExported

func (b *Book) SetExported(bool)

SetExported implementation for tests

func (*Book) String

func (b *Book) String() string

ShortString implementation for tests

type Collection

type Collection struct {
}

Collection represents a mock implementation of endive.Collection.

func (*Collection) Add

func (c *Collection) Add(books ...endive.GenericBook)

Add implementation for tests

func (*Collection) Authors

func (c *Collection) Authors() map[string]int

Authors implementation for tests

func (*Collection) Books

func (c *Collection) Books() []endive.GenericBook

Books implementation for tests

func (*Collection) Diff

Diff implementation for tests

func (*Collection) Exported

func (c *Collection) Exported() endive.Collection

Exported implementation for tests

func (*Collection) FindByFullPath

func (c *Collection) FindByFullPath(string) (endive.GenericBook, error)

FindByFullPath implementation for tests

func (*Collection) FindByHash

func (c *Collection) FindByHash(string) (endive.GenericBook, error)

FindByHash implementation for tests

func (*Collection) FindByID

func (c *Collection) FindByID(id int) (endive.GenericBook, error)

FindByID implementation for tests

func (*Collection) FindByMetadata

func (c *Collection) FindByMetadata(a, b, d string) (endive.GenericBook, error)

FindByMetadata implementation for tests

func (*Collection) First

func (c *Collection) First(nb int) endive.Collection

First implementation for tests

func (*Collection) Incomplete

func (c *Collection) Incomplete() endive.Collection

Incomplete implementation for tests

func (*Collection) Last

func (c *Collection) Last(nb int) endive.Collection

Last implementation for tests

func (*Collection) NonRetailOnly

func (c *Collection) NonRetailOnly() endive.Collection

NonRetailOnly implementation for tests

func (*Collection) Progress

func (c *Collection) Progress(p string) endive.Collection

Progress implementation for tests

func (*Collection) Propagate

func (c *Collection) Propagate(u i.UserInterface, cfg endive.Config)

Propagate implementation for tests

func (*Collection) Publishers

func (c *Collection) Publishers() map[string]int

Publishers implementation for tests

func (*Collection) RemoveByID

func (c *Collection) RemoveByID(u int) error

RemoveByID implementation for tests

func (*Collection) Retail

func (c *Collection) Retail() endive.Collection

Retail implementation for tests

func (*Collection) Series

func (c *Collection) Series() map[string]int

Series implementation for tests

func (*Collection) Sort

func (c *Collection) Sort(sortBy string)

Sort implementation for tests

func (*Collection) Table

func (c *Collection) Table() string

Table implementation for tests

func (*Collection) Tags

func (c *Collection) Tags() map[string]int

Tags implementation for tests

func (*Collection) WithID

func (c *Collection) WithID() endive.Collection

WithID implementation for tests

type DB

type DB struct {
}

DB represents a mock implementation of endive.Database.

func (*DB) Backup

func (db *DB) Backup(path string) error

Backup for mock Database

func (*DB) Equals

func (db *DB) Equals(o DB) bool

Equals for mock Database

func (*DB) Load

func (db *DB) Load(Collection) error

Load for mock Database

func (*DB) Save

func (db *DB) Save(c Collection) (bool, error)

Save for mock Database

func (*DB) SetPath

func (db *DB) SetPath(path string)

SetPath for mock Database

type IndexService

type IndexService struct {
}

IndexService represents a mock implementation of endive.Indexer.

func (*IndexService) Check

func (s *IndexService) Check(all endive.Collection) error

Check for mock Indexer

func (*IndexService) Count

func (s *IndexService) Count() uint64

Count for mock Indexer

func (*IndexService) Query

func (s *IndexService) Query(query string) ([]string, error)

Query for mock Indexer

func (*IndexService) Rebuild

func (s *IndexService) Rebuild(all endive.Collection) error

Rebuild for mock Indexer

func (*IndexService) SetPath

func (s *IndexService) SetPath(path string)

SetPath for mock Indexer

func (*IndexService) Update

Update for mock Indexer

type UserInterface

type UserInterface struct {
	UpdateValuesResult string
}

UserInterface represents a mock implementation of endive.UserInterface.

func (*UserInterface) Accept

func (u *UserInterface) Accept(a string) bool

Accept for mock UserInterface

func (*UserInterface) Choice

func (u *UserInterface) Choice(a string, b ...interface{})

Choice for mock UserInterface

func (*UserInterface) CloseLog

func (u *UserInterface) CloseLog()

CloseLog for mock UserInterface

func (*UserInterface) Debug

func (u *UserInterface) Debug(a string)

Debug for mock UserInterface

func (*UserInterface) Debugf

func (u *UserInterface) Debugf(a string, b ...interface{})

Debugf for mock UserInterface

func (*UserInterface) Display

func (u *UserInterface) Display(a string)

Display for mock UserInterface

func (*UserInterface) Edit

func (u *UserInterface) Edit(a string) (string, error)

Edit for mock UserInterface

func (*UserInterface) Error

func (u *UserInterface) Error(a string)

Error for mock UserInterface

func (*UserInterface) Errorf

func (u *UserInterface) Errorf(a string, b ...interface{})

Errorf for mock UserInterface

func (*UserInterface) GetInput

func (u *UserInterface) GetInput() (string, error)

GetInput for mock UserInterface

func (*UserInterface) Info

func (u *UserInterface) Info(a string)

Info for mock UserInterface

func (*UserInterface) Infof

func (u *UserInterface) Infof(a string, b ...interface{})

Infof for mock UserInterface

func (*UserInterface) InitLogger

func (u *UserInterface) InitLogger(a string) error

InitLogger for mock UserInterface

func (*UserInterface) SelectOption

func (u *UserInterface) SelectOption(a, b string, c []string, isLong bool) (string, error)

SelectOption for mock UserInterface

func (*UserInterface) SubPart

func (u *UserInterface) SubPart(a string, b ...interface{})

SubPart for mock UserInterface

func (*UserInterface) SubTitle

func (u *UserInterface) SubTitle(a string, b ...interface{})

SubTitle for mock UserInterface

func (*UserInterface) Tag

func (u *UserInterface) Tag(a string, b bool) string

Tag for mock UserInterface

func (*UserInterface) Title

func (u *UserInterface) Title(a string, b ...interface{})

Title for mock UserInterface

func (*UserInterface) UpdateValue

func (u *UserInterface) UpdateValue(a, b, c string, isLong bool) (string, error)

UpdateValue for mock UserInterface

func (*UserInterface) Warning

func (u *UserInterface) Warning(a string)

Warning for mock UserInterface

func (*UserInterface) Warningf

func (u *UserInterface) Warningf(a string, b ...interface{})

Warningf for mock UserInterface

Jump to

Keyboard shortcuts

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