core

package
v0.0.0-...-c0d81ed Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyTypeSystem = iota
	KeyTypeCache
	KeyTypeExpression
	KeyTypeProto
)

Variables

View Source
var DEBUG = false
View Source
var Empty = struct{}{}
View Source
var ErrAbsoluteMultiAddress = errors.New("absolute mode used multi address")
View Source
var ErrEmptyRule = errors.New("empty rule")
View Source
var NilLogger log.Logger = (*dummyLog)(nil)
View Source
var PrintLogger log.Logger = (*printLog)(nil)

Functions

func InitGlobalLogger

func InitGlobalLogger(debug bool)

func MD5

func MD5(value []byte) string

func URL

func URL(prefix string, uris ...string) string

func URLAddValues

func URLAddValues(urlpath string, v url.Values) string

Types

type IGrab

type IGrab interface {
	MainPage() string
	LoadActions(...rule.Action) error
	Cache() cache.Querier
	InputType() rule.InputType
	InputKey() string
	Put(key string, value *Value)
	Get(key string) *Value
	Run(input string) error
	Value() gomap.Map
}

IGrab ...

type IScrape

type IScrape interface {
	Cache() cache.Querier
	LoadRules(r ...*rule.Rule) ([]IGrab, error)
}

IScrape ...

type KeyType

type KeyType int

type Value

type Value struct {
	Type rule.ProcessValue
	// contains filtered or unexported fields
}

func NewArrayValue

func NewArrayValue(value []interface{}) *Value

func NewFileValue

func NewFileValue(value []byte, fn func(key string, value []byte)) *Value

func NewMapValue

func NewMapValue(value interface{}) *Value

func NewStringValue

func NewStringValue(value interface{}) *Value

func ProcessValue

func ProcessValue(selection *goquery.Selection, p rule.Process) *Value

func (Value) GetArray

func (v Value) GetArray() []string

func (Value) GetFileHash

func (v Value) GetFileHash() string

func (Value) GetMap

func (v Value) GetMap() gomap.Map

func (Value) GetString

func (v Value) GetString() string

func (Value) String

func (v Value) String() string

Jump to

Keyboard shortcuts

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