-
Notifications
You must be signed in to change notification settings - Fork 0
/
twain-direct-tasks.go
98 lines (87 loc) · 2.89 KB
/
twain-direct-tasks.go
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
package twain_direct
type task struct {
Actions Action `json:"actions"`
}
type Action struct {
Action string `json:"action"`
// "configure", "encryptionProfiles",
// "encryptionPublicKeys",
// "encryptionReport"
Comment string `json:"comment"`
Exception string `json:"exception"`
// "fail", "ignore"
Vendor string `json:"vendor"`
Streams []Stream `json:"streams"`
EncryptionProfiles []EncryptionProfile `json:"encryptionProfiles"`
EncryptionPublicKeys []EncryptionPublicKey `json:"encryptionPublicKeys"`
EncryptionReport EncryptionReport `json:"encryptionReport"`
}
type Stream struct {
Comment string `json:"comment"`
Vendor string `json:"vendor"`
Exception string `json:"exception"`
// "fail", "ignore", "nextStream"
Name string `json:"name"`
Sources []Source `json:"sources"`
}
type Source struct {
Comment string `json:"comment"`
Vendor string `json:"vendor"`
Exception string `json:"exception"`
// "fail", "ignore", "nextStream"
Name string `json:"name"`
Source string `json:"source"`
// default: "any"
// "feeder", "feederFront", "feederRear",
// "flatbed", "planetary", "storage"
PixelFormats []PixelFormat `json:"pixelFormats"`
}
type PixelFormat struct {
Comment string `json:"comment"`
Vendor string `json:"vendor"`
Exception string `json:"exception"`
// "fail", "ignore", "nextStream"
Name string `json:"name"`
// default: "any"
// "feeder", "feederFront", "feederRear",
// "flatbed", "planetary", "storage"
PixelFormat string `json:"pixelFormat"`
Attributes []Attribute `json:"attributes"`
}
type Attribute struct {
Comment string `json:"comment"`
Vendor string `json:"vendor"`
Exception string `json:"exception"`
Attribute string `json:"attribute"`
Values []Value `json:"values"`
}
type Value struct {
Comment string `json:"comment"`
Vendor string `json:"vendor"`
Exception string `json:"exception"`
Value string `json:"value"`
}
type EncryptionProfile struct {
Comment string `json:"comment"`
Vendor string `json:"vendor"`
Exception string `json:"exception,omitempty"`
Profile string `json:"profile"`
}
type EncryptionPublicKey struct {
Comment string `json:"comment"`
Vendor string `json:"vendor"`
Exception string `json:"exception,omitempty"`
Base64PublicKey string `json:"base64PublicKey,omitempty"`
PublicKeyType string `json:"publicKeyType,omitempty"`
// default: "pem"
}
type EncryptionReport struct {
DigitalSignatures []DigitalSignature `json:"digitalSignature,omitempty"`
EncryptionProfiles []EncryptionProfile `json:"encryptionProfiles,omitempty"`
EncryptionPublicKeys []EncryptionPublicKey `json:"encryptionPublicKeys,omitempty"`
}
type DigitalSignature struct {
Comment string `json:"comment"`
Vendor string `json:"vendor"`
DigitalSignature string `json:"digitalSignature"`
}