util

package
v0.0.0-...-a98aea1 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2017 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrWrongLength = errors.New("wrong length")

Functions

func FileMetaEqual

func FileMetaEqual(actual data.FileMeta, expected data.FileMeta) error

func GenerateFileMeta

func GenerateFileMeta(r io.Reader, hashAlgorithms ...string) (data.FileMeta, error)

func HashedPaths

func HashedPaths(p string, hashes data.Hashes) []string

func NormalizeTarget

func NormalizeTarget(p string) string

Types

type ErrNoCommonHash

type ErrNoCommonHash struct {
	Expected data.Hashes
	Actual   data.Hashes
}

func (ErrNoCommonHash) Error

func (e ErrNoCommonHash) Error() string

type ErrUnknownHashAlgorithm

type ErrUnknownHashAlgorithm struct {
	Name string
}

func (ErrUnknownHashAlgorithm) Error

func (e ErrUnknownHashAlgorithm) Error() string

type ErrWrongHash

type ErrWrongHash struct {
	Type     string
	Expected data.HexBytes
	Actual   data.HexBytes
}

func (ErrWrongHash) Error

func (e ErrWrongHash) Error() string

type PassphraseFunc

type PassphraseFunc func(role string, confirm bool) ([]byte, error)

Jump to

Keyboard shortcuts

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