katch

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Katch

func Katch(ctx context.Context, input Input) ([]byte, error)

Katch exports the specified url in the input

Types

type Input

type Input struct {
	URL                string       `json:"url" query:"url" form:"url"`
	WaitFor            string       `json:"wait_for" query:"wait_for" form:"wait_for"`
	MaxExecTime        int          `json:"max_exec_time" query:"max_exec_time" form:"max_exec_time"`
	ViewportWidth      int64        `json:"viewport_width" query:"viewport_width" form:"viewport_width"`
	ViewportHeight     int64        `json:"viewport_height" query:"viewport_height" form:"viewport_height"`
	OutputFormat       OutputFormat `json:"format" query:"format" form:"format"`
	PDFLandscape       bool         `json:"pdf_landscape" query:"pdf_landscape" form:"pdf_landscape"`
	PDFPrintBackground bool         `json:"pdf_print_background" query:"pdf_print_background" form:"pdf_print_background"`
	PDFPaperHeight     float64      `json:"pdf_paper_height" query:"pdf_paper_height" form:"pdf_paper_height"`
	PDFPaperWidth      float64      `json:"pdf_paper_width" query:"pdf_paper_width" form:"pdf_paper_width"`
}

Input represents a Katch input

type OutputFormat

type OutputFormat string

OutputFormat represents a requested format

const (
	OutputFormatPDF  OutputFormat = "pdf"
	OutputFormatPNG  OutputFormat = "png"
	OutputFormatJPEG OutputFormat = "jpeg"
	OutputFormatHTML OutputFormat = "html"
)

available output formats

Jump to

Keyboard shortcuts

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