Versions in this module Expand all Collapse all v0 v0.0.4 Apr 1, 2024 Changes in this version + const HealthCheckStatusOK + const MaxRetries + type APICallError struct + Endpoint string + Message string + StatusCode int + func (e APICallError) Error() string + type Arp struct + Expired bool + Expires int + Hostname string + IP string + IntfDescription string + Mac string + Permanent bool + Type string + type ArpTable struct + Arp []Arp + TotalEntries int + type Client struct + func NewClient(cfg options.OPNSenseConfig, userAgentVersion string, log log.Logger) (Client, error) + func (c *Client) Endpoints() map[EndpointName]EndpointPath + func (c *Client) FetchArpTable() (ArpTable, *APICallError) + func (c *Client) FetchCronTable() (CronTable, *APICallError) + func (c *Client) FetchGateways() (Gateways, *APICallError) + func (c *Client) FetchInterfaces() (Interfaces, *APICallError) + func (c *Client) FetchOpenVPNInstances() (OpenVPNInstances, *APICallError) + func (c *Client) FetchProtocolStatistics() (ProtocolStatistics, *APICallError) + func (c *Client) FetchServices() (Services, *APICallError) + func (c *Client) FetchSystemInfo() (SystemInfo, *APICallError) + func (c *Client) FetchUnboundOverview() (UnboundDNSOverview, *APICallError) + func (c *Client) FetchWireguardConfig() (WireguardClients, *APICallError) + func (c *Client) HealthCheck() (HealthCheckResponse, error) + type Cron struct + Command string + Description string + Origin string + Schedule string + Status CronStatus + UUID string + type CronStatus int + const CronStatusDisabled + const CronStatusEnabled + type CronTable struct + Cron []Cron + TotalEntries int + type EndpointName string + type EndpointPath string + type Gateway struct + Address string + LossPercentage float64 + Name string + RTTDMilliseconds float64 + RTTMilliseconds float64 + Status GatewayStatus + type GatewayStatus int + const GatewayStatusOffline + const GatewayStatusOnline + const GatewayStatusUnknown + type Gateways struct + Gateways []Gateway + type HealthCheckResponse struct + CrashReporter struct{ ... } + Firewall struct{ ... } + System struct{ ... } + type Interface struct + BytesReceived int + BytesTransmitted int + Collisions int + Device string + InputErrors int + MTU int + MulticastsReceived int + MulticastsTransmitted int + Name string + OutputErrors int + PacketsReceived int + PacketsTransmitted int + Type string + type InterfaceDetails struct + AddressLength string + BytesReceived string + BytesTransmitted string + Collisions string + Datalen string + Device string + Driver string + Flags string + HWOffloadCapabilities string + HeaderLength string + Index string + InputErrors string + InputQueueDrops string + LineRate string + LinkState string + MTU string + Metric string + MulticastsReceived string + MulticastsTransmitted string + Name string + OutputErrors string + PacketsForUnknownProtocol string + PacketsReceived string + PacketsTransmitted string + PromiscuousListeners string + SendQueueDrops string + SendQueueLength string + SendQueueMaxLength string + Type string + UptimeAtAttachOrStatReset string + Vhid string + type Interfaces struct + Interfaces []Interface + type OpenVPN struct + Description string + DevType string + Enabled int + Role string + UUID string + type OpenVPNInstances struct + Rows []OpenVPN + type ProtocolStatistics struct + ARPReceivedRequests int + ARPSentRequests int + ICMPCalls int + ICMPDroppedByReason map[string]int + ICMPSentPackets int + TCPConnectionCountByState map[string]int + TCPReceivedPackets int + TCPSentPackets int + UDPDeliveredPackets int + UDPDroppedByReason map[string]int + UDPOutputPackets int + UDPReceivedDatagrams int + type Service struct + Description string + Name string + Status ServiceStatus + type ServiceStatus int + const ServiceStatusRunning + const ServiceStatusStopped + const ServiceStatusUnknown + type Services struct + Services []Service + TotalRunning int + TotalStopped int + type SystemInfo struct + Temperature []Temperature + type Temperature struct + Device string + DeviceSeq string + TemperatureCelsuis int + TemperatureFahrenheit float32 + Type string + type UnboundDNSOverview struct + AnnswerBogusTotal int + AnswerRcodes map[string]int + AnswerRcodesTotal int + AnswerSecureTotal int + BlocklistSize int + Passed int + QueryTypes map[string]int + Total int + UptimeSeconds float64 + type WGInterfaceStatus int + const WGInterfaceStatusDown + const WGInterfaceStatusUnknown + const WGInterfaceStatusUp + type WireguardClients struct + Interfaces []WireguardInterfaces + Peers []WireguardPeers + type WireguardInterfaces struct + Device string + DeviceName string + DeviceType string + Name string + Status WGInterfaceStatus + type WireguardPeers struct + Device string + DeviceName string + DeviceType string + LatestHandshake float64 + Name string + TransferRx float64 + TransferTx float64