Migrate to a better architectured project
This commit is contained in:
parent
cc5ed5f23e
commit
b1b9eaa028
21 changed files with 2712 additions and 1540 deletions
58
internal/models/models.go
Normal file
58
internal/models/models.go
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
package models
|
||||
|
||||
import "time"
|
||||
|
||||
// WiFiNetwork represents a discovered WiFi network
|
||||
type WiFiNetwork struct {
|
||||
SSID string `json:"ssid"`
|
||||
Signal int `json:"signal"`
|
||||
Security string `json:"security"`
|
||||
Channel int `json:"channel"`
|
||||
BSSID string `json:"bssid"`
|
||||
}
|
||||
|
||||
// ConnectedDevice represents a device connected to the hotspot
|
||||
type ConnectedDevice struct {
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type"`
|
||||
MAC string `json:"mac"`
|
||||
IP string `json:"ip"`
|
||||
}
|
||||
|
||||
// HotspotConfig represents hotspot configuration
|
||||
type HotspotConfig struct {
|
||||
SSID string `json:"ssid"`
|
||||
Password string `json:"password"`
|
||||
Channel int `json:"channel"`
|
||||
}
|
||||
|
||||
// SystemStatus represents overall system status
|
||||
type SystemStatus struct {
|
||||
Connected bool `json:"connected"`
|
||||
ConnectedSSID string `json:"connectedSSID"`
|
||||
HotspotEnabled bool `json:"hotspotEnabled"`
|
||||
ConnectedCount int `json:"connectedCount"`
|
||||
DataUsage float64 `json:"dataUsage"`
|
||||
Uptime int64 `json:"uptime"`
|
||||
ConnectedDevices []ConnectedDevice `json:"connectedDevices"`
|
||||
}
|
||||
|
||||
// WiFiConnectRequest represents a request to connect to WiFi
|
||||
type WiFiConnectRequest struct {
|
||||
SSID string `json:"ssid" binding:"required"`
|
||||
Password string `json:"password"`
|
||||
}
|
||||
|
||||
// LogEntry represents a system log entry
|
||||
type LogEntry struct {
|
||||
Timestamp time.Time `json:"timestamp"`
|
||||
Source string `json:"source"`
|
||||
Message string `json:"message"`
|
||||
}
|
||||
|
||||
// DHCPLease represents a DHCP lease entry
|
||||
type DHCPLease struct {
|
||||
IP string
|
||||
MAC string
|
||||
Hostname string
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue