summaryrefslogtreecommitdiff
path: root/grpc
diff options
context:
space:
mode:
authormustiikhalil <mustii@mmk.one>2021-05-14 20:59:28 +0300
committerGitHub <noreply@github.com>2021-05-14 20:59:28 +0300
commita5175c513a192ffd50fbfb1574817bb99b3e20cc (patch)
treeae8f4c3d6ac9637e809a588c85322fda6ce784ef /grpc
parent04b10f5a3a78aed27030a4e26dcf36921979114f (diff)
downloadflatbuffers-a5175c513a192ffd50fbfb1574817bb99b3e20cc.tar.gz
flatbuffers-a5175c513a192ffd50fbfb1574817bb99b3e20cc.tar.bz2
flatbuffers-a5175c513a192ffd50fbfb1574817bb99b3e20cc.zip
Implements verifier and code gen for swift (#6373)
Updates test cases on linux Adhere to new protocol naming Adds fuzzing Adds documentation Adds support for string unions Updated fuzzer generated code
Diffstat (limited to 'grpc')
-rw-r--r--grpc/examples/swift/Greeter/Sources/Model/greeter_generated.swift16
1 files changed, 14 insertions, 2 deletions
diff --git a/grpc/examples/swift/Greeter/Sources/Model/greeter_generated.swift b/grpc/examples/swift/Greeter/Sources/Model/greeter_generated.swift
index 8914d983..bc1eca3c 100644
--- a/grpc/examples/swift/Greeter/Sources/Model/greeter_generated.swift
+++ b/grpc/examples/swift/Greeter/Sources/Model/greeter_generated.swift
@@ -4,7 +4,7 @@
import FlatBuffers
-public struct models_HelloReply: FlatBufferObject {
+public struct models_HelloReply: FlatBufferObject, Verifiable {
static func validateVersion() { FlatBuffersVersion_2_0_0() }
public var __buffer: ByteBuffer! { return _accessor.bb }
@@ -34,9 +34,15 @@ public struct models_HelloReply: FlatBufferObject {
models_HelloReply.add(message: message, &fbb)
return models_HelloReply.endHelloReply(&fbb, start: __start)
}
+
+ public static func verify<T>(_ verifier: inout Verifier, at position: Int, of type: T.Type) throws where T: Verifiable {
+ var _v = try verifier.visitTable(at: position)
+ try _v.visit(field: VTOFFSET.message.p, fieldName: "message", required: false, type: ForwardOffset<String>.self)
+ _v.finish()
+ }
}
-public struct models_HelloRequest: FlatBufferObject {
+public struct models_HelloRequest: FlatBufferObject, Verifiable {
static func validateVersion() { FlatBuffersVersion_2_0_0() }
public var __buffer: ByteBuffer! { return _accessor.bb }
@@ -66,5 +72,11 @@ public struct models_HelloRequest: FlatBufferObject {
models_HelloRequest.add(name: name, &fbb)
return models_HelloRequest.endHelloRequest(&fbb, start: __start)
}
+
+ public static func verify<T>(_ verifier: inout Verifier, at position: Int, of type: T.Type) throws where T: Verifiable {
+ var _v = try verifier.visitTable(at: position)
+ try _v.visit(field: VTOFFSET.name.p, fieldName: "name", required: false, type: ForwardOffset<String>.self)
+ _v.finish()
+ }
}