Omnitrail-go is a Go library designed to manage and track file and directory metadata, including permissions, ownership, and cryptographic hashes. It supports various plugins to handle different types of metadata and hashing algorithms.
- File Plugin: Computes SHA1, SHA256, and Gitoid hashes for files.
- Directory Plugin: Manages directory structures and computes Gitoid hashes for directories.
- Posix Plugin: Tracks POSIX file permissions, ownership, and size.
To install the library, use the following command:
go get github.com/yourusername/omnitrail-go
To create a new trail, use the NewTrail
function:
import "github.com/yourusername/omnitrail-go"
trail := omnitrail.NewTrail()
To add files and directories to the trail, use the Add
method:
err := trail.Add("/path/to/file_or_directory")
if err != nil {
log.Fatalf("Failed to add path: %v", err)
}
To generate ADG strings, use the FormatADGString
function:
adgString := omnitrail.FormatADGString(trail)
fmt.Println(adgString)
To run the tests, use the following command:
go test ./...
This project is licensed under the ApacheV2 License. See the LICENSE file for details.
Contributions are welcome! Please open an issue or submit a pull request for any changes.
Special thanks to all contributors and the open-source community for their support.