errs

package
v2.5.1 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: MPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCryptoEngineNotFound error = errors.New("crypto engine not found")

	ErrCANotFound                      error = errors.New("CA not found")
	ErrCAAlreadyExists                 error = errors.New("CA already exists")
	ErrCAStatusTransitionNotAllowed    error = errors.New("status transition not allowed for CA")
	ErrCAStatus                        error = errors.New("CA Status inconsistent")
	ErrCAAlreadyRevoked                error = errors.New("CA already revoked")
	ErrCAIncompatibleHashFunc          error = errors.New("incompatible hash function")
	ErrCAIncompatibleExpirationTimeRef error = errors.New("incompatible expiration time ref")
	ErrCAIssuanceExpiration            error = errors.New("issuance expiration greater than CA expiration")
	ErrCAType                          error = errors.New("CA type inconsistent")
	ErrCAValidCertAndPrivKey           error = errors.New("CA and the provided key don't match")

	ErrValidateBadRequest error = errors.New("struct validation error")

	ErrCertificateNotFound                   error = errors.New("certificate not found")
	ErrCertificateAlreadyRevoked             error = errors.New("certificate already revoked")
	ErrCertificateStatusTransitionNotAllowed error = errors.New("new status transition not allowed for certificate")
)
View Source
var (
	ErrDeviceNotFound      error = errors.New("device not found")
	ErrDeviceAlreadyExists error = errors.New("device already exits")
)
View Source
var (
	ErrDMSNotFound      error = errors.New("DMS not found")
	ErrDMSAlreadyExists error = errors.New("DMS already exists")

	ErrDMSOnlyEST              error = errors.New("DMS uses EST protocol")
	ErrDMSInvalidAuthMode      error = errors.New("DMS invalid auth mode")
	ErrDMSAuthModeNotSupported error = errors.New("DMS auth mode not supported")
	ErrDMSEnrollInvalidCert    error = errors.New("invalid certificate")
)
View Source
var (
	ErrEngineAlgNotSupported      error = errors.New("signing algorithm not supported")
	ErrEngineHashAlgInconsistency error = errors.New("inconsistency between hashed message and signature algorithm")
)

Functions

func WrapError

func WrapError(err error, sentinel *SentinelAPIError) error

Types

type APIError

type APIError interface {
	// APIError returns an HTTP status code and an API-safe error message.
	APIError() (int, string)
}

type SentinelAPIError

type SentinelAPIError struct {
	Status int
	Msg    string
}

func (SentinelAPIError) APIError

func (e SentinelAPIError) APIError() (int, string)

func (SentinelAPIError) Error

func (e SentinelAPIError) Error() string

Jump to

Keyboard shortcuts

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