rebase: vendor files required for kmip

Signed-off-by: Rakshith R <rar@redhat.com>
This commit is contained in:
Rakshith R
2022-08-16 15:18:06 +05:30
committed by mergify[bot]
parent 0c33a33d5c
commit e72ed593be
186 changed files with 39195 additions and 203 deletions

40
vendor/github.com/gemalto/kmip-go/op_destroy.go generated vendored Normal file
View File

@ -0,0 +1,40 @@
package kmip
import (
"context"
)
// DestroyRequestPayload ////////////////////////////////////////
//
type DestroyRequestPayload struct {
UniqueIdentifier string
}
// DestroyResponsePayload
type DestroyResponsePayload struct {
UniqueIdentifier string
}
type DestroyHandler struct {
Destroy func(ctx context.Context, payload *DestroyRequestPayload) (*DestroyResponsePayload, error)
}
func (h *DestroyHandler) HandleItem(ctx context.Context, req *Request) (*ResponseBatchItem, error) {
var payload DestroyRequestPayload
err := req.DecodePayload(&payload)
if err != nil {
return nil, err
}
respPayload, err := h.Destroy(ctx, &payload)
if err != nil {
return nil, err
}
// req.Key = respPayload.Key
return &ResponseBatchItem{
ResponsePayload: respPayload,
}, nil
}