errors

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2020 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// GRPC server specific codes
	// Range 600-699
	ErrPanic        = "600"
	ErrGrpcListener = "601"
	ErrGrpcServer   = "602"

	// Config specific codes
	// Range 700-799
	ErrEmptyConfig = "700"
	ErrLocal       = "701"
	ErrViper       = "702"

	// Mesh specific codes
	// Range 1000-1500
	ErrInstallMesh  = "1001"
	ErrMeshConfig   = "1002"
	ErrPortForward  = "1003"
	ErrClientConfig = "1004"
	ErrClientSet    = "1005"
	ErrStreamEvent  = "1006"
	ErrOpInvalid    = "1007"
	ErrInstallSmi   = "1008"
	ErrConnectSmi   = "1009"
	ErrRunSmi       = "1010"
	ErrDeleteSmi    = "1011"
	ErrSmiInit      = "1012"
)

Functions

func GetCode

func GetCode(err error) string

Types

type Error

type Error struct {
	Code        string
	Description string
}

func Is

func Is(err error) (*Error, bool)

func New

func New(code string, description string, doc ...string) *Error

func (*Error) Error

func (e *Error) Error() string

Jump to

Keyboard shortcuts

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