snapshot

package module
v0.0.0-...-d12000f Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

README

Project Name

An amazing description goes here!

Try it out!

QuickStart

# IPFS on MacOS, otherwise https://docs.ipfs.io/introduction/install/
brew install ipfs
brew service start ipfs

Table of Contents

How To

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SnapshotOption

type SnapshotOption func(*SnapshotOptions)

func FormatSnapshotOption

func FormatSnapshotOption(format string) SnapshotOption

func HeightSnapshotOption

func HeightSnapshotOption(height int64) SnapshotOption

func MobileSnapshotOption

func MobileSnapshotOption(b bool) SnapshotOption

func ScaleFactorSnapshotOption

func ScaleFactorSnapshotOption(factor float64) SnapshotOption

func WidthSnapshotOption

func WidthSnapshotOption(width int64) SnapshotOption

type SnapshotOptions

type SnapshotOptions struct {
	Width  int64
	Height int64
	Mobile bool
	Format string // mhtml, pdf, default mhtml.

	ScaleFactor float64
}

SnapshotOptions is the options used by Snapshot.

type Snapshoter

type Snapshoter interface {
	Snapshot(ctx context.Context, url string, options ...SnapshotOption) (io.Reader, error)
}

Snapshoter is a webpage snapshot interface.

func NewChromeRemoteSnapshoter

func NewChromeRemoteSnapshoter(addr string) (Snapshoter, error)

NewChromeRemoteSnapshoter creates a Snapshoter backed by Chrome DevTools Protocol. The addr is the headless chrome websocket debugger endpoint, such as 127.0.0.1:9222.

Jump to

Keyboard shortcuts

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