Documentation
¶
Index ¶
- Constants
- Variables
- func FindEntries[T model.IEntry](ctx context.Context, source SourceDefinition) ([]T, error)
- func FindEntriesJSON[T model.IEntry](ctx context.Context, source SourceDefinition) ([]T, error)
- func FindEntriesXHTML[T model.IEntry](ctx context.Context, source SourceDefinition) ([]T, error)
- type AttributesFinder
- type Element
- type PathFinder
- type PathFinderCategory
- type PathParserStrategy
- type SourceDefinition
Constants ¶
View Source
const ( XML = "XML" HTML = "HTML" )
Variables ¶
View Source
var ErrCategoryNotAllowed = errors.New("category not allowed")
View Source
var ErrFailToCrateRequest = errors.New("fail to create request")
Functions ¶
func FindEntries ¶
func FindEntriesJSON ¶
func FindEntriesXHTML ¶
Types ¶
type AttributesFinder ¶
type AttributesFinder struct { EntrySelector string `yaml:"entry_selector"` Category PathFinderCategory `yaml:"category"` Link PathFinder `yaml:"link"` Title PathFinder `yaml:"title"` Image PathFinder `yaml:"image"` }
type PathFinder ¶
type PathFinder struct { Path string `yaml:"path"` Attribute string `yaml:"attribute"` ParseStrategy PathParserStrategy `yaml:"parse_strategy"` }
type PathFinderCategory ¶
type PathFinderCategory struct { PathFinder `yaml:"path_finder"` Alloweds []string `yaml:"allows"` }
type PathParserStrategy ¶
type PathParserStrategy = string
const ( ParserStrategyNone PathParserStrategy = "" ParserStrategyStyle PathParserStrategy = "style" )
type SourceDefinition ¶
Click to show internal directories.
Click to hide internal directories.