Documentation
¶
Index ¶
- Constants
- Variables
- type Client
- type Request
- func (r *Request) Bool(fieldName string, value bool) *Request
- func (r *Request) Err() error
- func (r *Request) File(key, filename string, content io.Reader) *Request
- func (r *Request) Float(fieldName string, value float64) *Request
- func (r *Request) Header(key, value string) *Request
- func (r *Request) Margins(top, right, bottom, left float64) *Request
- func (r *Request) OutputFilename(filename string) *Request
- func (r *Request) PaperSize(width, height float64) *Request
- func (r *Request) PaperSizeA4() *Request
- func (r *Request) PaperSizeA6() *Request
- func (r *Request) PaperSizeLetter() *Request
- func (r *Request) Param(key, value string) *Request
- func (r *Request) Send() (*Response, error)
- func (r *Request) WebhookErrorURL(url, method string) *Request
- func (r *Request) WebhookHeader(key, value string) *Request
- func (r *Request) WebhookURL(url, method string) *Request
- type Response
Constants ¶
View Source
const ( ConvertHTML = "/forms/chromium/convert/html" ConvertURL = "/forms/chromium/convert/url" )
View Source
const ( FieldSinglePage = "singlePage" FieldPaperWidth = "paperWidth" FieldPaperHeight = "paperHeight" FieldMarginTop = "marginTop" FieldMarginBottom = "marginBottom" FieldMarginLeft = "marginLeft" FieldMarginRight = "marginRight" FieldPreferCSSPageSize = "preferCssPageSize" FieldGenerateDocumentOutline = "generateDocumentOutline" FieldGenerateTaggedPDF = "generateTaggedPdf" FieldPrintBackground = "printBackground" FieldOmitBackground = "omitBackground" FieldLandscape = "landscape" FieldScale = "scale" FieldNativePageRanges = "nativePageRanges" )
View Source
const ( HeaderWebhookURL = "Gotenberg-Webhook-Url" HeaderWebhookErrorURL = "Gotenberg-Webhook-Error-Url" HeaderWebhookMethod = "Gotenberg-Webhook-Method" HeaderWebhookErrorMethod = "Gotenberg-Webhook-Error-Method" HeaderWebhookExtraHTTPHeaders = "Gotenberg-Webhook-Extra-Http-Headers" HeaderOutputFilename = "Gotenberg-Output-Filename" HeaderGotenbergTrace = "Gotenberg-Trace" )
View Source
const ( FieldURL = "url" FieldFiles = "files" FileIndexHTML = "index.html" FileHeaderHTML = "header.html" FileStylesCSS = "styles.css" )
Variables ¶
View Source
var ( PaperSizeLetter = [2]float64{8.5, 11} PaperSizeLegal = [2]float64{8.5, 14} PaperSizeTabloid = [2]float64{11, 17} PaperSizeLedger = [2]float64{17, 11} PaperSizeA0 = [2]float64{33.1, 46.8} PaperSizeA1 = [2]float64{23.4, 33.1} PaperSizeA2 = [2]float64{16.54, 23.4} PaperSizeA3 = [2]float64{11.7, 16.54} PaperSizeA4 = [2]float64{8.27, 11.7} PaperSizeA5 = [2]float64{5.83, 8.27} PaperSizeA6 = [2]float64{4.13, 5.83} )
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
*httpclient.Client
}
func (*Client) ConvertHTML ¶ added in v1.0.1
type Request ¶ added in v1.1.1
type Request struct {
// contains filtered or unexported fields
}
func (*Request) OutputFilename ¶ added in v1.3.1
func (*Request) PaperSizeA4 ¶ added in v1.1.1
func (*Request) PaperSizeA6 ¶ added in v1.5.0
func (*Request) PaperSizeLetter ¶ added in v1.1.1
func (*Request) WebhookErrorURL ¶ added in v1.4.0
func (*Request) WebhookHeader ¶ added in v1.4.6
func (*Request) WebhookURL ¶ added in v1.4.0
Click to show internal directories.
Click to hide internal directories.