Documentation
¶
Index ¶
- Variables
- func As(err error, target any) bool
- func Is(err, target error) bool
- func Join(errs ...error) error
- func New(text string) error
- func NewCommandError(cmd *exec.Cmd, err error, msg string) error
- func NewPanicError(p any, stack []byte) error
- type CommandError
- type DomainError
- type InternalError
- type PanicError
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 NewPanicError ¶
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 ¶
func NewDomainError ¶
func NewDomainError(domain, msg string) DomainError
type InternalError ¶
func NewInternalError ¶
func NewInternalError(err error) InternalError
type PanicError ¶
func (*PanicError) Error ¶
func (*PanicError) Error() string
Click to show internal directories.
Click to hide internal directories.