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 ¶
- func IsNotFound(err error) bool
- type AlreadyExistsError
- type AuthorizationError
- type DBLockType
- type InternalError
- type InvalidArgsError
- type NotFoundError
- type NotSupportedError
- type RequestContextCancelledError
- type TranslibBusy
- type TranslibCVLFailure
- type TranslibDBCannotOpen
- type TranslibDBConnectionReset
- type TranslibDBInvalidState
- type TranslibDBLock
- type TranslibDBNotInit
- type TranslibDBNotSupported
- type TranslibDBScriptFail
- type TranslibDBSubscribeFail
- type TranslibDBTxCmdsLim
- type TranslibInvalidSession
- type TranslibRedisClientEntryNotExist
- type TranslibSyntaxValidationError
- type TranslibTimeoutError
- type TranslibTransactionFail
- type TranslibUnsupportedClientVersion
- type TranslibXfmrRetError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsNotFound ¶
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 InternalError ¶
type InternalError errordata
InternalError indicates a generic error during app execution.
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 ¶
func (e RequestContextCancelledError) Error() string
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 ¶
func (e TranslibDBConnectionReset) Error() string
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 ¶
func (e TranslibRedisClientEntryNotExist) Error() string
type TranslibSyntaxValidationError ¶
type TranslibSyntaxValidationError struct { StatusCode int // status code ErrorStr error // error message }
func (TranslibSyntaxValidationError) Error ¶
func (e TranslibSyntaxValidationError) Error() string
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 ¶
func (e TranslibUnsupportedClientVersion) Error() string
type TranslibXfmrRetError ¶
type TranslibXfmrRetError struct {
XlateFailDelReq bool
}
func TranslibXfmrRetErr ¶
func TranslibXfmrRetErr(fail bool) TranslibXfmrRetError
func (TranslibXfmrRetError) Error ¶
func (e TranslibXfmrRetError) Error() string