modules

package
v0.0.0-...-14bd698 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ModuleRegistry = make(map[string]Module)

Functions

func InsertInto

func InsertInto(s string, interval int, sep rune) string

func ParseModuleConfigFile

func ParseModuleConfigFile(file string) map[string]ModuleConfig

func ParseModuleOptions

func ParseModuleOptions(options []string) map[string]ModuleConfig

func RegisterModule

func RegisterModule(module Module)

Types

type BaseModule

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

func NewBaseModule

func NewBaseModule(name, description string) *BaseModule

func (*BaseModule) Channel

func (module *BaseModule) Channel() chan wayback.Snapshot

func (*BaseModule) Description

func (module *BaseModule) Description() string

func (*BaseModule) Name

func (module *BaseModule) Name() string

type Favicon

type Favicon struct {
	*BaseModule
}

func (*Favicon) Process

func (module *Favicon) Process(snapshotChannel <-chan wayback.Snapshot, outputChannel chan<- ModuleOutput, wg *sync.WaitGroup, config ModuleConfig)

type Full

type Full struct {
	*BaseModule
}

func (*Full) Process

func (module *Full) Process(snapshotChannel <-chan wayback.Snapshot, outputChannel chan<- ModuleOutput, wg *sync.WaitGroup, config ModuleConfig)

type HTML

type HTML struct {
	*BaseModule
}

func (*HTML) Process

func (module *HTML) Process(snapshotChannel <-chan wayback.Snapshot, outputChannel chan<- ModuleOutput, wg *sync.WaitGroup, config ModuleConfig)

type JSLuice

type JSLuice struct {
	*BaseModule
}

func (*JSLuice) Process

func (module *JSLuice) Process(snapshotChannel <-chan wayback.Snapshot, outputChannel chan<- ModuleOutput, wg *sync.WaitGroup, config ModuleConfig)

type Module

type Module interface {
	Name() string
	Description() string
	Process(snapshotChannel <-chan wayback.Snapshot, outputChannel chan<- ModuleOutput, wg *sync.WaitGroup, config ModuleConfig)
	Channel() chan wayback.Snapshot
}

type ModuleConfig

type ModuleConfig map[string]interface{}

type ModuleOutput

type ModuleOutput struct {
	Module      string      `json:"module,omitempty"`
	URL         string      `json:"url,omitempty"`
	SnapshotURL string      `json:"snapshot,omitempty"`
	Results     interface{} `json:"results,omitempty"`
}

type Regex

type Regex struct {
	*BaseModule
}

func (*Regex) Process

func (module *Regex) Process(snapshotChannel <-chan wayback.Snapshot, outputChannel chan<- ModuleOutput, wg *sync.WaitGroup, config ModuleConfig)

type XML

type XML struct {
	*BaseModule
}

func (*XML) Process

func (module *XML) Process(snapshotChannel <-chan wayback.Snapshot, outputChannel chan<- ModuleOutput, wg *sync.WaitGroup, config ModuleConfig)

Jump to

Keyboard shortcuts

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