model

package
v0.3.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	Unpaired DeviceStatus = "unpaired"
	Paired   DeviceStatus = "paired"
	Pairable DeviceStatus = "pairable"

	DeviceClassiPhone  DeviceClass = "iPhone"
	DeviceClassiPad    DeviceClass = "iPad"
	DeviceClassAppleTV DeviceClass = "AppleTV"
)
View Source
const (
	MessageTypeInstall = 1
	MessageType2FA     = 2

	MessageTypeLogin = 1

	MessageTypePair        = 1
	MessageTypePairConfirm = 2
)

Message.Type

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountDevice added in v0.3.0

type AccountDevice struct {
	DeviceID       string `json:"deviceId"`
	Name           string `json:"name"`
	DeviceNumber   string `json:"deviceNumber"`
	DevicePlatform string `json:"devicePlatform"`
	Status         string `json:"status"`
	DeviceClass    string `json:"deviceClass"`
	ExpirationDate string `json:"expirationDate"`
}

type Accounts added in v0.3.0

type Accounts struct {
	Accounts map[string]AppleAccount `json:"accounts"`
}

type AppleAccount added in v0.3.0

type AppleAccount struct {
	Email  string `json:"email,omitempty"`
	Status string `json:"status,omitempty"`
}

type Certificate added in v0.3.0

type Certificate struct {
	SerialNumber   string `json:"serialNumber"`
	Name           string `json:"name"`
	MachineName    string `json:"machineName"`
	Status         string `json:"status"`
	InUse          bool   `json:"inUse"`
	Type           string `json:"type"`
	ExpirationDate string `json:"expirationDate"`
	CreatedDate    string `json:"createdDate"`
}

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"`
	DeviceClass    string       `json:"device_class"`
	ProductType    string       `json:"product_type"`
	ProductVersion string       `json:"product_version"`
}

func (*Device) IsIPhone added in v0.3.0

func (d *Device) IsIPhone() bool

func (*Device) ParseDeviceClass added in v0.3.0

func (d *Device) ParseDeviceClass()

type DeviceClass added in v0.3.0

type DeviceClass string

type DeviceInfo added in v0.3.0

type DeviceInfo struct {
	UniqueDeviceID string `json:"unique_device_id"`
	DeviceName     string `json:"device_name"`
	DeviceClass    string `json:"device_class"`
	ProductName    string `json:"product_name"`
	ProductType    string `json:"product_type"`
	ProductVersion string `json:"product_version"`
	SerialNumber   string `json:"serial_number"`
	WiFiAddress    string `json:"wifi_address"`
}

type DeviceStatus

type DeviceStatus string

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"`
	DeviceClass      string     `json:"device_class"`
	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"`
	ExpirationDate   *time.Time `json:"expiration_date"`
	RefreshedResult  bool       `json:"refreshed_result"`
	Icon             string     `json:"icon"`
	BundleIdentifier string     `json:"bundle_identifier"`
	Version          string     `json:"version"`
	RemoveExtensions bool       `json:"remove_extensions"`
	Enabled          bool       `json:"enabled,omitempty"`
}

func (InstalledApp) IsIPhoneApp added in v0.3.0

func (t InstalledApp) IsIPhoneApp() bool

func (InstalledApp) MarshalJSON

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

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

func (InstalledApp) MaskAccount added in v0.2.5

func (t InstalledApp) MaskAccount() string

func (InstalledApp) NeedRefresh added in v0.3.0

func (t InstalledApp) NeedRefresh() bool

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 MobileProvisioningProfile added in v0.3.0

type MobileProvisioningProfile struct {
	AppIDName      string
	CreationDate   time.Time
	ExpirationDate time.Time
	Name           string
	TeamName       string
	UUID           string
	Version        int
}

func NewMobileProvisioningProfile added in v0.3.0

func NewMobileProvisioningProfile(data []byte) (*MobileProvisioningProfile, error)

func ParseMobileProvisioningProfile added in v0.3.0

func ParseMobileProvisioningProfile(data []byte) (*MobileProvisioningProfile, error)

func ParseMobileProvisioningProfileFile added in v0.3.0

func ParseMobileProvisioningProfileFile(path string) (*MobileProvisioningProfile, error)

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