Documentation
¶
Index ¶
- Constants
- func FormatStarlinkReport(info *StarLinkInfo) string
- type Client
- type DeviceInfo
- type DeviceInfoResp
- type DeviceStateResp
- type DishConfig
- type DishConfigResp
- type DishGetConfigResp
- type DishGetStatusResp
- type DishStatus
- type GRPCResponse
- type GetDeviceInfoResp
- type SecurityIssue
- type StarLinkInfo
Constants ¶
const ( // Standard Starlink Dishy IP and port DefaultStarlinkIP = "192.168.100.1" DefaultStarlinkPort = 9200 // Alternative endpoints for testing LocalhostTestIP = "127.0.0.1" LocalhostTestPort = 9200 // Timeouts DialTimeout = 5 * time.Second RequestTimeout = 10 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func FormatStarlinkReport ¶
func FormatStarlinkReport(info *StarLinkInfo) string
FormatStarlinkReport generates a human-readable report of Starlink findings
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides access to Starlink API using native gRPC
func (*Client) GetConfig ¶
func (c *Client) GetConfig() (*DishConfig, error)
GetConfig retrieves configuration
func (*Client) GetDeviceInfo ¶
func (c *Client) GetDeviceInfo() (*DeviceInfo, error)
GetDeviceInfo retrieves device information using native gRPC with reflection
func (*Client) GetStatus ¶
func (c *Client) GetStatus() (*DishStatus, error)
GetStatus retrieves status information
func (*Client) IsAccessible ¶
IsAccessible checks if the Starlink service is accessible
type DeviceInfo ¶
type DeviceInfo struct {
ID string `json:"id"`
HardwareVersion string `json:"hardware_version"`
SoftwareVersion string `json:"software_version"`
CountryCode string `json:"country_code"`
BootCount int `json:"boot_count"`
BuildID string `json:"build_id"`
}
DeviceInfo contains basic device identification
type DeviceInfoResp ¶
type DeviceStateResp ¶
type DeviceStateResp struct {
UptimeS string `json:"uptimeS"`
}
type DishConfig ¶
type DishConfig struct {
SwupdateRebootHour int `json:"swupdate_reboot_hour"`
ApplySnowMeltMode bool `json:"apply_snow_melt_mode"`
ApplyLocationRequestMode bool `json:"apply_location_request_mode"`
ApplyLevelDishMode bool `json:"apply_level_dish_mode"`
ApplyPowerSaveStartMinutes bool `json:"apply_power_save_start_minutes"`
ApplyPowerSaveDurationMinutes bool `json:"apply_power_save_duration_minutes"`
ApplyPowerSaveMode bool `json:"apply_power_save_mode"`
ApplySwupdateThreeDayDeferralEnabled bool `json:"apply_swupdate_three_day_deferral_enabled"`
ApplyAssetClass bool `json:"apply_asset_class"`
ApplySwupdateRebootHour bool `json:"apply_swupdate_reboot_hour"`
}
DishConfig contains configuration settings
type DishConfigResp ¶
type DishConfigResp struct {
SwupdateRebootHour int `json:"swupdateRebootHour"`
ApplySnowMeltMode bool `json:"applySnowMeltMode"`
ApplyLocationRequestMode bool `json:"applyLocationRequestMode"`
ApplyLevelDishMode bool `json:"applyLevelDishMode"`
ApplyPowerSaveStartMinutes bool `json:"applyPowerSaveStartMinutes"`
ApplyPowerSaveDurationMinutes bool `json:"applyPowerSaveDurationMinutes"`
ApplyPowerSaveMode bool `json:"applyPowerSaveMode"`
ApplySwupdateThreeDayDeferralEnabled bool `json:"applySwupdateThreeDayDeferralEnabled"`
ApplyAssetClass bool `json:"applyAssetClass"`
ApplySwupdateRebootHour bool `json:"applySwupdateRebootHour"`
}
type DishGetConfigResp ¶
type DishGetConfigResp struct {
DishConfig DishConfigResp `json:"dishConfig"`
}
type DishGetStatusResp ¶
type DishGetStatusResp struct {
DeviceInfo DeviceInfoResp `json:"deviceInfo"`
DeviceState DeviceStateResp `json:"deviceState"`
DownlinkThroughputBps float64 `json:"downlinkThroughputBps"`
UplinkThroughputBps float64 `json:"uplinkThroughputBps"`
PopPingLatencyMs float64 `json:"popPingLatencyMs"`
BoresightAzimuthDeg float64 `json:"boresightAzimuthDeg"`
BoresightElevationDeg float64 `json:"boresightElevationDeg"`
EthSpeedMbps int `json:"ethSpeedMbps"`
ConnectedRouters []string `json:"connectedRouters"`
HasActuators string `json:"hasActuators"`
DisablementCode string `json:"disablementCode"`
SoftwareUpdateState string `json:"softwareUpdateState"`
}
type DishStatus ¶
type DishStatus struct {
UptimeS int64 `json:"uptime_s"`
DownlinkThroughputBps float64 `json:"downlink_throughput_bps"`
UplinkThroughputBps float64 `json:"uplink_throughput_bps"`
PopPingLatencyMs float64 `json:"pop_ping_latency_ms"`
BoresightAzimuthDeg float64 `json:"boresight_azimuth_deg"`
BoresightElevationDeg float64 `json:"boresight_elevation_deg"`
EthSpeedMbps int `json:"eth_speed_mbps"`
ConnectedRouters []string `json:"connected_routers"`
HasActuators string `json:"has_actuators"`
DisablementCode string `json:"disablement_code"`
SoftwareUpdateState string `json:"software_update_state"`
}
DishStatus contains operational status information
type GRPCResponse ¶
type GRPCResponse struct {
APIVersion string `json:"apiVersion"`
DishGetStatus *DishGetStatusResp `json:"dishGetStatus,omitempty"`
GetDeviceInfo *GetDeviceInfoResp `json:"getDeviceInfo,omitempty"`
DishGetConfig *DishGetConfigResp `json:"dishGetConfig,omitempty"`
}
gRPC response structures for parsing JSON responses
type GetDeviceInfoResp ¶
type GetDeviceInfoResp struct {
DeviceInfo DeviceInfoResp `json:"deviceInfo"`
}
type SecurityIssue ¶
type SecurityIssue struct {
Severity string `json:"severity"`
Category string `json:"category"`
Title string `json:"title"`
Description string `json:"description"`
Impact string `json:"impact"`
Remediation string `json:"remediation"`
}
SecurityIssue represents a security finding related to Starlink
type StarLinkInfo ¶
type StarLinkInfo struct {
Accessible bool `json:"accessible"`
DeviceInfo *DeviceInfo `json:"device_info,omitempty"`
Status *DishStatus `json:"status,omitempty"`
Config *DishConfig `json:"config,omitempty"`
SecurityIssues []SecurityIssue `json:"security_issues"`
}
StarLinkInfo represents information gathered from a Starlink Dishy
func CheckStarlink ¶
func CheckStarlink(out output.Output) *StarLinkInfo
CheckStarlink attempts to detect and analyze a Starlink Dishy on the network