resolvers

package
v0.0.0-...-fba4924 Latest Latest
Warning

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

Go to latest
Published: May 20, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetermineEncodingFromReader

func DetermineEncodingFromReader(
	r io.Reader,
) (e encoding.Encoding, name string, certain bool, err error)

DetermineEncodingFromReader based on the content

Types

type HTMLPageNode

type HTMLPageNode struct {
	Content string
	Attrs   []html.Attribute
}

HTMLPageNode represents a node in the HTML page

func ParseWebPageContent

func ParseWebPageContent(
	ctx context.Context,
	page *models.Page,
	bodyContent []byte,
) (contentArray []HTMLPageNode, err error)

ParseWebPageContent parses the web page content

type PageResolver

type PageResolver interface {
	Resolve(ctx context.Context) models.RunResult
}

PageResolver is a main interface for page content resolvers

func NewGetCachedPageResolver

func NewGetCachedPageResolver(page models.Page, cacheInstance cache.Cache) PageResolver

NewGetCachedPageResolver a new instance of the cached resolver

func NewPageResolver

func NewPageResolver(page models.Page) PageResolver

NewPageResolver creates a new instance of the page resovler

Jump to

Keyboard shortcuts

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