Add wg-quick related model properties.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// Address+CoreDataClass.swift
|
||||
// Wireguard
|
||||
//
|
||||
// Created by Jeroen Leenarts on 24-05-18.
|
||||
// Copyright © 2018 Wireguard. All rights reserved.
|
||||
//
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import CoreData
|
||||
|
||||
@objc(Address)
|
||||
public class Address: NSManagedObject {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// Address+CoreDataProperties.swift
|
||||
// Wireguard
|
||||
//
|
||||
// Created by Jeroen Leenarts on 24-05-18.
|
||||
// Copyright © 2018 Wireguard. All rights reserved.
|
||||
//
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import CoreData
|
||||
|
||||
extension Address {
|
||||
|
||||
@nonobjc public class func fetchRequest() -> NSFetchRequest<Address> {
|
||||
return NSFetchRequest<Address>(entityName: "Address")
|
||||
}
|
||||
|
||||
@NSManaged public var address: String?
|
||||
@NSManaged public var interface: Interface?
|
||||
|
||||
}
|
||||
@@ -1,8 +1,9 @@
|
||||
//
|
||||
// Interface+CoreDataProperties.swift
|
||||
//
|
||||
// Wireguard
|
||||
//
|
||||
// Created by Jeroen Leenarts on 23-05-18.
|
||||
// Created by Jeroen Leenarts on 24-05-18.
|
||||
// Copyright © 2018 Wireguard. All rights reserved.
|
||||
//
|
||||
//
|
||||
|
||||
@@ -15,9 +16,30 @@ extension Interface {
|
||||
return NSFetchRequest<Interface>(entityName: "Interface")
|
||||
}
|
||||
|
||||
@NSManaged public var privateKey: String?
|
||||
@NSManaged public var listenPort: Int16
|
||||
@NSManaged public var fwMark: Int32
|
||||
@NSManaged public var listenPort: Int16
|
||||
@NSManaged public var privateKey: String?
|
||||
@NSManaged public var mtu: Int32
|
||||
@NSManaged public var dns: String?
|
||||
@NSManaged public var table: String?
|
||||
@NSManaged public var profile: Profile?
|
||||
@NSManaged public var adresses: NSSet?
|
||||
|
||||
}
|
||||
|
||||
// MARK: Generated accessors for adresses
|
||||
extension Interface {
|
||||
|
||||
@objc(addAdressesObject:)
|
||||
@NSManaged public func addToAdresses(_ value: Address)
|
||||
|
||||
@objc(removeAdressesObject:)
|
||||
@NSManaged public func removeFromAdresses(_ value: Address)
|
||||
|
||||
@objc(addAdresses:)
|
||||
@NSManaged public func addToAdresses(_ values: NSSet)
|
||||
|
||||
@objc(removeAdresses:)
|
||||
@NSManaged public func removeFromAdresses(_ values: NSSet)
|
||||
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@
|
||||
import Foundation
|
||||
import CoreData
|
||||
|
||||
|
||||
extension Profile {
|
||||
|
||||
@nonobjc public class func fetchRequest() -> NSFetchRequest<Profile> {
|
||||
|
||||
@@ -1,9 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="14133" systemVersion="17E202" minimumToolsVersion="Automatic" sourceLanguage="Swift" userDefinedModelVersionIdentifier="">
|
||||
<entity name="Address" representedClassName="Address" syncable="YES">
|
||||
<attribute name="address" optional="YES" attributeType="String" syncable="YES"/>
|
||||
<relationship name="interface" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Interface" inverseName="adresses" inverseEntity="Interface" syncable="YES"/>
|
||||
</entity>
|
||||
<entity name="Interface" representedClassName="Interface" syncable="YES">
|
||||
<attribute name="dns" optional="YES" attributeType="String" syncable="YES"/>
|
||||
<attribute name="fwMark" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
|
||||
<attribute name="listenPort" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
|
||||
<attribute name="mtu" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES" syncable="YES"/>
|
||||
<attribute name="privateKey" attributeType="String" syncable="YES"/>
|
||||
<attribute name="table" optional="YES" attributeType="String" syncable="YES"/>
|
||||
<relationship name="adresses" toMany="YES" deletionRule="Cascade" destinationEntity="Address" inverseName="interface" inverseEntity="Address" syncable="YES"/>
|
||||
<relationship name="profile" maxCount="1" deletionRule="Nullify" destinationEntity="Profile" inverseName="interface" inverseEntity="Profile" syncable="YES"/>
|
||||
</entity>
|
||||
<entity name="Peer" representedClassName="Peer" syncable="YES">
|
||||
@@ -20,8 +28,9 @@
|
||||
<relationship name="peers" toMany="YES" minCount="1" deletionRule="Cascade" destinationEntity="Peer" inverseName="profile" inverseEntity="Peer" syncable="YES"/>
|
||||
</entity>
|
||||
<elements>
|
||||
<element name="Profile" positionX="-63" positionY="-18" width="128" height="90"/>
|
||||
<element name="Interface" positionX="-54" positionY="-9" width="128" height="105"/>
|
||||
<element name="Interface" positionX="-54" positionY="-9" width="128" height="165"/>
|
||||
<element name="Peer" positionX="-36" positionY="9" width="128" height="135"/>
|
||||
<element name="Profile" positionX="-63" positionY="-18" width="128" height="90"/>
|
||||
<element name="Address" positionX="-54" positionY="45" width="128" height="75"/>
|
||||
</elements>
|
||||
</model>
|
||||
Reference in New Issue
Block a user