MCPcopy
hub / github.com/minio/minio-go / ChecksumMap

Method ChecksumMap

api-get-object-attributes.go:131–149  ·  view source on GitHub ↗

ChecksumMap returns a map of checksums for the object.

()

Source from the content-addressed store, hash-verified

129
130// ChecksumMap returns a map of checksums for the object.
131func (o *ObjectAttributesResponse) ChecksumMap() map[string]string {
132 res := make(map[string]string)
133 setif := func(typ ChecksumType, value string) {
134 if value != "" {
135 res[typ.Key()] = value
136 }
137 }
138 setif(ChecksumCRC32C, o.Checksum.ChecksumCRC32C)
139 setif(ChecksumCRC32, o.Checksum.ChecksumCRC32)
140 setif(ChecksumCRC64NVME, o.Checksum.ChecksumCRC64NVME)
141 setif(ChecksumSHA1, o.Checksum.ChecksumSHA1)
142 setif(ChecksumSHA256, o.Checksum.ChecksumSHA256)
143 setif(ChecksumMD5, o.Checksum.ChecksumMD5)
144 setif(ChecksumSHA512, o.Checksum.ChecksumSHA512)
145 setif(ChecksumXXHash64, o.Checksum.ChecksumXXHash64)
146 setif(ChecksumXXHash3, o.Checksum.ChecksumXXHash3)
147 setif(ChecksumXXHash128, o.Checksum.ChecksumXXHash128)
148 return res
149}
150
151// ChecksumMode returns the checksum mode of the object.
152// If unable to determine, returns ChecksumUnknownMode.

Callers

nothing calls this directly

Calls 1

KeyMethod · 0.45

Tested by

no test coverage detected