-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.go
More file actions
82 lines (70 loc) · 2.18 KB
/
types.go
File metadata and controls
82 lines (70 loc) · 2.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
package cloudlayer
// APIVersion represents the CloudLayer.io API version.
// The API version must be explicitly specified when creating a client.
type APIVersion string
const (
// V1 is API version 1. Conversion endpoints return raw binary by default.
V1 APIVersion = "v1"
// V2 is API version 2. Conversion endpoints return Job objects by default.
V2 APIVersion = "v2"
)
// PDFFormat represents a PDF page size format.
type PDFFormat string
// PDF page size format constants.
const (
FormatLetter PDFFormat = "letter"
FormatLegal PDFFormat = "legal"
FormatTabloid PDFFormat = "tabloid"
FormatLedger PDFFormat = "ledger"
FormatA0 PDFFormat = "a0"
FormatA1 PDFFormat = "a1"
FormatA2 PDFFormat = "a2"
FormatA3 PDFFormat = "a3"
FormatA4 PDFFormat = "a4"
FormatA5 PDFFormat = "a5"
FormatA6 PDFFormat = "a6"
)
// ImageType represents an output image format.
type ImageType string
// Image format constants.
const (
ImagePNG ImageType = "png"
ImageJPEG ImageType = "jpeg"
ImageJPG ImageType = "jpg"
ImageWebP ImageType = "webp"
ImageSVG ImageType = "svg"
)
// JobStatus represents the status of a conversion job.
type JobStatus string
// Job status constants.
const (
JobPending JobStatus = "pending"
JobSuccess JobStatus = "success"
JobError JobStatus = "error"
)
// JobType represents the type of a conversion job.
type JobType string
// Job type constants.
const (
JobHTMLPDF JobType = "html-pdf"
JobHTMLImage JobType = "html-image"
JobURLPDF JobType = "url-pdf"
JobURLImage JobType = "url-image"
JobTemplatePDF JobType = "template-pdf"
JobTemplateImage JobType = "template-image"
JobDOCXPDF JobType = "docx-pdf"
JobDOCXHTML JobType = "docx-html"
JobImagePDF JobType = "image-pdf"
JobPDFImage JobType = "pdf-image"
JobPDFDOCX JobType = "pdf-docx"
JobPDFMerge JobType = "merge-pdf"
)
// WaitUntil represents a page load event to wait for.
type WaitUntil string
// Page load event constants.
const (
WaitLoad WaitUntil = "load"
WaitDOMContentLoaded WaitUntil = "domcontentloaded"
WaitNetworkIdle0 WaitUntil = "networkidle0"
WaitNetworkIdle2 WaitUntil = "networkidle2"
)