proto

package
v0.11.4 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 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[*business.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 added in v0.11.2

type Error struct {
	Message string
	Meta    interface{}
}

func (Error) Error added in v0.11.2

func (e Error) Error() string

func (Error) GetMessage added in v0.11.2

func (e Error) GetMessage() string

func (Error) GetMeta added in v0.11.2

func (e Error) GetMeta() interface{}

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