proto

package
v0.12.13 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BusinessError

func BusinessError[R response[*zBusinessZeropsApiProtocol.Error]](
	resp R,
	err error,
	options ...HandleGrpcErrorOption,
) error

func DaemonError

func DaemonError(
	err error,
) (daemonInstalled bool, _ error)

func GrpcError

func GrpcError[T errorCode, R response[T]](
	resp R,
	err error,
	options ...HandleGrpcErrorOption,
) error

func IsUnauthenticated

func IsUnauthenticated(err error) bool

func VpnError

func VpnError[R response[*vpnproxy.Error]](
	resp R,
	err error,
	options ...HandleGrpcErrorOption,
) error

Types

type Err

type Err struct {
	Msg string
	*status.Status
}

func (Err) Error

func (e Err) Error() string

type Error

type Error struct {
	Message string
	Meta    any
}

func (Error) Error

func (e Error) Error() string

func (Error) GetMessage

func (e Error) GetMessage() string

func (Error) GetMeta

func (e Error) GetMeta() any

type HandleGrpcErrorOption

type HandleGrpcErrorOption func(*handleGrpcErrorConfig)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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