Documentation
¶
Index ¶
- Constants
- func DetectChecksumAlgorithm(filename, defaultAlgo string) string
- func DetectChecksumType(filename string) string
- func ExtractChecksum(data []byte, algo, assetName string) (string, error)
- func FindChecksumSignature(assets []model.Asset, cfg *model.RepoConfig) (*model.Asset, string)
- func FormatSize(bytes int64) string
- func NormalizeHexKey(input string) (string, error)
- func SignatureFormatFromExtension(filename string, formats model.SignatureFormats) string
- func VerifyMinisignSignature(contentToVerify []byte, sigPath, pubKeyPath string) error
- func VerifyPGPSignature(assetPath, sigPath, pubKeyPath, gpgBin string) error
- type SignatureData
Constants ¶
View Source
const ( FormatBinary = "binary" FormatPGP = "pgp" FormatMinisign = "minisign" )
Variables ¶
This section is empty.
Functions ¶
func DetectChecksumAlgorithm ¶
func DetectChecksumType ¶
DetectChecksumType determines if a checksum file is consolidated or per-asset.
func FindChecksumSignature ¶
FindChecksumSignature looks for a signature over the checksum file (Workflow A). It searches for assets matching the ChecksumSigCandidates patterns. Returns the signature asset and the corresponding checksum asset name, or nil if not found.
func FormatSize ¶
FormatSize formats bytes as human-readable size.
func NormalizeHexKey ¶
func SignatureFormatFromExtension ¶
func SignatureFormatFromExtension(filename string, formats model.SignatureFormats) string
SignatureFormatFromExtension determines the signature verification method from file extension. Returns one of FormatMinisign, FormatPGP, FormatBinary, or empty string if unknown.
func VerifyMinisignSignature ¶
func VerifyPGPSignature ¶
Types ¶
type SignatureData ¶
func LoadSignature ¶
func LoadSignature(path string) (SignatureData, error)
Click to show internal directories.
Click to hide internal directories.