Documentation
¶
Index ¶
- func GetErrorResponse(ctx context.Context, messagePool *pool.Pool, code codes.Code, ...) (*pool.Message, func())
- func GetResourceInterface(msg *mux.Message) string
- func GetResponse(ctx context.Context, messagePool *pool.Pool, code codes.Code, ...) (*pool.Message, func())
- func IsTempError(err error) bool
- func URIToDeviceIDHref(msg *mux.Message) (deviceID, href string, err error)
- type JsonCoapMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetErrorResponse ¶
func GetResourceInterface ¶
Get resource interface from request query.
func GetResponse ¶
func IsTempError ¶ added in v2.2.4
IsTempError returns true if error is temporary. Only certain errors are not considered as temporary errors.
Types ¶
type JsonCoapMessage ¶ added in v2.2.4
type JsonCoapMessage struct { Code string `json:"code,omitempty"` Path string `json:"href,omitempty"` Token string `json:"token,omitempty"` Queries []string `json:"queries,omitempty"` Observe *uint32 `json:"observe,omitempty"` ContentFormat string `json:"contentFormat,omitempty"` Body interface{} `json:"body,omitempty"` }
func ToJson ¶ added in v2.2.4
func ToJson(m *pool.Message, withBody, withToken bool) JsonCoapMessage
func (JsonCoapMessage) IsEmpty ¶ added in v2.2.4
func (c JsonCoapMessage) IsEmpty() bool
Click to show internal directories.
Click to hide internal directories.