No description
|
|
||
|---|---|---|
| docs | ||
| unifi | ||
| CLAUDE.md | ||
| go.mod | ||
| go.sum | ||
| README.md | ||
go-netops
Go client library for UniFi network controllers. Provides a thin wrapper around the unpoller/unifi SDK with config-based authentication, TLS flexibility, site filtering, and flat device/network/route types for easy consumption by CLI commands.
| Module | forge.lthn.ai/core/go-netops |
| Licence | EUPL-1.2 |
| Language | Go 1.25 |
Quick Start
import "forge.lthn.ai/core/go-netops/unifi"
// Direct credentials
client, err := unifi.New("https://10.69.1.1", "admin", "pass", "", true)
// Or resolve from config file / env vars / flags
client, err := unifi.NewFromConfig("", "", "", "", nil)
// Query devices
devices, err := client.GetDeviceList("default", "")
// Query connected clients
clients, err := client.GetClients(unifi.ClientFilter{Wireless: true})
// Query networks and routes
networks, err := client.GetNetworks("default")
routes, err := client.GetRoutes("default")
Documentation
- Architecture — package structure, key types, design decisions
- Development — prerequisites, build/test, coding standards
- History — extraction origin, known limitations, future plans
Build & Test
go test ./... # run all tests
go test -race ./... # race detector
go test -cover ./... # coverage (39%)
go vet ./... # vet check
Licence
EUPL-1.2