forked from ThalesGroup/kmip-go
-
Notifications
You must be signed in to change notification settings - Fork 2
/
types_messages.go
64 lines (54 loc) · 2.01 KB
/
types_messages.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
package kmip
import (
"time"
"github.com/Seagate/kmip-go/kmip14"
)
// 7.1
type RequestMessage struct {
RequestHeader RequestHeader
BatchItem []RequestBatchItem
}
type ResponseMessage struct {
ResponseHeader ResponseHeader
BatchItem []ResponseBatchItem
}
// 7.2
type RequestHeader struct {
ProtocolVersion ProtocolVersion
MaximumResponseSize int `ttlv:",omitempty"`
ClientCorrelationValue string `ttlv:",omitempty"`
ServerCorrelationValue string `ttlv:",omitempty"`
AsynchronousIndicator bool `ttlv:",omitempty"`
AttestationCapableIndicator bool `ttlv:",omitempty"`
AttestationType []kmip14.AttestationType
Authentication *Authentication
BatchErrorContinuationOption kmip14.BatchErrorContinuationOption `ttlv:",omitempty"`
BatchOrderOption bool `ttlv:",omitempty"`
TimeStamp *time.Time
BatchCount int
}
type RequestBatchItem struct {
Operation kmip14.Operation
UniqueBatchItemID []byte `ttlv:",omitempty"`
RequestPayload interface{}
MessageExtension *MessageExtension `ttlv:",omitempty"`
}
type ResponseHeader struct {
ProtocolVersion ProtocolVersion
TimeStamp time.Time
Nonce *Nonce
AttestationType []kmip14.AttestationType
ClientCorrelationValue string `ttlv:",omitempty"`
ServerCorrelationValue string `ttlv:",omitempty"`
BatchCount int
}
type ResponseBatchItem struct {
Operation kmip14.Operation `ttlv:",omitempty"`
UniqueBatchItemID []byte `ttlv:",omitempty"`
ResultStatus kmip14.ResultStatus
ResultReason kmip14.ResultReason `ttlv:",omitempty"`
ResultMessage string `ttlv:",omitempty"`
AsynchronousCorrelationValue []byte `ttlv:",omitempty"`
ResponsePayload interface{} `ttlv:",omitempty"`
MessageExtension *MessageExtension
}