hash

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2021 License: GPL-3.0 Imports: 17 Imported by: 0

Documentation

Overview

Copyright (C) 2017-2019 Daniele Rondina <geaaru@sabayonlinux.org>

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Index

Constants

View Source
const BYTE_BUFFER_LEN = 100

Variables

This section is empty.

Functions

This section is empty.

Types

type Checker

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

func NewChecker

func NewChecker(settings *viper.Viper, l *logger.Logger) (*Checker, error)

func (*Checker) AddPackage

func (c *Checker) AddPackage(p *Package) error

func (*Checker) GetPackages

func (c *Checker) GetPackages() []Package

func (*Checker) Run

func (c *Checker) Run() error

type CheckerConcurrent

type CheckerConcurrent struct {
	*Checker
}

I use anonymous field to override Run and other methods

func NewCheckerConcurrent

func NewCheckerConcurrent(settings *viper.Viper, l *logger.Logger) (*CheckerConcurrent, error)

type CheckerExecutor

type CheckerExecutor interface {
	AddPackage(p *Package) error
	Run() error
	GetPackages() []Package
}

type Package

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

func NewPackage

func NewPackage(pkg string, l *logger.Logger) (*Package, error)

func (*Package) AddDir

func (p *Package) AddDir(d string)

func (*Package) AddFile

func (p *Package) AddFile(f string, hash []byte)

func (*Package) CalculateCRC

func (p *Package) CalculateCRC() error

func (*Package) CheckSum

func (p *Package) CheckSum() string

func (*Package) Name

func (p *Package) Name() string

func (*Package) ProcessTarFile

func (p *Package) ProcessTarFile(tarReader *tar.Reader, name string) error

func (*Package) String

func (p *Package) String() string

type PackageSorter

type PackageSorter []Package

func (PackageSorter) Len

func (p PackageSorter) Len() int

func (PackageSorter) Less

func (p PackageSorter) Less(i, j int) bool

func (PackageSorter) Swap

func (p PackageSorter) Swap(i, j int)

Jump to

Keyboard shortcuts

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