This commit is contained in:
Jake Keeys
2020-01-26 12:35:46 +00:00
commit f5de88e5bb
9 changed files with 764 additions and 0 deletions

37
pkg/hg612/client.go Normal file
View File

@@ -0,0 +1,37 @@
package hg612
import "net/http"
//stats = map[string]stat{
// "deviceInfo": {
// path: "html/status/deviceinfo.asp",
// },
// "ATM": {
// path: "html/status/atmStatus.asp",
// },
// "WAN": {
// path: "html/status/internetstatus.asp",
// },
// "VDSL": {
// path: "html/status/xdslStatus.asp",
// },
// "LAN": {
// path: "html/status/ethenet.asp",
// },
//}
type Client interface {
DSLStatus() (*VDSLStatus, error)
}
type HG612Client struct {
basePath string
client *http.Client
}
func New(basePath string, client *http.Client) Client {
return HG612Client{
basePath: basePath,
client: client,
}
}