request

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2024 License: MIT Imports: 1 Imported by: 0

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL