mirror of
https://github.com/leonboe1/QuickDrop.git
synced 2026-11-19 12:56:06 +00:00
Update generated protobuf
This commit is contained in:
1 parent
44d8ac059b
commit
46c44e800c
11 files changed
+1040
-5134
No files matched your search
@@ -1,5 +1,6 @@
|
||||
// DO NOT EDIT.
|
||||
// swift-format-ignore-file
|
||||
// swiftlint:disable all
|
||||
//
|
||||
// Generated by the Swift generator plugin for the protocol buffer compiler.
|
||||
// Source: ukey.proto
|
||||
@@ -34,48 +35,22 @@ fileprivate struct _GeneratedWithProtocGenSwiftVersion: SwiftProtobuf.ProtobufAP
|
||||
typealias Version = _2
|
||||
}
|
||||
|
||||
enum Securegcm_Ukey2HandshakeCipher: SwiftProtobuf.Enum {
|
||||
typealias RawValue = Int
|
||||
case reserved // = 0
|
||||
enum Securegcm_Ukey2HandshakeCipher: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
case reserved = 0
|
||||
|
||||
/// NIST P-256 used for ECDH, SHA512 used for
|
||||
case p256Sha512 // = 100
|
||||
case p256Sha512 = 100
|
||||
|
||||
/// commitment
|
||||
case curve25519Sha512 // = 200
|
||||
case curve25519Sha512 = 200
|
||||
|
||||
init() {
|
||||
self = .reserved
|
||||
}
|
||||
|
||||
init?(rawValue: Int) {
|
||||
switch rawValue {
|
||||
case 0: self = .reserved
|
||||
case 100: self = .p256Sha512
|
||||
case 200: self = .curve25519Sha512
|
||||
default: return nil
|
||||
}
|
||||
}
|
||||
|
||||
var rawValue: Int {
|
||||
switch self {
|
||||
case .reserved: return 0
|
||||
case .p256Sha512: return 100
|
||||
case .curve25519Sha512: return 200
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
||||
extension Securegcm_Ukey2HandshakeCipher: CaseIterable {
|
||||
// Support synthesized by the compiler.
|
||||
}
|
||||
|
||||
#endif // swift(>=4.2)
|
||||
|
||||
struct Securegcm_Ukey2Message {
|
||||
struct Securegcm_Ukey2Message: Sendable {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
@@ -102,39 +77,17 @@ struct Securegcm_Ukey2Message {
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
enum TypeEnum: SwiftProtobuf.Enum {
|
||||
typealias RawValue = Int
|
||||
case unknownDoNotUse // = 0
|
||||
case alert // = 1
|
||||
case clientInit // = 2
|
||||
case serverInit // = 3
|
||||
case clientFinish // = 4
|
||||
enum TypeEnum: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
case unknownDoNotUse = 0
|
||||
case alert = 1
|
||||
case clientInit = 2
|
||||
case serverInit = 3
|
||||
case clientFinish = 4
|
||||
|
||||
init() {
|
||||
self = .unknownDoNotUse
|
||||
}
|
||||
|
||||
init?(rawValue: Int) {
|
||||
switch rawValue {
|
||||
case 0: self = .unknownDoNotUse
|
||||
case 1: self = .alert
|
||||
case 2: self = .clientInit
|
||||
case 3: self = .serverInit
|
||||
case 4: self = .clientFinish
|
||||
default: return nil
|
||||
}
|
||||
}
|
||||
|
||||
var rawValue: Int {
|
||||
switch self {
|
||||
case .unknownDoNotUse: return 0
|
||||
case .alert: return 1
|
||||
case .clientInit: return 2
|
||||
case .serverInit: return 3
|
||||
case .clientFinish: return 4
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
init() {}
|
||||
@@ -143,15 +96,7 @@ struct Securegcm_Ukey2Message {
|
||||
fileprivate var _messageData: Data? = nil
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
||||
extension Securegcm_Ukey2Message.TypeEnum: CaseIterable {
|
||||
// Support synthesized by the compiler.
|
||||
}
|
||||
|
||||
#endif // swift(>=4.2)
|
||||
|
||||
struct Securegcm_Ukey2Alert {
|
||||
struct Securegcm_Ukey2Alert: Sendable {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
@@ -176,74 +121,42 @@ struct Securegcm_Ukey2Alert {
|
||||
|
||||
var unknownFields = SwiftProtobuf.UnknownStorage()
|
||||
|
||||
enum AlertType: SwiftProtobuf.Enum {
|
||||
typealias RawValue = Int
|
||||
enum AlertType: Int, SwiftProtobuf.Enum, Swift.CaseIterable {
|
||||
|
||||
/// Framing errors
|
||||
case badMessage // = 1
|
||||
case badMessage = 1
|
||||
|
||||
/// message_type has an undefined value
|
||||
case badMessageType // = 2
|
||||
case badMessageType = 2
|
||||
|
||||
/// message_type received does not correspond to
|
||||
case incorrectMessage // = 3
|
||||
case incorrectMessage = 3
|
||||
|
||||
/// expected type at this stage of the protocol
|
||||
case badMessageData // = 4
|
||||
case badMessageData = 4
|
||||
|
||||
/// ClientInit and ServerInit errors
|
||||
case badVersion // = 100
|
||||
case badVersion = 100
|
||||
|
||||
/// suitable version to speak with client.
|
||||
case badRandom // = 101
|
||||
case badRandom = 101
|
||||
|
||||
/// length
|
||||
case badHandshakeCipher // = 102
|
||||
case badHandshakeCipher = 102
|
||||
|
||||
/// The next protocol is missing, unknown, or
|
||||
case badNextProtocol // = 103
|
||||
case badNextProtocol = 103
|
||||
|
||||
/// unsupported
|
||||
case badPublicKey // = 104
|
||||
case badPublicKey = 104
|
||||
|
||||
/// Other errors
|
||||
case internalError // = 200
|
||||
case internalError = 200
|
||||
|
||||
init() {
|
||||
self = .badMessage
|
||||
}
|
||||
|
||||
init?(rawValue: Int) {
|
||||
switch rawValue {
|
||||
case 1: self = .badMessage
|
||||
case 2: self = .badMessageType
|
||||
case 3: self = .incorrectMessage
|
||||
case 4: self = .badMessageData
|
||||
case 100: self = .badVersion
|
||||
case 101: self = .badRandom
|
||||
case 102: self = .badHandshakeCipher
|
||||
case 103: self = .badNextProtocol
|
||||
case 104: self = .badPublicKey
|
||||
case 200: self = .internalError
|
||||
default: return nil
|
||||
}
|
||||
}
|
||||
|
||||
var rawValue: Int {
|
||||
switch self {
|
||||
case .badMessage: return 1
|
||||
case .badMessageType: return 2
|
||||
case .incorrectMessage: return 3
|
||||
case .badMessageData: return 4
|
||||
case .badVersion: return 100
|
||||
case .badRandom: return 101
|
||||
case .badHandshakeCipher: return 102
|
||||
case .badNextProtocol: return 103
|
||||
case .badPublicKey: return 104
|
||||
case .internalError: return 200
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
init() {}
|
||||
@@ -252,15 +165,7 @@ struct Securegcm_Ukey2Alert {
|
||||
fileprivate var _errorMessage: String? = nil
|
||||
}
|
||||
|
||||
#if swift(>=4.2)
|
||||
|
||||
extension Securegcm_Ukey2Alert.AlertType: CaseIterable {
|
||||
// Support synthesized by the compiler.
|
||||
}
|
||||
|
||||
#endif // swift(>=4.2)
|
||||
|
||||
struct Securegcm_Ukey2ClientInit {
|
||||
struct Securegcm_Ukey2ClientInit: Sendable {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
@@ -301,7 +206,7 @@ struct Securegcm_Ukey2ClientInit {
|
||||
|
||||
/// One commitment (hash of ClientFinished containing public key) per supported
|
||||
/// cipher
|
||||
struct CipherCommitment {
|
||||
struct CipherCommitment: Sendable {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
@@ -339,7 +244,7 @@ struct Securegcm_Ukey2ClientInit {
|
||||
fileprivate var _nextProtocol: String? = nil
|
||||
}
|
||||
|
||||
struct Securegcm_Ukey2ServerInit {
|
||||
struct Securegcm_Ukey2ServerInit: Sendable {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
@@ -393,7 +298,7 @@ struct Securegcm_Ukey2ServerInit {
|
||||
fileprivate var _publicKey: Data? = nil
|
||||
}
|
||||
|
||||
struct Securegcm_Ukey2ClientFinished {
|
||||
struct Securegcm_Ukey2ClientFinished: Sendable {
|
||||
// SwiftProtobuf.Message conformance is added in an extension below. See the
|
||||
// `Message` and `Message+*Additions` files in the SwiftProtobuf library for
|
||||
// methods supported on all messages.
|
||||
@@ -415,36 +320,17 @@ struct Securegcm_Ukey2ClientFinished {
|
||||
fileprivate var _publicKey: Data? = nil
|
||||
}
|
||||
|
||||
#if swift(>=5.5) && canImport(_Concurrency)
|
||||
extension Securegcm_Ukey2HandshakeCipher: @unchecked Sendable {}
|
||||
extension Securegcm_Ukey2Message: @unchecked Sendable {}
|
||||
extension Securegcm_Ukey2Message.TypeEnum: @unchecked Sendable {}
|
||||
extension Securegcm_Ukey2Alert: @unchecked Sendable {}
|
||||
extension Securegcm_Ukey2Alert.AlertType: @unchecked Sendable {}
|
||||
extension Securegcm_Ukey2ClientInit: @unchecked Sendable {}
|
||||
extension Securegcm_Ukey2ClientInit.CipherCommitment: @unchecked Sendable {}
|
||||
extension Securegcm_Ukey2ServerInit: @unchecked Sendable {}
|
||||
extension Securegcm_Ukey2ClientFinished: @unchecked Sendable {}
|
||||
#endif // swift(>=5.5) && canImport(_Concurrency)
|
||||
|
||||
// MARK: - Code below here is support for the SwiftProtobuf runtime.
|
||||
|
||||
fileprivate let _protobuf_package = "securegcm"
|
||||
|
||||
extension Securegcm_Ukey2HandshakeCipher: SwiftProtobuf._ProtoNameProviding {
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
0: .same(proto: "RESERVED"),
|
||||
100: .same(proto: "P256_SHA512"),
|
||||
200: .same(proto: "CURVE25519_SHA512"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0RESERVED\0\u{2}d\u{1}P256_SHA512\0\u{2}d\u{1}CURVE25519_SHA512\0")
|
||||
}
|
||||
|
||||
extension Securegcm_Ukey2Message: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".Ukey2Message"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "message_type"),
|
||||
2: .standard(proto: "message_data"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}message_type\0\u{3}message_data\0")
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
@@ -482,21 +368,12 @@ extension Securegcm_Ukey2Message: SwiftProtobuf.Message, SwiftProtobuf._MessageI
|
||||
}
|
||||
|
||||
extension Securegcm_Ukey2Message.TypeEnum: SwiftProtobuf._ProtoNameProviding {
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
0: .same(proto: "UNKNOWN_DO_NOT_USE"),
|
||||
1: .same(proto: "ALERT"),
|
||||
2: .same(proto: "CLIENT_INIT"),
|
||||
3: .same(proto: "SERVER_INIT"),
|
||||
4: .same(proto: "CLIENT_FINISH"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{2}\0UNKNOWN_DO_NOT_USE\0\u{1}ALERT\0\u{1}CLIENT_INIT\0\u{1}SERVER_INIT\0\u{1}CLIENT_FINISH\0")
|
||||
}
|
||||
|
||||
extension Securegcm_Ukey2Alert: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".Ukey2Alert"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "type"),
|
||||
2: .standard(proto: "error_message"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}type\0\u{3}error_message\0")
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
@@ -534,28 +411,12 @@ extension Securegcm_Ukey2Alert: SwiftProtobuf.Message, SwiftProtobuf._MessageImp
|
||||
}
|
||||
|
||||
extension Securegcm_Ukey2Alert.AlertType: SwiftProtobuf._ProtoNameProviding {
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "BAD_MESSAGE"),
|
||||
2: .same(proto: "BAD_MESSAGE_TYPE"),
|
||||
3: .same(proto: "INCORRECT_MESSAGE"),
|
||||
4: .same(proto: "BAD_MESSAGE_DATA"),
|
||||
100: .same(proto: "BAD_VERSION"),
|
||||
101: .same(proto: "BAD_RANDOM"),
|
||||
102: .same(proto: "BAD_HANDSHAKE_CIPHER"),
|
||||
103: .same(proto: "BAD_NEXT_PROTOCOL"),
|
||||
104: .same(proto: "BAD_PUBLIC_KEY"),
|
||||
200: .same(proto: "INTERNAL_ERROR"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}BAD_MESSAGE\0\u{1}BAD_MESSAGE_TYPE\0\u{1}INCORRECT_MESSAGE\0\u{1}BAD_MESSAGE_DATA\0\u{2}`\u{1}BAD_VERSION\0\u{1}BAD_RANDOM\0\u{1}BAD_HANDSHAKE_CIPHER\0\u{1}BAD_NEXT_PROTOCOL\0\u{1}BAD_PUBLIC_KEY\0\u{2}`\u{1}INTERNAL_ERROR\0")
|
||||
}
|
||||
|
||||
extension Securegcm_Ukey2ClientInit: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".Ukey2ClientInit"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "version"),
|
||||
2: .same(proto: "random"),
|
||||
3: .standard(proto: "cipher_commitments"),
|
||||
4: .standard(proto: "next_protocol"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}version\0\u{1}random\0\u{3}cipher_commitments\0\u{3}next_protocol\0")
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
@@ -604,10 +465,7 @@ extension Securegcm_Ukey2ClientInit: SwiftProtobuf.Message, SwiftProtobuf._Messa
|
||||
|
||||
extension Securegcm_Ukey2ClientInit.CipherCommitment: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = Securegcm_Ukey2ClientInit.protoMessageName + ".CipherCommitment"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "handshake_cipher"),
|
||||
2: .same(proto: "commitment"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}handshake_cipher\0\u{1}commitment\0")
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
@@ -646,12 +504,7 @@ extension Securegcm_Ukey2ClientInit.CipherCommitment: SwiftProtobuf.Message, Swi
|
||||
|
||||
extension Securegcm_Ukey2ServerInit: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".Ukey2ServerInit"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .same(proto: "version"),
|
||||
2: .same(proto: "random"),
|
||||
3: .standard(proto: "handshake_cipher"),
|
||||
4: .standard(proto: "public_key"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{1}version\0\u{1}random\0\u{3}handshake_cipher\0\u{3}public_key\0")
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
@@ -700,9 +553,7 @@ extension Securegcm_Ukey2ServerInit: SwiftProtobuf.Message, SwiftProtobuf._Messa
|
||||
|
||||
extension Securegcm_Ukey2ClientFinished: SwiftProtobuf.Message, SwiftProtobuf._MessageImplementationBase, SwiftProtobuf._ProtoNameProviding {
|
||||
static let protoMessageName: String = _protobuf_package + ".Ukey2ClientFinished"
|
||||
static let _protobuf_nameMap: SwiftProtobuf._NameMap = [
|
||||
1: .standard(proto: "public_key"),
|
||||
]
|
||||
static let _protobuf_nameMap = SwiftProtobuf._NameMap(bytecode: "\0\u{3}public_key\0")
|
||||
|
||||
mutating func decodeMessage<D: SwiftProtobuf.Decoder>(decoder: inout D) throws {
|
||||
while let fieldNumber = try decoder.nextFieldNumber() {
|
||||
|
||||
Reference in new issue
Block a user