Documentation
¶
Index ¶
- Variables
- func Bar(length int, description string) *progressbar.ProgressBar
- func GetExcludedFiles(files []index.FileMeta, included, excluded []*regexp.Regexp) map[string]struct{}
- func GetIncludedFiles(files []index.FileMeta, included []*regexp.Regexp) map[string]struct{}
- func PanicError(err error)
- type Config
- type CrawlerOS
- type CrawlerOSFile
- type MediaTypeConfig
- type PageData
- type ProcessConfig
- type RawConfig
- type RawFile
- type Server
- type ServerOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrDirNotFound = errors.New("directory not found") ErrDirStatFailed = errors.New("failed os.Stat") ErrDirWalkHandlerFailed = errors.New("failed filepath.Walk handler") ErrFileRelativePathNotFound = errors.New("file relative path not found") ErrDirWalkFailed = errors.New("failed filepath.Walk") )
Functions ¶
func Bar ¶
func Bar(length int, description string) *progressbar.ProgressBar
func GetExcludedFiles ¶ added in v1.1.0
func GetIncludedFiles ¶ added in v1.1.0
func PanicError ¶
func PanicError(err error)
Types ¶
type Config ¶ added in v1.1.0
type CrawlerOS ¶
type CrawlerOS struct {
// contains filtered or unexported fields
}
func NewCrawlerOS ¶
type CrawlerOSFile ¶
func (CrawlerOSFile) Path ¶
func (cosf CrawlerOSFile) Path() string
func (CrawlerOSFile) RelativePath ¶
func (cosf CrawlerOSFile) RelativePath() string
type MediaTypeConfig ¶ added in v1.1.0
func (MediaTypeConfig) Print ¶ added in v1.1.0
func (c MediaTypeConfig) Print(name string)
type ProcessConfig ¶ added in v1.1.0
type ProcessConfig struct {
Parallel int
Video MediaTypeConfig
VideoAccel preview.VideoProcessingAccelType
Timeout time.Duration
Image MediaTypeConfig
Includes []*regexp.Regexp
Excludes []*regexp.Regexp
MaxFileSize int64
}
func (ProcessConfig) Print ¶ added in v1.1.0
func (c ProcessConfig) Print()
type RawConfig ¶ added in v1.1.0
type RawConfig struct {
Dir string
Parallel int
Video bool
VideoProcessingAccel string
Images bool
MaxImages int64
MaxVideos int64
Includes string
Excludes string
MaxFileSize string
Streaming string
MediaTimeout string
IndexFileSave bool
Port int
}
func DefaultRawConfig ¶ added in v1.1.0
func DefaultRawConfig() RawConfig
type ServerOption ¶
type ServerOption func(*Server)
func WithDebug ¶
func WithDebug(debug bool) ServerOption
func WithDry ¶ added in v1.1.0
func WithDry() ServerOption
func WithPWD ¶ added in v1.1.0
func WithPWD(dir string) ServerOption
func WithPort ¶
func WithPort(port int) ServerOption
func WithSource ¶
func WithSource(source source) ServerOption
func WithStreaming ¶ added in v1.1.0
func WithStreaming(files map[string]struct{}) ServerOption
Click to show internal directories.
Click to hide internal directories.