Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrAuthentication indicates failure occurred while authenticating the entity. ErrAuthentication = New("failed to perform authentication over the entity") // ErrAuthorization indicates failure occurred while authorizing the entity. ErrAuthorization = New("failed to perform authorization over the entity") // ErrSaveMessages indicates failure occurred while saving messages to database. ErrSaveMessages = New("failed to save messages to database") // ErrDeleteMessage indicates failure occurred while deleting messages in the database. ErrDeleteMessages = New("failed to delete messages") // ErrInvalidMessage indicates that message format is invalid. ErrInvalidMessage = errors.New("invalid message representation") // ErrBackupMessages indicates failure occurred while backing up messages from the database. ErrBackupMessages = New("failed to backup messages") // ErrRestoreMessages indicates failure occured while restoring messages to the database. ErrRestoreMessages = New("failed to restore messages") // ErrMessage indicates an error converting a message to Mainflux message. ErrMessage = New("failed to convert to Mainflux message") // ErrBackupAlarms indicates failure occurred while backing up alarms from the database. ErrBackupAlarms = New("failed to backup alarms") // ErrInvalidPassword indicates that current password is invalid. ErrInvalidPassword = New("invalid current password") )
Functions ¶
func SignalHandler ¶
Types ¶
type Error ¶
type Error interface {
// Error implements the error interface.
Error() string
// Msg returns error message
Msg() string
// Err returns wrapped error
Err() Error
}
Error specifies an API that must be fullfiled by error type
type SDKError ¶
SDKError is an error type for Mainflux SDK.
func CheckError ¶
CheckError will check the HTTP response status code and matches it with the given status codes. Since multiple status codes can be valid, we can pass multiple status codes to the function. The function then checks for errors in the HTTP response.
func NewSDKError ¶
NewSDKError returns an SDK Error that formats as the given text.
func NewSDKErrorWithStatus ¶
NewSDKErrorWithStatus returns an SDK Error setting the status code.
Click to show internal directories.
Click to hide internal directories.