model

package
v1.9.4-alpha3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangePortRequest

type ChangePortRequest struct {
	Port string `json:"port" binding:"required"`
}

type ClientConfig

type ClientConfig struct {
	SSID     string `json:"ssid,omitempty"`
	Password string `json:"password,omitempty"`
}

ClientConfig is the unified client config for a single interface (stored in network-config.json)

type ComposeAppStoreInfo

type ComposeAppStoreInfo struct {
	Architectures  []string          `json:"architectures,omitempty" yaml:",omitempty"`
	Author         string            `json:"author"`
	Category       string            `json:"category"`
	Description    map[string]string `json:"description"`
	Developer      string            `json:"developer"`
	Hostname       string            `json:"hostname,omitempty" yaml:",omitempty"`
	Icon           string            `json:"icon"`
	Index          string            `json:"index" yaml:",omitempty"`
	Main           string            `json:"main,omitempty" yaml:",omitempty"`
	PortMap        string            `json:"port_map" mapstructure:"port_map" yaml:"port_map,omitempty"`
	Scheme         string            `json:"scheme,omitempty" yaml:",omitempty"`
	ScreenshotLink []string          `json:"screenshot_link" mapstructure:"screenshot_link" yaml:"screenshot_link,omitempty"`
	StoreAppID     string            `json:"store_app_id,omitempty" mapstructure:"store_app_id" yaml:"store_app_id,omitempty"`
	Tagline        map[string]string `json:"tagline"`
	Thumbnail      string            `json:"thumbnail"`
	Title          map[string]string `json:"title"`
}

type ComposeAppWithStoreInfo

type ComposeAppWithStoreInfo struct {
	// Compose See [Compose Specification](https://compose-spec.io) for the schema structure of `ComposeApp`.
	Status          string              `json:"status,omitempty"`
	StoreInfo       ComposeAppStoreInfo `json:"store_info,omitempty"`
	UpdateAvailable bool                `json:"update_available,omitempty" yaml:",omitempty"`
}

type DeviceInfo

type DeviceInfo struct {
	LanIpv4     []string            `json:"lan_ipv4"`
	Port        int                 `json:"port"`
	DeviceName  string              `json:"device_name"`
	DeviceModel string              `json:"device_model"`
	Initialized bool                `json:"initialized"`
	OS_Version  string              `json:"os_version"`
	Hash        string              `json:"hash"`
	RequestIp   string              `json:"request_ip,omitempty"`
	TB_Ipv4     []string            `json:"tb_ipv4"`
	Ip4         []map[string]string `json:"ip4"`
}

type HotspotConfig

type HotspotConfig struct {
	SSID     string `json:"ssid"`
	Password string `json:"password,omitempty"`
	Channel  int    `json:"channel,omitempty"`
}

HotspotConfig is the unified AP config for a single interface (stored in network-config.json)

type IPv4Config

type IPv4Config struct {
	Method  string   `json:"method"` // "static", "dhcp", "manual"
	Address string   `json:"address,omitempty"`
	Netmask string   `json:"netmask,omitempty"`
	Gateway string   `json:"gateway,omitempty"`
	DNS     []string `json:"dns,omitempty"`
}

type NetworkInterface

type NetworkInterface struct {
	Name          string          `json:"name"`
	Type          string          `json:"type"`       // "ethernet", "bridge", "wifi", "thunderbolt"
	IsVirtual     bool            `json:"is_virtual"` // true for br-*, docker0, etc.
	MAC           string          `json:"mac"`
	Speed         string          `json:"speed,omitempty"` // e.g. "1000", "20000"
	State         string          `json:"state"`           // "up", "down"
	IPv4          *IPv4Config     `json:"ipv4,omitempty"`
	Wireless      *WirelessConfig `json:"wireless,omitempty"`
	Zone          string          `json:"zone,omitempty"`          // "lan", "wan", or ""
	Ports         []string        `json:"ports,omitempty"`         // for bridges, which ports are attached
	HybridCapable bool            `json:"hybridCapable,omitempty"` // WiFi card supports client+AP simultaneously
}

NetworkInterface represents a single network interface configuration. Type is auto-detected from sysfs: "ethernet", "wifi", "bridge", "thunderbolt".

type NetworkZone

type NetworkZone struct {
	Name       string   `json:"name"`
	Interfaces []string `json:"interfaces"`
}

type Result

type Result struct {
	Success int         `json:"success" example:"200"`
	Message string      `json:"message" example:"ok"`
	Data    interface{} `json:"data" example:"response result"`
}

type Route

type Route struct {
	Path   string `json:"path" binding:"required"`
	Target string `json:"target" binding:"required"`
}

type SSLConfigRequest

type SSLConfigRequest struct {
	Enabled  bool   `json:"enabled"`
	Port     string `json:"port"`
	Domain   string `json:"domain"`
	CertType string `json:"cert_type"`
}

type SSLConfigResponse

type SSLConfigResponse struct {
	Enabled        bool      `json:"enabled"`
	Port           string    `json:"port"`
	Domain         string    `json:"domain"`
	CertType       string    `json:"cert_type"`
	EffectiveTime  time.Time `json:"effective_time"`
	ExpirationTime time.Time `json:"expiration_time"`
}

type UnifiedInterfaceConfig

type UnifiedInterfaceConfig struct {
	Mode    string         `json:"mode"`           // "client", "ap", "concurrent"
	Zone    string         `json:"zone,omitempty"` // "lan", "wan", ""
	Client  *ClientConfig  `json:"client,omitempty"`
	Hotspot *HotspotConfig `json:"hotspot,omitempty"`
	IPv4    *IPv4Config    `json:"ipv4,omitempty"`
}

UnifiedInterfaceConfig is the single-source-of-truth for a network interface. One JSON file replaces the 3-4 separate config files.

type WirelessConfig

type WirelessConfig struct {
	Mode       string `json:"mode"` // "client", "ap", "concurrent"
	SSID       string `json:"ssid,omitempty"`
	ApSsid     string `json:"apSsid,omitempty"`
	Password   string `json:"password,omitempty"`   // client password (wpa-psk)
	ApPassword string `json:"apPassword,omitempty"` // AP/hotspot password
	Channel    int    `json:"channel,omitempty"`
	HybridMode bool   `json:"hybridMode,omitempty"`
}

Directories

Path Synopsis
@Author: LinkLeong link@icewhale.com
@Author: LinkLeong link@icewhale.com

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL