validation

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2020 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error interface {
	error
	ExitCode() int
}

Error extents the error interface with ExitCode method

type FileInfo

type FileInfo struct {
	Name string
	SHA1 string
}

FileInfo holds generic file metadata for manifest and package

type FileNotInManifestError

type FileNotInManifestError struct {
	Name string
}

FileNotInManifestError is returned by Validate methods when a file is documented in the manifest but is not in the package

func (FileNotInManifestError) Error

func (e FileNotInManifestError) Error() string

func (FileNotInManifestError) ExitCode

func (e FileNotInManifestError) ExitCode() int

type FileNotInPackageError

type FileNotInPackageError struct {
	Name string
}

FileNotInPackageError is returned by Validate methods when a file is in the package in the manifest but is not documented in the manifest

func (FileNotInPackageError) Error

func (e FileNotInPackageError) Error() string

func (FileNotInPackageError) ExitCode

func (e FileNotInPackageError) ExitCode() int

type HashMissmatchError

type HashMissmatchError struct {
	Algo string
	A, B string
}

HashMissmatchError is returned by Validate methods when hashes missmatch

func (HashMissmatchError) Error

func (e HashMissmatchError) Error() string

func (HashMissmatchError) ExitCode

func (e HashMissmatchError) ExitCode() int

type Manifest

type Manifest interface {
	PackageInfo() PackageInfo
	FileInfo() []FileInfo
}

Manifest the interface to be implemented by manifests

type MissingCopyrightInfoError

type MissingCopyrightInfoError struct {
	Name string
}

MissingCopyrightInfoError is returned when a manifest has no copyright info for a file described

func (MissingCopyrightInfoError) Error

func (MissingCopyrightInfoError) ExitCode

func (e MissingCopyrightInfoError) ExitCode() int

type MissingLicenseInfoError

type MissingLicenseInfoError struct {
	Name string
}

MissingLicenseInfoError is returned when a manifest has no license info for a file described

func (MissingLicenseInfoError) Error

func (e MissingLicenseInfoError) Error() string

func (MissingLicenseInfoError) ExitCode

func (e MissingLicenseInfoError) ExitCode() int

type Package

type Package interface {
	Validate(manifest Manifest) error
}

Package the interface to be implemented by packages

type PackageInfo

type PackageInfo struct {
	Name string
}

PackageInfo holds generic package metadata for manifest and package

type UnknownError

type UnknownError struct {
}

UnknownError is for errors unknown to the validator

func (UnknownError) Error

func (e UnknownError) Error() string

func (UnknownError) ExitCode

func (e UnknownError) ExitCode() int

Jump to

Keyboard shortcuts

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