checksum

package
v1.20.1 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: MIT Imports: 15 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 GetChecksumConfigFromFilename added in v1.19.3

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

func GetChecksumFilePathFromConfigFilePath

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

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) 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