...
1
2
3
4
5
6
7
8
9
10
11
12 package errors
13
14 import (
15 "strconv"
16 )
17
18
19
20 type StructuralError string
21
22 func (s StructuralError) Error() string {
23 return "openpgp: invalid data: " + string(s)
24 }
25
26
27
28 type UnsupportedError string
29
30 func (s UnsupportedError) Error() string {
31 return "openpgp: unsupported feature: " + string(s)
32 }
33
34
35
36 type InvalidArgumentError string
37
38 func (i InvalidArgumentError) Error() string {
39 return "openpgp: invalid argument: " + string(i)
40 }
41
42
43
44 type SignatureError string
45
46 func (b SignatureError) Error() string {
47 return "openpgp: invalid signature: " + string(b)
48 }
49
50 type keyIncorrectError int
51
52 func (ki keyIncorrectError) Error() string {
53 return "openpgp: incorrect key"
54 }
55
56 var ErrKeyIncorrect error = keyIncorrectError(0)
57
58 type unknownIssuerError int
59
60 func (unknownIssuerError) Error() string {
61 return "openpgp: signature made by unknown entity"
62 }
63
64 var ErrUnknownIssuer error = unknownIssuerError(0)
65
66 type keyRevokedError int
67
68 func (keyRevokedError) Error() string {
69 return "openpgp: signature made by revoked key"
70 }
71
72 var ErrKeyRevoked error = keyRevokedError(0)
73
74 type UnknownPacketTypeError uint8
75
76 func (upte UnknownPacketTypeError) Error() string {
77 return "openpgp: unknown packet type: " + strconv.Itoa(int(upte))
78 }
79
View as plain text