checksum

package
v1.32.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2023 License: MIT Imports: 21 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateReader added in v1.20.0

func CalculateReader(file io.Reader, algorithm string) (string, error)

func CheckRegistry added in v1.30.0

func CheckRegistry(regist *aqua.Registry, checksums *Checksums, content []byte) error

func GetChecksumConfigFromFilename added in v1.19.3

func GetChecksumConfigFromFilename(filename, version string) *registry.Checksum

func GetChecksumFilePathFromConfigFilePath

func GetChecksumFilePathFromConfigFilePath(fs afero.Fs, cfgFilePath string) (string, error)

func GetRuntimesFromSupportedEnvs added in v1.29.0

func GetRuntimesFromSupportedEnvs(cfgSupportedEnvs, pkgSupportedEnvs []string) ([]*runtime.Runtime, error)

func RegistryID added in v1.30.1

func RegistryID(regist *aqua.Registry) string

Types

type Calculator added in v1.20.0

type Calculator struct{}

func NewCalculator added in v1.20.0

func NewCalculator() *Calculator

func (*Calculator) Calculate added in v1.20.0

func (calc *Calculator) Calculate(fs afero.Fs, filename, algorithm string) (string, error)

type Checksum added in v1.20.0

type Checksum struct {
	ID        string `json:"id"`
	Checksum  string `json:"checksum"`
	Algorithm string `json:"algorithm"`
}

type Checksums

type Checksums struct {
	// contains filtered or unexported fields
}

func New

func New() *Checksums

func (*Checksums) Get

func (chksums *Checksums) Get(key string) *Checksum

func (*Checksums) Prune added in v1.28.0

func (chksums *Checksums) Prune()

func (*Checksums) ReadFile

func (chksums *Checksums) ReadFile(fs afero.Fs, p string) error

func (*Checksums) Set

func (chksums *Checksums) Set(key string, chk *Checksum)

func (*Checksums) UpdateFile

func (chksums *Checksums) UpdateFile(fs afero.Fs, p string) error

type FileParser

type FileParser struct{}

func (*FileParser) ParseChecksumFile

func (parser *FileParser) ParseChecksumFile(content string, pkg *config.Package) (map[string]string, string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL