Documentation
¶
Index ¶
- Constants
- func CalculateAndWriteHashes() error
- func CheckIntegrity(ctx context.Context, log *logrus.Logger, processName string, ...) error
- func GetProcessPath(procName string, path string) (string, error)
- func HashDir(rootPath, pathToMonitor, alg string) []worker.FileHash
- func ParseMonitoringOpts(opts string) (map[string][]string, error)
- type IntegrityError
Constants ¶
View Source
const ( ErrTypeFileMismatch int = iota + 1 ErrTypeNewFile ErrTypeFileDeleted )
View Source
const ( IntegrityMessageNewFileFound = "new file found" IntegrityMessageFileDeleted = "file deleted" IntegrityMessageFileMismatch = "file content mismatch" IntegrityMessageUnknownErr = "unknown integrity error" )
View Source
const DefaultHashSize = 128
Variables ¶
This section is empty.
Functions ¶
func CalculateAndWriteHashes ¶
func CalculateAndWriteHashes() error
CalculateAndWriteHashes calculates file hashes of a given directory and store them as a file for further usage.
func CheckIntegrity ¶
Types ¶
type IntegrityError ¶
func (*IntegrityError) Error ¶
func (e *IntegrityError) Error() string
Click to show internal directories.
Click to hide internal directories.