reduxer

package
v0.19.1 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Overview

Package reduxer implements a set of functions to transform webpage to various formats.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Artifact added in v0.17.0

type Artifact struct {
	Img, PDF, Raw, Txt, HAR, HTM, WARC, Media Asset
}

Artifact represents the file paths stored on the local disk.

type Asset added in v0.15.1

type Asset struct {
	Remote Remote
	Local  string
}

Asset represents the files on the local disk and the remote servers.

type Reduxer added in v0.17.0

type Reduxer interface {
	Store(Src, *bundle)
	Load(Src) (*bundle, bool)
	Flush()
}

Reduxer is the interface that wraps the basic reduxer method.

Store sets the *bundle for a Src.

Load returns the data stored in the map for a Src, or nil if no value is present. The ok result indicates whether value was found in the map.

Flush erases all bundles from the cache.

func BundleExample added in v0.17.0

func BundleExample() Reduxer

func Do

func Do(ctx context.Context, opts *config.Options, urls ...*url.URL) (Reduxer, error)

Do executes secreenshot, print PDF and export html of given URLs Returns a set of bundle containing screenshot data and file path nolint:gocyclo

func NewReduxer added in v0.17.0

func NewReduxer() Reduxer

NewReduxer returns a Reduxer has been initialized.

type Remote added in v0.15.1

type Remote struct {
	Anonfile string
	Catbox   string
}

Remote represents the file on the remote server.

type Src added in v0.17.0

type Src string

Src represents the requested url.

Jump to

Keyboard shortcuts

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