wifictld-analyzer/database/ap.go

23 lines
374 B
Go

package database
import (
"net"
"github.com/FreifunkBremen/yanic/lib/jsontime"
)
type AP struct {
IP *net.IP `json:"ip"`
Lastseen jsontime.Time `json:"lastseen"`
}
func (db *DB) GetClients(ap *AP) []*Client {
var clients []*Client
for _, client := range db.Clients {
if client.AP == ap {
clients = append(clients, client)
}
}
return clients
}