Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Source file greeter.ml
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223(********************************************************)(* AUTOGENERATED FILE - DO NOT EDIT! *)(********************************************************)(* Generated by: ocaml-protoc-plugin *)(* https://github.com/andersfugmann/ocaml-protoc-plugin *)(********************************************************)(*
Source: greeter.proto
Syntax: proto3
Parameters:
debug=false
annot='[@@deriving show { with_path = false }]'
opens=[]
int64_as_int=true
int32_as_int=true
fixed_as_int=false
singleton_record=false
prefix_output_with_package=false
*)[@@@ocaml.alert"-protobuf"](* Disable deprecation warnings for protobuf*)(**/**)moduleRuntime'=Ocaml_protoc_plugin[@@warning"-33"]moduleImported'modules=structend(**/**)modulerecMypackage:sig(** The request message containing the user's name. *)modulerecHelloRequest:sigtypet=(string)[@@derivingshow{with_path=false}]valmake:?name:string->unit->t(** Helper function to generate a message using default values *)valto_proto:t->Runtime'.Writer.t(** Serialize the message to binary format *)valfrom_proto:Runtime'.Reader.t->(t,[>Runtime'.Result.error])result(** Deserialize from binary format *)valto_json:Runtime'.Json_options.t->t->Runtime'.Json.t(** Serialize to Json (compatible with Yojson.Basic.t) *)valfrom_json:Runtime'.Json.t->(t,[>Runtime'.Result.error])result(** Deserialize from Json (compatible with Yojson.Basic.t) *)valname:unit->string(** Fully qualified protobuf name of this message *)(**/**)typemake_t=?name:string->unit->tvalmerge:t->t->tvalto_proto':Runtime'.Writer.t->t->unitvalfrom_proto_exn:Runtime'.Reader.t->tvalfrom_json_exn:Runtime'.Json.t->t(**/**)end(** The response message containing the greetings *)andHelloReply:sigtypet=(string)[@@derivingshow{with_path=false}]valmake:?message:string->unit->t(** Helper function to generate a message using default values *)valto_proto:t->Runtime'.Writer.t(** Serialize the message to binary format *)valfrom_proto:Runtime'.Reader.t->(t,[>Runtime'.Result.error])result(** Deserialize from binary format *)valto_json:Runtime'.Json_options.t->t->Runtime'.Json.t(** Serialize to Json (compatible with Yojson.Basic.t) *)valfrom_json:Runtime'.Json.t->(t,[>Runtime'.Result.error])result(** Deserialize from Json (compatible with Yojson.Basic.t) *)valname:unit->string(** Fully qualified protobuf name of this message *)(**/**)typemake_t=?message:string->unit->tvalmerge:t->t->tvalto_proto':Runtime'.Writer.t->t->unitvalfrom_proto_exn:Runtime'.Reader.t->tvalfrom_json_exn:Runtime'.Json.t->t(**/**)endmoduleGreeter:sigmoduleSayHello:sigincludeRuntime'.Service.RpcwithtypeRequest.t=HelloRequest.tandtypeResponse.t=HelloReply.tmoduleRequest:Runtime'.Spec.Messagewithtypet=HelloRequest.tandtypemake_t=HelloRequest.make_t(** Module alias for the request message for this method call *)moduleResponse:Runtime'.Spec.Messagewithtypet=HelloReply.tandtypemake_t=HelloReply.make_t(** Module alias for the response message for this method call *)endvalsayHello:(moduleRuntime'.Spec.Messagewithtypet=HelloRequest.t)*(moduleRuntime'.Spec.Messagewithtypet=HelloReply.t)endend=structmodulerecHelloRequest:sigtypet=(string)[@@derivingshow{with_path=false}]valmake:?name:string->unit->t(** Helper function to generate a message using default values *)valto_proto:t->Runtime'.Writer.t(** Serialize the message to binary format *)valfrom_proto:Runtime'.Reader.t->(t,[>Runtime'.Result.error])result(** Deserialize from binary format *)valto_json:Runtime'.Json_options.t->t->Runtime'.Json.t(** Serialize to Json (compatible with Yojson.Basic.t) *)valfrom_json:Runtime'.Json.t->(t,[>Runtime'.Result.error])result(** Deserialize from Json (compatible with Yojson.Basic.t) *)valname:unit->string(** Fully qualified protobuf name of this message *)(**/**)typemake_t=?name:string->unit->tvalmerge:t->t->tvalto_proto':Runtime'.Writer.t->t->unitvalfrom_proto_exn:Runtime'.Reader.t->tvalfrom_json_exn:Runtime'.Json.t->t(**/**)end=structmoduleThis'_=HelloRequestletname()=".mypackage.HelloRequest"typet=(string)[@@derivingshow{with_path=false}]typemake_t=?name:string->unit->tletmake?(name={||})()=(name)letmerge=letmerge_name=Runtime'.Merge.mergeRuntime'.Spec.(basic((1,"name","name"),string,({||})))infun(t1_name)(t2_name)->merge_namet1_namet2_nameletspec()=Runtime'.Spec.(basic((1,"name","name"),string,({||}))^::nil)letto_proto'=letserialize=Runtime'.apply_lazy(fun()->Runtime'.Serialize.serialize(spec()))infunwriter(name)->serializewriternameletto_protot=letwriter=Runtime'.Writer.init()into_proto'writert;writerletfrom_proto_exn=letconstructorname=(name)inRuntime'.apply_lazy(fun()->Runtime'.Deserialize.deserialize(spec())constructor)letfrom_protowriter=Runtime'.Result.catch(fun()->from_proto_exnwriter)letto_jsonoptions=letserialize=Runtime'.Serialize_json.serialize~message_name:(name())(spec())optionsinfun(name)->serializenameletfrom_json_exn=letconstructorname=(name)inRuntime'.apply_lazy(fun()->Runtime'.Deserialize_json.deserialize~message_name:(name())(spec())constructor)letfrom_jsonjson=Runtime'.Result.catch(fun()->from_json_exnjson)endandHelloReply:sigtypet=(string)[@@derivingshow{with_path=false}]valmake:?message:string->unit->t(** Helper function to generate a message using default values *)valto_proto:t->Runtime'.Writer.t(** Serialize the message to binary format *)valfrom_proto:Runtime'.Reader.t->(t,[>Runtime'.Result.error])result(** Deserialize from binary format *)valto_json:Runtime'.Json_options.t->t->Runtime'.Json.t(** Serialize to Json (compatible with Yojson.Basic.t) *)valfrom_json:Runtime'.Json.t->(t,[>Runtime'.Result.error])result(** Deserialize from Json (compatible with Yojson.Basic.t) *)valname:unit->string(** Fully qualified protobuf name of this message *)(**/**)typemake_t=?message:string->unit->tvalmerge:t->t->tvalto_proto':Runtime'.Writer.t->t->unitvalfrom_proto_exn:Runtime'.Reader.t->tvalfrom_json_exn:Runtime'.Json.t->t(**/**)end=structmoduleThis'_=HelloReplyletname()=".mypackage.HelloReply"typet=(string)[@@derivingshow{with_path=false}]typemake_t=?message:string->unit->tletmake?(message={||})()=(message)letmerge=letmerge_message=Runtime'.Merge.mergeRuntime'.Spec.(basic((1,"message","message"),string,({||})))infun(t1_message)(t2_message)->merge_messaget1_messaget2_messageletspec()=Runtime'.Spec.(basic((1,"message","message"),string,({||}))^::nil)letto_proto'=letserialize=Runtime'.apply_lazy(fun()->Runtime'.Serialize.serialize(spec()))infunwriter(message)->serializewritermessageletto_protot=letwriter=Runtime'.Writer.init()into_proto'writert;writerletfrom_proto_exn=letconstructormessage=(message)inRuntime'.apply_lazy(fun()->Runtime'.Deserialize.deserialize(spec())constructor)letfrom_protowriter=Runtime'.Result.catch(fun()->from_proto_exnwriter)letto_jsonoptions=letserialize=Runtime'.Serialize_json.serialize~message_name:(name())(spec())optionsinfun(message)->serializemessageletfrom_json_exn=letconstructormessage=(message)inRuntime'.apply_lazy(fun()->Runtime'.Deserialize_json.deserialize~message_name:(name())(spec())constructor)letfrom_jsonjson=Runtime'.Result.catch(fun()->from_json_exnjson)endmoduleGreeter=structmoduleSayHello=structletpackage_name=Some"mypackage"letservice_name="Greeter"letmethod_name="SayHello"letname="/mypackage.Greeter/SayHello"moduleRequest=HelloRequestmoduleResponse=HelloReplyendletsayHello:(moduleRuntime'.Spec.Messagewithtypet=HelloRequest.t)*(moduleRuntime'.Spec.Messagewithtypet=HelloReply.t)=(moduleHelloRequest:Runtime'.Spec.Messagewithtypet=HelloRequest.t),(moduleHelloReply:Runtime'.Spec.Messagewithtypet=HelloReply.t)endend