mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-03 23:34:13 +00:00
[Swift] Optional Scalars Preparation (#6028)
* Perpares swift to take optional scalars + adds optional string helper method + disables linters in generated code * Small fix for generated code * Update grpc support to alpha 17 for swift
This commit is contained in:
@@ -65,23 +65,23 @@ public extension MonsterStorageProvider {
|
||||
func handleMethod(_ methodName: String, callHandlerContext: CallHandlerContext) -> GRPCCallHandler? {
|
||||
switch methodName {
|
||||
case "Store":
|
||||
return UnaryCallHandler(callHandlerContext: callHandlerContext) { context in
|
||||
return CallHandlerFactory.makeUnary(callHandlerContext: callHandlerContext) { context in
|
||||
return { request in
|
||||
self.Store(request, context: context)
|
||||
}
|
||||
}
|
||||
case "Retrieve":
|
||||
return ServerStreamingCallHandler(callHandlerContext: callHandlerContext) { context in
|
||||
return CallHandlerFactory.makeServerStreaming(callHandlerContext: callHandlerContext) { context in
|
||||
return { request in
|
||||
self.Retrieve(request: request, context: context)
|
||||
}
|
||||
}
|
||||
case "GetMaxHitPoint":
|
||||
return ClientStreamingCallHandler(callHandlerContext: callHandlerContext) { context in
|
||||
return CallHandlerFactory.makeClientStreaming(callHandlerContext: callHandlerContext) { context in
|
||||
self.GetMaxHitPoint(context: context)
|
||||
}
|
||||
case "GetMinMaxHitPoints":
|
||||
return BidirectionalStreamingCallHandler(callHandlerContext: callHandlerContext) { context in
|
||||
return CallHandlerFactory.makeBidirectionalStreaming(callHandlerContext: callHandlerContext) { context in
|
||||
self.GetMinMaxHitPoints(context: context)
|
||||
}
|
||||
default: return nil;
|
||||
|
||||
Reference in New Issue
Block a user