parser

package
v0.0.0-...-c1fd308 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrStrategyNotImplemented = errors.New("strategy has not been implemented yet")

Functions

This section is empty.

Types

type CourseraStrategy

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

func NewCourseraStrategy

func NewCourseraStrategy(log *logger.Logger, options *options) *CourseraStrategy

func (*CourseraStrategy) Name

func (s *CourseraStrategy) Name() string

func (*CourseraStrategy) Run

func (s *CourseraStrategy) Run(configRow project.ConfigRow) error

type Option

type Option func(options *options)

func Async

func Async(b bool) Option

Async option enable async pipeline in the parser useless load default is false

func CacheDir

func CacheDir(dir string) Option

Set the folder path to enable the sites parsed cache to prevent useless load default is ./.cache supported by the coursera strategies

func Storage

func Storage(storage storage.Storager) Option

enable storage

type Parser

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

func NewParser

func NewParser(log *logger.Logger, c project.Configurations) *Parser

func (*Parser) Run

func (p *Parser) Run(opts ...Option) error

type Strategy

type Strategy interface {
	Name() string
	Run(project.ConfigRow) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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