Documentation ¶
Index ¶
Constants ¶
View Source
const (
RequestParamFilter = "filter"
)
Variables ¶
View Source
var ( MeshRequest = DataRequest{ Parameters: map[string]string{ "page": "homeNet", }, ResponseTransformer: transformer.Noop, } NetworkDevicesRequest = DataRequest{ Parameters: map[string]string{ "page": "netDev", }, ResponseTransformer: transformer.Noop, } NetworkUsageRequest = DataRequest{ Parameters: map[string]string{ "page": "netCnt", }, ResponseTransformer: transformer.NetCntToJson, } EnergyUsageRequest = DataRequest{ Parameters: map[string]string{ "page": "energy", }, ResponseTransformer: transformer.Noop, } SystemLogsRequest = DataRequest{ Parameters: map[string]string{ "page": "log", RequestParamFilter: "all", }, ResponseTransformer: transformer.Noop, } )
Functions ¶
This section is empty.
Types ¶
type DataRequest ¶
type DataRequest struct { Parameters map[string]string ResponseTransformer func(content []byte) ([]byte, error) }
func WithParams ¶
func WithParams(request DataRequest, params map[string]string) DataRequest
Click to show internal directories.
Click to hide internal directories.