checksum

package
v1.19.4 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2022 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Calculate added in v1.19.3

func Calculate(fs afero.Fs, filename, 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 Checksums

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

func New

func New() *Checksums

func (*Checksums) Get

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

func (*Checksums) ReadFile

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

func (*Checksums) Set

func (chksums *Checksums) Set(key, value string)

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

type RegexPattern

type RegexPattern struct {
	Checksum *regexp.Regexp
	File     *regexp.Regexp
}

Jump to

Keyboard shortcuts

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