Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checksums ¶
type Checksums struct { // MD5 is the MD5 hash value of the associated blob object. MD5 []byte `datastore:",noindex"` // CRC32C is the CRC32C checksum of the associated blob object. // CRC32C uses the Castagnoli polynomial. // This needs to be int32 because Datastore doesn't support unsigned integers... // Use SetCRC32C() and GetCRC32C() for easier access. CRC32C int32 `datastore:",noindex"` // HasCRC32C indicates if there is a valid CRC32C value. HasCRC32C bool `datastore:",noindex"` }
Checksums is a struct for blob checksums.
func (*Checksums) ResetCRC32C ¶
func (c *Checksums) ResetCRC32C()
ResetCRC32C clears the CRC32C value and sets HasCRC32C to false.
func (*Checksums) ValidateIfPresent ¶
func (c *Checksums) ValidateIfPresent(p ChecksumsProto) error
ValidateIfPresent checks if the checksum values match with p. Returns a DataLoss error if they don't.
type ChecksumsProto ¶
ChecksumsProto represents an proto message that has checksum values.
Click to show internal directories.
Click to hide internal directories.