Documentation
¶
Overview ¶
Package model contains the IPSW model for the database.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("not found") ErrSymExists = errors.New("symbol exists") )
Functions ¶
This section is empty.
Types ¶
type DyldSharedCache ¶
type DyldSharedCache struct {
}
DyldSharedCache is the model for a dyld_shared_cache.
type Entitlement ¶
type Entitlement struct {
ID uint64 `gorm:"primaryKey" json:"id"`
IpswID string `gorm:"uniqueIndex:idx_unique_entitlement,priority:1;not null" json:"ipsw_id"`
PathID uint `gorm:"uniqueIndex:idx_unique_entitlement,priority:2;not null" json:"path_id"`
KeyID uint `gorm:"uniqueIndex:idx_unique_entitlement,priority:3;not null" json:"key_id"`
ValueID uint `gorm:"uniqueIndex:idx_unique_entitlement,priority:4;not null" json:"value_id"`
// Foreign key relationships
Ipsw *Ipsw `gorm:"foreignKey:IpswID" json:"ipsw,omitempty"`
Path *Path `gorm:"foreignKey:PathID" json:"path,omitempty"`
Key *EntitlementKey `gorm:"foreignKey:KeyID" json:"key,omitempty"`
Value *EntitlementValue `gorm:"foreignKey:ValueID" json:"value,omitempty"`
}
Entitlement represents the mapping between keys, values, paths and IPSWs
func (Entitlement) TableName ¶
func (Entitlement) TableName() string
TableName returns the table name for Entitlement
type EntitlementKey ¶
type EntitlementKey struct {
ID uint `gorm:"primaryKey" json:"id"`
Key string `gorm:"type:text;uniqueIndex;not null" json:"key"`
}
EntitlementKey represents unique entitlement keys
func (EntitlementKey) TableName ¶
func (EntitlementKey) TableName() string
TableName returns the table name for EntitlementKey
type EntitlementQuery ¶
type EntitlementQuery struct {
Version string
Build string
Device string
KeyPattern string
ValuePattern string
FilePath string
}
EntitlementQuery represents query parameters for searching entitlements
type EntitlementValue ¶
type EntitlementValue struct {
ID uint `gorm:"primaryKey" json:"id"`
Value string `gorm:"type:text;not null" json:"value"`
ValueType string `gorm:"type:varchar(10);not null;check:value_type IN ('bool','string','array','dict','number')" json:"value_type"`
ValueHash string `gorm:"type:char(16);uniqueIndex;not null" json:"value_hash"` // Shortened hash for uniqueness
}
EntitlementValue represents unique entitlement values with their types
func (EntitlementValue) TableName ¶
func (EntitlementValue) TableName() string
TableName returns the table name for EntitlementValue
type Ipsw ¶
type Ipsw struct {
ID string `gorm:"primaryKey" json:"id"`
Name string `json:"name,omitempty"`
Version string `gorm:"index:idx_platform_version,priority:2" json:"version,omitempty"`
BuildID string `gorm:"column:buildid" json:"buildid,omitempty"`
Platform Platform `gorm:"type:varchar(20);index:idx_platform_version,priority:1" json:"platform,omitempty"`
Devices []*Device `gorm:"many2many:ipsw_devices;" json:"devices,omitempty"`
Kernels []*Kernelcache `gorm:"many2many:ipsw_kernels;" json:"kernels,omitempty"`
DSCs []*DyldSharedCache `gorm:"many2many:ipsw_dscs;" json:"dscs,omitempty"`
FileSystem []*Macho `gorm:"many2many:ipsw_files;" json:"file_system,omitempty"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt gorm.DeletedAt `gorm:"index"`
}
Ipsw is the model for an Ipsw file.
type Kernelcache ¶
type Kernelcache struct {
UUID string `gorm:"primaryKey" json:"uuid"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt gorm.DeletedAt `gorm:"index" json:"deleted_at"`
Version string `json:"version,omitempty"`
Kexts []*Macho `gorm:"many2many:kernelcache_kexts;" json:"kexts,omitempty"`
}
Kernelcache is the model for a kernelcache.
type Macho ¶
type Macho struct {
UUID string `gorm:"primaryKey" json:"uuid"`
// swagger:ignore
PathID uint
Path Path `gorm:"foreignKey:PathID"`
TextStart uint64 `gorm:"type:bigint" json:"text_start,omitempty"`
TextEnd uint64 `gorm:"type:bigint" json:"text_end,omitempty"`
Symbols []*Symbol `gorm:"many2many:macho_syms;"`
}
Click to show internal directories.
Click to hide internal directories.