Documentation
¶
Index ¶
- type Hasher
- func (h *Hasher) CalculateSHA256(filename string) (string, error)
- func (h *Hasher) DownloadAndParseHashFile(shaSumsURL string) (map[string]string, error)
- func (h *Hasher) HashFile(path string) (fileHashes, error)
- func (h *Hasher) HashesFromFiles(partsDir, prefixParts, hashType string) ([]string, error)
- func (h *Hasher) SetLogger(log logger.LoggerInterface)
- func (h *Hasher) ValidateFileIntegrity(fileName, hashType, etag string, hash string, ok bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hasher ¶
type Hasher struct { PartsDir string PrefixParts string // Log *logger.Logger Log logger.LoggerInterface }
func NewHasher ¶
func NewHasher(partsDir string, prefixParts string, log logger.LoggerInterface) *Hasher
func (*Hasher) CalculateSHA256 ¶
Function to calculate the SHA-256 hash of a file
func (*Hasher) DownloadAndParseHashFile ¶
func (*Hasher) HashesFromFiles ¶
func (*Hasher) SetLogger ¶
func (h *Hasher) SetLogger(log logger.LoggerInterface)
Click to show internal directories.
Click to hide internal directories.