Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMismatch = errors.New("checksum mismatch error")
ErrMismatch indicates a checksum verification failure due to a derived checksum not being equal to expected checksum
Functions ¶
Types ¶
type Checksum ¶
type Checksum struct {
// Version represents version of the payload from
Version int
// which this checksum was derived
Flavor Flavor
// Value is the checksum value
Value []byte
}
Checksum represents a checksum value along with associated metadata
func FromProto ¶ added in v0.20.0
func FromProto(c *persistenceblobsgenpb.Checksum) *Checksum
FromProto returns a new checksum using the proto fields
func GenerateCRC32 ¶
GenerateCRC32 generates an IEEE crc32 checksum on the serilized byte array of the given thrift object. The serialization proto used will be of type thriftRW
func (*Checksum) ToProto ¶ added in v0.20.0
func (c *Checksum) ToProto() *persistenceblobsgenpb.Checksum
FromProto returns a new checksum using the proto fields
Click to show internal directories.
Click to hide internal directories.