forked from mirrors/tar-split
WIP
This commit is contained in:
parent
e2a62d6b0d
commit
5c8d5cacba
13 changed files with 265 additions and 50 deletions
34
tar/verify/verify.go
Normal file
34
tar/verify/verify.go
Normal file
|
@ -0,0 +1,34 @@
|
|||
package verify
|
||||
|
||||
import "fmt"
|
||||
|
||||
// CheckType is how the on disk attributes will be verified against the
|
||||
// recorded header information
|
||||
type CheckType int
|
||||
|
||||
// Check types for customizing how fuzzy or strict on-disk verification will be
|
||||
// handled
|
||||
const (
|
||||
CheckDigest CheckType = iota
|
||||
CheckFileSize
|
||||
CheckFileMode
|
||||
CheckFileUser
|
||||
CheckFileGroup
|
||||
CheckFileMtime
|
||||
CheckFileDevice
|
||||
CheckFileLink
|
||||
CheckFileCaps
|
||||
)
|
||||
|
||||
var (
|
||||
// DefaultChecks is the default for verfication steps against each
|
||||
// storage.VerficationEntry
|
||||
DefaultChecks = CheckDigest | CheckFileAttributes
|
||||
// CheckFileAttributes are the group of file attribute checks done
|
||||
CheckFileAttributes = CheckFileSize | CheckFileMode | CheckFileUser |
|
||||
CheckFileGroup | CheckFileMtime | CheckFileDevice | CheckFileCaps |
|
||||
CheckFileLink
|
||||
|
||||
// ErrNotSupportedPlatform is when the platform does not support given features
|
||||
ErrNotSupportedPlatform = fmt.Errorf("platform does not support this feature")
|
||||
)
|
Loading…
Add table
Add a link
Reference in a new issue