model

package
v0.2.8 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2026 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MessageTypeInstall = 1
	MessageType2FA     = 2

	MessageTypePair        = 1
	MessageTypePairConfirm = 2
)

Message.Type

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	ID             string       `json:"id"`
	Name           string       `json:"name"`
	ServiceName    string       `json:"service_name"`
	IP             string       `json:"ip"`
	MacAddr        string       `json:"mac_addr"`
	UDID           string       `json:"udid"`
	Status         DeviceStatus `json:"status"`
	Enable         bool         `json:"enable"`
	Message        string       `json:"message"`
	ProductClass   string       `json:"product_class"`
	ProductType    string       `json:"product_type"`
	ProductVersion string       `json:"product_version"`
}

type DeviceStatus

type DeviceStatus string
const (
	Unpaired DeviceStatus = "unpaired"
	Paired   DeviceStatus = "paired"
	Pairable DeviceStatus = "pairable"
)

type InstalledApp

type InstalledApp struct {
	gorm.Model

	IpaName          string     `json:"ipa_name"`
	IpaPath          string     `json:"ipa_path"`
	Description      string     `json:"description,omitempty"`
	Device           string     `json:"device"`
	UDID             string     `gorm:"column:udid" json:"udid"`
	Account          string     `json:"account"`
	Password         string     `json:"password"`
	InstalledDate    *time.Time `json:"installed_date"`
	RefreshedDate    *time.Time `json:"refreshed_date"`
	RefreshedResult  bool       `json:"refreshed_result"`
	Icon             string     `json:"icon"`
	BundleIdentifier string     `json:"bundle_identifier"`
	Version          string     `json:"version"`
	Enabled          bool       `json:"enabled,omitempty"`
}

func (InstalledApp) MarshalJSON

func (t InstalledApp) MarshalJSON() ([]byte, error)

输出json时,清空密码字段,提高安全性

func (InstalledApp) MaskAccount added in v0.2.5

func (t InstalledApp) MaskAccount() string

type IpaFile

type IpaFile struct {
	Name             string `json:"name"`
	Path             string `json:"path"`
	Icon             string `json:"icon"`
	BundleIdentifier string `json:"bundle_identifier"`
	Version          string `json:"version"`
}

type LockdownDevice

type LockdownDevice struct {
	Name           string `json:"name"`
	WiFiMACAddress string `json:"wifi_mac_address"`
}

type Message added in v0.2.1

type Message struct {
	Type int    `json:"t"`
	Data string `json:"d"`
}

Message Websocket Communication data format

type ServiceStatus

type ServiceStatus struct {
	Name    string `json:"name"`
	Running bool   `json:"running"`
}

type UsbmuxdDevice

type UsbmuxdDevice struct {
	DeviceName           string `json:"DeviceName,omitempty"`
	ProductVersion       string `json:"ProductVersion,omitempty"`
	ProductType          string `json:"ProductType,omitempty"`
	ModelNumber          string `json:"ModelNumber,omitempty"`
	SerialNumber         string `json:"SerialNumber,omitempty"`
	PhoneNumber          string `json:"PhoneNumber,omitempty"`
	CPUArchitecture      string `json:"CPUArchitecture,omitempty"`
	ProductName          string `json:"ProductName,omitempty"`
	ProtocolVersion      string `json:"ProtocolVersion,omitempty"`
	RegionInfo           string `json:"RegionInfo,omitempty"`
	TimeIntervalSince197 string `json:"TimeIntervalSince197,omitempty"`
	TimeZone             string `json:"TimeZone,omitempty"`
	UniqueDeviceID       string `json:"UniqueDeviceID,omitempty"`
	WiFiAddress          string `json:"WiFiAddress,omitempty"`
	BluetoothAddress     string `json:"BluetoothAddress,omitempty"`
	BasebandVersion      string `json:"BasebandVersion,omitempty"`
	DeviceColor          string `json:"DeviceColor,omitempty"`
	DeviceClass          string `json:"DeviceClass,omitempty"`
}

type UsbmuxdImage

type UsbmuxdImage struct {
	Device UsbmuxdDevice

	VersionMajor              int    `json:"VersionMajor"`
	VersionMinor              int    `json:"VersionMinor"`
	ImageMounted              bool   `json:"ImageMounted,omitempty"`
	DeveloperDiskImageUrl     string `json:"DeveloperDiskImageUrl,omitempty"`
	DeveloperDiskImageVersion string `json:"DeveloperDiskImageVersion,omitempty"`
}

func NewUsbmuxdImage

func NewUsbmuxdImage(device UsbmuxdDevice, imageSource string) *UsbmuxdImage

Jump to

Keyboard shortcuts

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