errors

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPublicKeyExists                = NewDomainError("pubkey", "public key already exists")
	ErrPublicKeyNotFound              = NewDomainError("pubkey", "public key not found")
	ErrWireGuardClientExists          = NewDomainError("wg", "wireguard client already exists")
	ErrWireGuardClientNotFound        = NewDomainError("wg", "wireguard client not found")
	ErrWireGuardClientAddressOverlaps = NewDomainError("wg", "wireguard client address overlaps with wireguard server address")
	ErrWireGuardServerPeerExists      = NewInternalError(NewDomainError("wg", "wireguard server peer already exists"))
	ErrWireGuardServerPeerNotFound    = NewInternalError(NewDomainError("wg", "wireguard server peer not found"))
	ErrWireGuardServerConfigNotFound  = NewInternalError(NewDomainError("wg", "wireguard server config not found"))
)

Functions

func As

func As(err error, target any) bool

func Is

func Is(err, target error) bool

func Join

func Join(errs ...error) error

func New

func New(text string) error

func NewCommandError

func NewCommandError(cmd *exec.Cmd, err error, msg string) error

func NewPanicError

func NewPanicError(p any, stack []byte) error

Types

type CommandError

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

func (*CommandError) Error

func (*CommandError) Error() string

func (*CommandError) Internal

func (e *CommandError) Internal() error

func (*CommandError) Unwrap

func (e *CommandError) Unwrap() error

type DomainError

type DomainError interface {
	error
	Domain() string
}

func NewDomainError

func NewDomainError(domain, msg string) DomainError

type InternalError

type InternalError interface {
	error
	Internal() error
}

func NewInternalError

func NewInternalError(err error) InternalError

type PanicError

type PanicError struct {
	Panic any
	Stack []byte
}

func (*PanicError) Error

func (*PanicError) Error() string

Jump to

Keyboard shortcuts

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