task

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const BookPeopleURL = BookURL + "people/"
View Source
const BookURL = "https://book.douban.com/"
View Source
const DoubanURL = "https://www.douban.com/"
View Source
const MoviePeopleURL = MovieURL + "people/"
View Source
const MovieURL = "https://movie.douban.com/"
View Source
const MusicPeopleURL = MusicURL + "people/"
View Source
const MusicURL = "https://music.douban.com/"
View Source
const PeopleURL = DoubanURL + "people/"

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseInterface

type BaseInterface interface {
	// Checking flag combinations, validities, etc.
	Precheck() error

	// Execute the task.
	Execute() error
}

BaseInterface defines the interface of each type of task.

type Collector

type Collector struct {
	// contains filtered or unexported fields
}

Collector contains the information used by the collector.

func NewCollector

func NewCollector(userName *string, categories []string) *Collector

NewCollector returns a new collector task and initialise it.

func (*Collector) Execute

func (task *Collector) Execute() error

Execute starts the collection.

func (*Collector) Precheck

func (task *Collector) Precheck() error

Precheck validates the flags.

type Parser added in v0.4.1

type Parser struct {
	// contains filtered or unexported fields
}

Parser contains the information used by the parser.

func NewParser added in v0.4.1

func NewParser(categories []string) *Parser

NewParser returns a new parser task and initialise it.

func (*Parser) Execute added in v0.4.1

func (task *Parser) Execute() error

Execute starts parsing.

func (*Parser) Precheck added in v0.4.1

func (task *Parser) Precheck() error

Precheck validates the flags.

type Publisher added in v0.4.1

type Publisher struct {
	// contains filtered or unexported fields
}

Publisher contains the information used by the web publisher.

func NewPublisher added in v0.4.1

func NewPublisher(categories []string) *Publisher

NewPublisher returns a new parser task and initialise it.

func (*Publisher) Execute added in v0.4.1

func (task *Publisher) Execute() error

Execute starts publishing.

func (*Publisher) Precheck added in v0.4.1

func (task *Publisher) Precheck() error

Precheck validates the flags.

Jump to

Keyboard shortcuts

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