Documentation ¶
Index ¶
- Variables
- func AssertValid(verify types.Verification, data []byte) error
- func GetHasher(verify types.Verification) (hash.Hash, error)
- func HashParts(v types.Verification) (string, string, error)
- func StrSliceContains(slice []string, s string) bool
- func UmountPath(path string) error
- func UrlNeedsNet(u url.URL) bool
- type ErrHashMismatch
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrHashMalformed = errors.New("malformed hash specifier") ErrHashUnrecognized = errors.New("unrecognized hash function") )
Functions ¶
func AssertValid ¶
func AssertValid(verify types.Verification, data []byte) error
func HashParts ¶
func HashParts(v types.Verification) (string, string, error)
HashParts will return the sum and function (in that order) of the hash stored in this Verification, or an error if there is an issue during parsing.
func StrSliceContains ¶ added in v2.14.0
func UmountPath ¶ added in v2.13.0
func UrlNeedsNet ¶ added in v2.4.0
Types ¶
type ErrHashMismatch ¶
ErrHashMismatch is returned when the calculated hash for a fetched object doesn't match the expected sum of the object.
func (ErrHashMismatch) Error ¶
func (e ErrHashMismatch) Error() string
Click to show internal directories.
Click to hide internal directories.