open-vault/sdk/physical/entry.go

24 lines
526 B
Go
Raw Normal View History

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
2019-04-13 02:56:04 +00:00
package physical
2022-09-13 17:03:19 +00:00
import (
"encoding/hex"
"fmt"
)
2019-04-13 02:56:04 +00:00
// Entry is used to represent data stored by the physical backend
type Entry struct {
Key string
Value []byte
SealWrap bool `json:"seal_wrap,omitempty"`
// Only used in replication
ValueHash []byte
}
2022-09-13 17:03:19 +00:00
func (e *Entry) String() string {
return fmt.Sprintf("Key: %s. SealWrap: %t. Value: %s. ValueHash: %s", e.Key, e.SealWrap, hex.EncodeToString(e.Value), hex.EncodeToString(e.ValueHash))
}