tlerr

package
v0.0.0-...-f33ab34 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Overview

Package tlerr defines the errors of the translib library.

The Error() method of the error interface for these functions returns the English version, and are only meant for log files.

For message strings that are returned to the users, the localization will happen at when the GNMI/REST client's locale is known. Hence, it cannot occur here.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNotFound

func IsNotFound(err error) bool

IsNotFound return true if the given error represents a 'not found' condition

Types

type AlreadyExistsError

type AlreadyExistsError errordata

AlreadyExistsError indicates resource exists error.

func AlreadyExists

func AlreadyExists(msg string, args ...interface{}) AlreadyExistsError

AlreadyExists creates a AlreadyExistsError

func AlreadyExistsErr

func AlreadyExistsErr(appTag, path, msg string, args ...interface{}) AlreadyExistsError

AlreadyExistsErr creates an AlreadyExistsError instance with given message, app error tag and path.

func (AlreadyExistsError) Error

func (e AlreadyExistsError) Error() string

type AuthorizationError

type AuthorizationError errordata

AuthorizationError indicates the user is not authorized for an operation.

func (AuthorizationError) Error

func (e AuthorizationError) Error() string

type DBLockType

type DBLockType int
const (
	DBLockGeneric DBLockType = iota
	DBLockConfigSession
)

type InternalError

type InternalError errordata

InternalError indicates a generic error during app execution.

func New

func New(msg string, args ...interface{}) InternalError

New creates an InternalError

func NewError

func NewError(appTag, path, msg string, args ...interface{}) InternalError

NewError creates an InternalError instance with given message, app error tag and path.

func (InternalError) Error

func (e InternalError) Error() string

type InvalidArgsError

type InvalidArgsError errordata

InvalidArgsError indicates bad request error.

func InvalidArgs

func InvalidArgs(msg string, args ...interface{}) InvalidArgsError

InvalidArgs creates a InvalidArgsError

func InvalidArgsErr

func InvalidArgsErr(appTag, path, msg string, args ...interface{}) InvalidArgsError

InvalidArgsErr creates an InvalidArgsError instance with given messae, app erorr tag and path

func (InvalidArgsError) Error

func (e InvalidArgsError) Error() string

type NotFoundError

type NotFoundError errordata

NotFoundError indicates resource not found error.

func NotFound

func NotFound(msg string, args ...interface{}) NotFoundError

NotFound creates a NotFoundError

func NotFoundErr

func NotFoundErr(appTag, path, msg string, args ...interface{}) NotFoundError

NotFoundErr creates a NotFoundError instance with given message, app error tag and path.

func (NotFoundError) Error

func (e NotFoundError) Error() string

type NotSupportedError

type NotSupportedError errordata

NotSupportedError indicates unspported operation error.

func NotSupported

func NotSupported(msg string, args ...interface{}) NotSupportedError

NotSupported creates a NotSupportedError

func NotSupportedErr

func NotSupportedErr(appTag, path, msg string, args ...interface{}) NotSupportedError

NotSupportedErr creates a NotSupportedError instance with given message, app error tag and path.

func (NotSupportedError) Error

func (e NotSupportedError) Error() string

type RequestContextCancelledError

type RequestContextCancelledError struct {
	CtxError error
	// contains filtered or unexported fields
}

func RequestContextCancelled

func RequestContextCancelled(msg string, ctxErr error) RequestContextCancelledError

RequestContextCancelled creates a RequestContextCancelledError

func (RequestContextCancelledError) Error

type TranslibBusy

type TranslibBusy struct {
}

func (TranslibBusy) Error

func (e TranslibBusy) Error() string

type TranslibCVLFailure

type TranslibCVLFailure struct {
	Code         int
	CVLErrorInfo cvl.CVLErrorInfo
}

func (TranslibCVLFailure) Error

func (e TranslibCVLFailure) Error() string

type TranslibDBCannotOpen

type TranslibDBCannotOpen struct {
}

func (TranslibDBCannotOpen) Error

func (e TranslibDBCannotOpen) Error() string

type TranslibDBConnectionReset

type TranslibDBConnectionReset struct {
}

func (TranslibDBConnectionReset) Error

type TranslibDBInvalidState

type TranslibDBInvalidState string

func (TranslibDBInvalidState) Error

func (e TranslibDBInvalidState) Error() string

type TranslibDBLock

type TranslibDBLock struct {
	Type DBLockType
}

func (TranslibDBLock) Error

func (e TranslibDBLock) Error() string

type TranslibDBNotInit

type TranslibDBNotInit struct {
}

func (TranslibDBNotInit) Error

func (e TranslibDBNotInit) Error() string

type TranslibDBNotSupported

type TranslibDBNotSupported struct {
	Description string
}

func (TranslibDBNotSupported) Error

func (e TranslibDBNotSupported) Error() string

type TranslibDBScriptFail

type TranslibDBScriptFail struct {
	Description string
}

func (TranslibDBScriptFail) Error

func (e TranslibDBScriptFail) Error() string

type TranslibDBSubscribeFail

type TranslibDBSubscribeFail struct {
}

func (TranslibDBSubscribeFail) Error

func (e TranslibDBSubscribeFail) Error() string

type TranslibDBTxCmdsLim

type TranslibDBTxCmdsLim struct {
}

func (TranslibDBTxCmdsLim) Error

func (e TranslibDBTxCmdsLim) Error() string

type TranslibInvalidSession

type TranslibInvalidSession struct {
}

func (TranslibInvalidSession) Error

func (e TranslibInvalidSession) Error() string

type TranslibRedisClientEntryNotExist

type TranslibRedisClientEntryNotExist struct {
	Entry string
}

func (TranslibRedisClientEntryNotExist) Error

type TranslibSyntaxValidationError

type TranslibSyntaxValidationError struct {
	StatusCode int   // status code
	ErrorStr   error // error message
}

func (TranslibSyntaxValidationError) Error

type TranslibTimeoutError

type TranslibTimeoutError struct {
}

func (TranslibTimeoutError) Error

func (e TranslibTimeoutError) Error() string

type TranslibTransactionFail

type TranslibTransactionFail struct {
}

func (TranslibTransactionFail) Error

func (e TranslibTransactionFail) Error() string

type TranslibUnsupportedClientVersion

type TranslibUnsupportedClientVersion struct {
	ClientVersion     string
	ServerVersion     string
	ServerBaseVersion string
}

func (TranslibUnsupportedClientVersion) Error

type TranslibXfmrRetError

type TranslibXfmrRetError struct {
	XlateFailDelReq bool
}

func TranslibXfmrRetErr

func TranslibXfmrRetErr(fail bool) TranslibXfmrRetError

func (TranslibXfmrRetError) Error

func (e TranslibXfmrRetError) Error() string

Jump to

Keyboard shortcuts

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