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") // ErrMalformedEntity indicates a malformed entity specification. ErrMalformedEntity = New("malformed entity specification") // ErrNotFound indicates a non-existent entity request. ErrNotFound = New("entity not found") // ErrConflict indicates that entity already exists. ErrConflict = New("entity already exists") // ErrCreateEntity indicates error in creating entity or entities. ErrCreateEntity = New("failed to create entity in the db") // ErrRetrieveEntity indicates error in viewing entity or entities. ErrRetrieveEntity = New("failed to retrieve entity") // ErrUpdateEntity indicates error in updating entity or entities. ErrUpdateEntity = New("failed to update entity") // ErrRemoveEntity indicates error in removing entity. ErrRemoveEntity = New("failed to remove entity") // ErrScanMetadata indicates problem with metadata in db. ErrScanMetadata = New("failed to scan metadata in db") // ErrSaveMessage indicates failure occurred while saving message to database. ErrSaveMessage = New("failed to save message to database") // ErrMessage indicates an error converting a message to Mainflux message. ErrMessage = New("failed to convert to Mainflux message") )
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.