Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppHandler ¶
type AppHandler func(http.ResponseWriter, *http.Request) error
AppHandler adds generic error handling to a handler func.
A catch all error response writer handler for convinience.
A handler func that writes it's own error response should typically not return an error.
func (AppHandler) ServeHTTP ¶
func (fn AppHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type Server ¶
type Server struct { MonClients *mon.Clients NmapEnabled bool OUILookup func(s string) (string, error) }
Server contains the web page and JSON API routes.
func (*Server) Clients ¶
func (s *Server) Clients() AppHandler
Clients serves the list of clients web page.
func (*Server) Conntrack ¶
func (s *Server) Conntrack() AppHandler
Clients serves the connection tracking web page.
func (*Server) NmapV0 ¶
func (s *Server) NmapV0() AppHandler
NmapV0 runs a predefined nmap qiery against a single IP address.
func (*Server) StatsV1 ¶
func (s *Server) StatsV1() AppHandler
StatsV1 is an API resource that returns a JSON encoded respons with the current list of identified network devices and their current bandwidth rate.
Click to show internal directories.
Click to hide internal directories.