validation

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2017 License: Apache-2.0, BSD-3-Clause Imports: 2 Imported by: 34

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrBadHierarchy

type ErrBadHierarchy struct {
	Missing string
	Msg     string
}

ErrBadHierarchy represents missing metadata. Currently: a missing snapshot at this current time. When delegations are implemented it will also represent a missing delegation parent

func (ErrBadHierarchy) Error

func (err ErrBadHierarchy) Error() string

type ErrBadRoot

type ErrBadRoot struct {
	Msg string
}

ErrBadRoot represents a failure validating the root

func (ErrBadRoot) Error

func (err ErrBadRoot) Error() string

type ErrBadSnapshot

type ErrBadSnapshot struct {
	Msg string
}

ErrBadSnapshot represents a failure to validate the snapshot

func (ErrBadSnapshot) Error

func (err ErrBadSnapshot) Error() string

type ErrBadTargets

type ErrBadTargets struct {
	Msg string
}

ErrBadTargets represents a failure to validate a targets (incl delegations)

func (ErrBadTargets) Error

func (err ErrBadTargets) Error() string

type ErrValidation

type ErrValidation struct {
	Msg string
}

ErrValidation represents a general validation error

func (ErrValidation) Error

func (err ErrValidation) Error() string

type SerializableError

type SerializableError struct {
	Name  string
	Error error
}

SerializableError is a struct that can be used to serialize an error as JSON

func NewSerializableError

func NewSerializableError(err error) (*SerializableError, error)

NewSerializableError serializes one of the above errors into JSON

func (*SerializableError) UnmarshalJSON

func (s *SerializableError) UnmarshalJSON(text []byte) (err error)

UnmarshalJSON attempts to unmarshal the error into the right type

Jump to

Keyboard shortcuts

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