2019-12-24 00:30:44 +08:00
|
|
|
// Copyright (c) Mainflux
|
|
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
package api
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
|
|
|
|
"github.com/mainflux/mainflux"
|
2020-01-27 19:25:16 +08:00
|
|
|
"github.com/mainflux/mainflux/opcua"
|
2019-12-24 00:30:44 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
var _ mainflux.Response = (*browseRes)(nil)
|
|
|
|
|
|
|
|
type browseRes struct {
|
2020-01-27 19:25:16 +08:00
|
|
|
Nodes []opcua.BrowsedNode `json:"nodes"`
|
2019-12-24 00:30:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
func (res browseRes) Code() int {
|
|
|
|
return http.StatusOK
|
|
|
|
}
|
|
|
|
|
|
|
|
func (res browseRes) Headers() map[string]string {
|
|
|
|
return map[string]string{}
|
|
|
|
}
|
|
|
|
|
|
|
|
func (res browseRes) Empty() bool {
|
|
|
|
return false
|
|
|
|
}
|