mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-27 10:02:19 +00:00
Adds proper access types for swift object api & flatbuffers & grpc (#6081)
Fixes accessor in greeter.swift Small fix for ci
This commit is contained in:
@@ -81,6 +81,7 @@ struct Service : public CommentHolder {
|
||||
|
||||
virtual std::vector<grpc::string> namespace_parts() const = 0;
|
||||
virtual grpc::string name() const = 0;
|
||||
virtual bool is_internal() const = 0;
|
||||
|
||||
virtual int method_count() const = 0;
|
||||
virtual std::unique_ptr<const Method> method(int i) const = 0;
|
||||
|
||||
@@ -125,7 +125,7 @@ void GenerateClientClass(const grpc_generator::Service *service,
|
||||
printer->Print("\t\tself.defaultCallOptions = defaultCallOptions\n");
|
||||
printer->Print("\t}");
|
||||
printer->Print("\n");
|
||||
vars["GenAccess"] = "public";
|
||||
vars["GenAccess"] = service->is_internal() ? "internal" : "public";
|
||||
for (auto it = 0; it < service->method_count(); it++) {
|
||||
auto method = service->method(it);
|
||||
vars["Input"] = GenerateMessage(method->get_input_namespace_parts(), method->get_input_type_name());
|
||||
@@ -259,7 +259,7 @@ grpc::string Generate(grpc_generator::File *file,
|
||||
if (!file->package().empty()) { vars["PATH"].append("."); }
|
||||
vars["ServiceQualifiedName"] = WrapInNameSpace(service->namespace_parts(), service->name());
|
||||
vars["ServiceName"] = service->name();
|
||||
vars["ACCESS"] = "public";
|
||||
vars["ACCESS"] = service->is_internal() ? "internal" : "public";
|
||||
auto printer = file->CreatePrinter(&output);
|
||||
printer->Print(vars,
|
||||
"/// Usage: instantiate $ServiceQualifiedName$ServiceClient, then call "
|
||||
|
||||
Reference in New Issue
Block a user