go-netops/unifi/sites.go
Claude fabf31f997
feat: extract UniFi network controller package from core/go
UniFi API wrapper for device stats, network health, VLAN config,
client tracking, and route management.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 15:21:37 +00:00

17 lines
345 B
Go

package unifi
import (
uf "github.com/unpoller/unifi/v5"
"forge.lthn.ai/core/go/pkg/log"
)
// GetSites returns all sites from the UniFi controller.
func (c *Client) GetSites() ([]*uf.Site, error) {
sites, err := c.api.GetSites()
if err != nil {
return nil, log.E("unifi.GetSites", "failed to fetch sites", err)
}
return sites, nil
}