Documentation ¶
Index ¶
- Constants
- func ExecFilters(data interface{}, refs map[string]interface{}, functions []string) string
- func GetInt(data interface{}) int64
- func GetRef(ref map[string]interface{}, value string) string
- func GetText(data interface{}) string
- func Md5(data string) string
- func New(engine ParserEngine, options map[string]interface{}) pipeline.Pipeline
- func Scope(data string, scope string) string
- func Url(data string, base string) string
- type DynamicParser
- type ExtractorPropSchema
- type ExtractorSchema
- type HTMLExtractor
- type HTMLParser
- type HTMLParserMethods
- type JSONExtractor
- type JSONParser
- type JSONParserMethods
- type Parser
- type ParserEngine
- type RefsSetter
- type ValuesSetter
Constants ¶
View Source
const ( MetaItemSchema string = "__PARSER_ITEM_SCHEMA__" MetaGlobalSchema string = "__PARSER_GLOBAL_SCHEMA__" )
View Source
const ( Separator = "::" BlockSelector = "block_selectors" PropsSelector = "props_selectors" RefsSetters = "refs_setters" ValuesSetters = "values_setters" RootSelector = "$root" )
Variables ¶
This section is empty.
Functions ¶
func ExecFilters ¶
Types ¶
type DynamicParser ¶
type DynamicParser struct {
// contains filtered or unexported fields
}
func (*DynamicParser) SetNext ¶
func (parser *DynamicParser) SetNext(next pipeline.Pipeline)
type ExtractorPropSchema ¶
func ParseSchema ¶
func ParseSchema(schema string) ExtractorPropSchema
type ExtractorSchema ¶
type HTMLExtractor ¶
type HTMLExtractor struct { Refs map[string]interface{} Schema ExtractorSchema // contains filtered or unexported fields }
type HTMLParser ¶
type HTMLParser struct { Options map[string]interface{} // contains filtered or unexported fields }
func (*HTMLParser) SetNext ¶
func (parser *HTMLParser) SetNext(next pipeline.Pipeline)
type HTMLParserMethods ¶
type HTMLParserMethods struct { }
func (*HTMLParserMethods) GetAttr ¶
func (methods *HTMLParserMethods) GetAttr(node *html.Node, key string) string
type JSONExtractor ¶
type JSONExtractor struct { Refs map[string]interface{} Schema ExtractorSchema // contains filtered or unexported fields }
func (*JSONExtractor) GetBlocks ¶
func (extractor *JSONExtractor) GetBlocks(node map[string]interface{}) []map[string]interface{}
func (*JSONExtractor) GetProps ¶
func (extractor *JSONExtractor) GetProps(node map[string]interface{}) map[string]interface{}
type JSONParser ¶
type JSONParser struct { Options map[string]interface{} // contains filtered or unexported fields }
func (*JSONParser) SetNext ¶
func (parser *JSONParser) SetNext(next pipeline.Pipeline)
type JSONParserMethods ¶
type JSONParserMethods struct { }
func (*JSONParserMethods) GetInt ¶
func (methods *JSONParserMethods) GetInt(node interface{}) int64
func (*JSONParserMethods) GetRaw ¶
func (methods *JSONParserMethods) GetRaw(node interface{}) interface{}
func (*JSONParserMethods) GetText ¶
func (methods *JSONParserMethods) GetText(node interface{}) string
type ParserEngine ¶
type ParserEngine string
const ( EngineHTML ParserEngine = "html" EngineJSON ParserEngine = "json" EngineDynamic ParserEngine = "dynamic" )
type RefsSetter ¶
type RefsSetter struct {
Refs map[string]interface{}
}
func (*RefsSetter) Set ¶
func (setter *RefsSetter) Set(item map[string]interface{}, schema map[string]interface{})
type ValuesSetter ¶
type ValuesSetter struct { }
func (*ValuesSetter) Set ¶
func (setter *ValuesSetter) Set(item map[string]interface{}, schema map[string]interface{})
Click to show internal directories.
Click to hide internal directories.