[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:
mustiikhalil
2020-07-20 20:38:50 +03:00
committed by GitHub
parent 2e48c8dd31
commit ff1b73128d
12 changed files with 75 additions and 26 deletions

View File

@@ -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;