Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HashAlgorithm ¶
type HashAlgorithm string
const ( MD5 HashAlgorithm = "md5" SHA1 HashAlgorithm = "sha1" SHA256 HashAlgorithm = "sha256" SHA512 HashAlgorithm = "sha512" Unknown HashAlgorithm = "unknown" )
func DetermineHashTypeByLength ¶
func DetermineHashTypeByLength(hash string) HashAlgorithm
type NoVerifier ¶
func (NoVerifier) GetAsset ¶
func (n NoVerifier) GetAsset() *assets.Asset
func (NoVerifier) String ¶
func (n NoVerifier) String() string
func (NoVerifier) Verify ¶
func (n NoVerifier) Verify(_ []byte) error
func (NoVerifier) WithClient ¶
func (n NoVerifier) WithClient(_ download.ClientContract) Verifier
type Sha256AssetVerifier ¶
type Sha256AssetVerifier struct { AssetURL string Asset *assets.Asset Verifier // contains filtered or unexported fields }
func (*Sha256AssetVerifier) GetAsset ¶
func (s256 *Sha256AssetVerifier) GetAsset() *assets.Asset
func (*Sha256AssetVerifier) String ¶
func (s256 *Sha256AssetVerifier) String() string
func (*Sha256AssetVerifier) Verify ¶
func (s256 *Sha256AssetVerifier) Verify(b []byte) error
func (*Sha256AssetVerifier) WithClient ¶
func (s256 *Sha256AssetVerifier) WithClient(client download.ClientContract) Verifier
type Sha256Error ¶
func (*Sha256Error) Error ¶
func (e *Sha256Error) Error() string
type Sha256Printer ¶
func (Sha256Printer) GetAsset ¶
func (s256 Sha256Printer) GetAsset() *assets.Asset
func (Sha256Printer) String ¶
func (s256 Sha256Printer) String() string
func (Sha256Printer) Verify ¶
func (s256 Sha256Printer) Verify(b []byte) error
func (Sha256Printer) WithClient ¶
func (s256 Sha256Printer) WithClient(_ download.ClientContract) Verifier
type Sha256SumFileAssetVerifier ¶
type Sha256SumFileAssetVerifier struct { Client download.ClientContract Sha256SumAssetURL string RealAssetURL string BinaryName string Asset *assets.Asset Verifier }
func (*Sha256SumFileAssetVerifier) GetAsset ¶
func (s256 *Sha256SumFileAssetVerifier) GetAsset() *assets.Asset
func (*Sha256SumFileAssetVerifier) String ¶
func (s256 *Sha256SumFileAssetVerifier) String() string
func (*Sha256SumFileAssetVerifier) Verify ¶
func (s256 *Sha256SumFileAssetVerifier) Verify(b []byte) error
func (*Sha256SumFileAssetVerifier) WithClient ¶
func (s256 *Sha256SumFileAssetVerifier) WithClient(client download.ClientContract) Verifier
type Sha256Verifier ¶
type Sha256Verifier struct { Expected []byte Asset *assets.Asset Verifier // contains filtered or unexported fields }
func NewSha256Verifier ¶
func NewSha256Verifier(client download.ClientContract, expectedHex string) (*Sha256Verifier, error)
func (*Sha256Verifier) GetAsset ¶
func (s256 *Sha256Verifier) GetAsset() *assets.Asset
func (*Sha256Verifier) String ¶
func (s256 *Sha256Verifier) String() string
func (*Sha256Verifier) Verify ¶
func (s256 *Sha256Verifier) Verify(b []byte) error
func (*Sha256Verifier) WithClient ¶
func (s256 *Sha256Verifier) WithClient(client download.ClientContract) Verifier
type VerifyChecksumResult ¶
type VerifyChecksumResult byte
const ( VerifyChecksumNone VerifyChecksumResult = iota VerifyChecksumSuccess VerifyChecksumResult = iota VerifyChecksumVerificationFailed VerifyChecksumResult = iota VerifyChecksumFailedNoVerifier VerifyChecksumResult = iota )
Click to show internal directories.
Click to hide internal directories.