engine

package
v0.0.0-...-2aa5ee2 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2016 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSiteMapNotBelongHomeURL = errors.New("sitemap is not belong HomeURL" +
		"(HomeURL Host is not equal sitemap.Domain)")
	ErrIndexURLNotExist    = errors.New("indexURL is not exist in home page")
	ErrVaildHomeURLDomain  = errors.New("valid homeURL domain is rc Domain")
	ErrNotFoundName        = errors.New("cannot found book name by rc")
	ErrNotFoundAuthor      = errors.New("cannot found book author by rc")
	ErrNotFoundIndexURL    = errors.New("connot found book index page url by rc")
	ErrNotFoundChapterURLs = errors.New("connot found book chapter urls by rc")
)

Functions

func NewGoqueryDocument

func NewGoqueryDocument(ctx context.Context, httpool *httpool.Httpool, url string) (doc *goquery.Document, err error)

func RevertRawContent

func RevertRawContent(raw string) []string

Types

type Engine

type Engine struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, log *logrus.Logger, name string, src []byte) *Engine

func (*Engine) Err

func (e *Engine) Err() error

func (*Engine) Exec

func (e *Engine) Exec(httpool *httpool.Httpool, homeURL string) (*book.Book, error)

func (*Engine) Get

func (e *Engine) Get(k string) (string, bool)

func (*Engine) ResetReturns

func (e *Engine) ResetReturns()

func (*Engine) Return

func (e *Engine) Return(v string)

func (*Engine) Returns

func (e *Engine) Returns() []string

func (*Engine) Set

func (e *Engine) Set(k, v string)

Jump to

Keyboard shortcuts

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