error

package
v0.0.0-...-307b342 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2024 License: Apache-2.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 ErrType

type ErrType int

ErrType is the type for CA errors.

const (
	// CANotReady means the CA is not ready to sign CSRs.
	CANotReady ErrType = iota
	// CSRError means the CA cannot sign CSR due to CSR error.
	CSRError
	// TTLError means the required TTL is invalid.
	TTLError
	// CertGenError means an error happened during the certificate generation.
	CertGenError
	// CAIllegalConfig means the configuration/deployment parameters for CA are incorrect
	CAIllegalConfig
	// CAInitFail means some other unexpected and fatal initilization failure
	CAInitFail
)

type Error

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

Error encapsulates the short and long errors.

func NewError

func NewError(t ErrType, err error) *Error

NewError creates a new Error instance.

func (Error) Error

func (e Error) Error() string

Error returns the string error message.

func (Error) ErrorType

func (e Error) ErrorType() string

ErrorType returns a short string representing the error type.

func (Error) HTTPErrorCode

func (e Error) HTTPErrorCode() codes.Code

HTTPErrorCode returns an HTTP error code representing the error type.

Jump to

Keyboard shortcuts

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