Documentation ¶
Index ¶
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func Code ¶
Code returns the Code of the error if it is a Status error, codes.OK if err is nil, or codes.Unknown otherwise.
func CodeToString ¶
Types ¶
type Status ¶
type Status struct {
// contains filtered or unexported fields
}
Status holds error of coap
func Convert ¶
Convert is a convenience function which removes the need to handle the boolean return value from FromError.
func FromContextError ¶
FromContextError converts a context error into a Status. It returns a Status with codes.OK if err is nil, or a Status with codes.Unknown if err is non-nil and not a context error.
Click to show internal directories.
Click to hide internal directories.