Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type HashData ¶
type HashData struct {
RelativePath string `json:"relative_path"`
HashValue string `json:"hash_value"`
VerifyResult bool `json:"verify_result,omitempty"`
Reason string `json:"reason_of_failed,omitempty"`
}
HashData is hash value and file name struct
type HashList ¶
type HashList struct {
List []HashData `json:"hash_list"`
VerifyResult bool `json:"verify_result,omitempty"`
}
HashList is a list of HashData struct
func GetHashList ¶
GetHashList returns the hash list of source. For source, a json file or a directory is supported.
func VerifyHashList ¶ added in v0.2.0
VerifyHashList verifies hash list of source and target. Then, returns HashList that has VerifyResult.
func (*HashList) GetDirectoryInfo ¶ added in v0.6.0
GetDirectoryInfo returns the number of directories and files. If HashList.List is nil or empty, returns 0 and 0.
Click to show internal directories.
Click to hide internal directories.