Documentation
¶
Index ¶
- Constants
- Variables
- func CastHTMLDocument(value runtime.Value) (drivers.HTMLDocument, error)
- func CastHTMLElement(value runtime.Value) (drivers.HTMLElement, error)
- func CloseAll(logger zerolog.Logger, closers []io.Closer, msg string)
- func CollectFrames(ctx context.Context, receiver runtime.List, doc drivers.HTMLDocument) error
- func DeserializeStyles(ctx context.Context, input runtime.String) (*runtime.Object, error)
- func FromHTMLType(nt html.NodeType) int
- func GetInDocument(ctx context.Context, key runtime.Value, doc drivers.HTMLDocument) (runtime.Value, error)
- func GetInElement(ctx context.Context, key runtime.Value, el drivers.HTMLElement) (runtime.Value, error)
- func GetInNode(ctx context.Context, key runtime.Value, node drivers.HTMLNode) (runtime.Value, error)
- func GetInPage(ctx context.Context, key runtime.Value, page drivers.HTMLPage) (runtime.Value, error)
- func GetUserAgent(val string) string
- func IsAttribute(name string) bool
- func IsEmptyValue(value runtime.Value) bool
- func IsNotFound(err error) bool
- func LoggerWithName(ctx zerolog.Context, name string) zerolog.Context
- func NewIterator(node drivers.HTMLElement) (runtime.Iterator, error)
- func PathToString(path []runtime.Value) string
- func SerializeStyles(ctx context.Context, styles runtime.Map) (runtime.String, error)
- func SetInDocument(ctx context.Context, key runtime.Value, doc drivers.HTMLDocument, ...) error
- func SetInElement(ctx context.Context, key runtime.Value, el drivers.HTMLElement, ...) error
- func SetInNode(_ context.Context, _ runtime.Value, _ drivers.HTMLNode, _ runtime.Value) error
- func SetInPage(ctx context.Context, key runtime.Value, page drivers.HTMLPage, ...) error
- func ToHTMLType(input int) html.NodeType
- func ToRuntimeStringSlice(ctx context.Context, input runtime.Value) ([]runtime.String, error)
- type Iterator
- type LazyValue
- func (lv *LazyValue) Mutate(ctx context.Context, mutator func(v runtime.Value, err error))
- func (lv *LazyValue) MutateIfReady(mutator func(v runtime.Value, err error))
- func (lv *LazyValue) Read(ctx context.Context) (runtime.Value, error)
- func (lv *LazyValue) Ready() bool
- func (lv *LazyValue) Reload(ctx context.Context)
- func (lv *LazyValue) Reset()
- type LazyValueFactory
- type QueryKind
Constants ¶
const (
AttrNameStyle = "style"
)
const RandomUserAgent = "*"
Variables ¶
var ( ErrReadOnly = runtime.Error(runtime.ErrInvalidOperation, "read only") ErrInvalidPath = runtime.Error(runtime.ErrInvalidOperation, "invalid path") )
var Attributes = []string{}/* 151 elements not displayed */
Functions ¶
func CastHTMLDocument ¶
func CastHTMLDocument(value runtime.Value) (drivers.HTMLDocument, error)
func CastHTMLElement ¶
func CastHTMLElement(value runtime.Value) (drivers.HTMLElement, error)
func CollectFrames ¶
CollectFrames recursively collects all frames from the given document and appends them to the receiver list. It first appends the current document to the receiver list, then retrieves its child documents and calls itself for each child.
func DeserializeStyles ¶
func FromHTMLType ¶
func GetInDocument ¶
func GetInElement ¶
func GetUserAgent ¶
func IsAttribute ¶
func IsEmptyValue ¶
func IsNotFound ¶
func NewIterator ¶
func NewIterator( node drivers.HTMLElement, ) (runtime.Iterator, error)
func PathToString ¶
func SerializeStyles ¶
func SetInDocument ¶
func SetInElement ¶
func ToHTMLType ¶
Types ¶
type LazyValue ¶
type LazyValue struct {
// contains filtered or unexported fields
}
LazyValue represents a value with late initialization
func NewLazyValue ¶
func NewLazyValue(factory LazyValueFactory) *LazyValue
func (*LazyValue) Mutate ¶
Mutate safely mutates an underlying value. Loads a value if it's not ready. Thread safe.
func (*LazyValue) MutateIfReady ¶
MutateIfReady safely mutates an underlying value only if it's ready.
func (*LazyValue) Read ¶
Read returns an underlying value. Not thread safe. Should not mutated. @returns (Value) - Underlying value if successfully loaded, otherwise error
func (*LazyValue) Ready ¶
Ready indicates whether the value is ready. @returns (Boolean) - Boolean value indicating whether the value is ready.
type LazyValueFactory ¶
LazyValueFactory represents a value initializer