package ocaml-protoc
Pure OCaml compiler for .proto files
Install
Dune Dependency
Authors
Maintainers
Sources
ocaml-protoc-3.0.0.tbz
sha256=923b651cf0f400b5ee2fd1d05798a408b4c0a378aab655e4c2618bcce3fd7bff
sha512=5a1c80115e111f3d4e9384feb9a1a49375d06b11538cdfd388cb4d8a2cb1bb7ae6201d0555daf970be40a017cbb30819e7bec9875a418f5f316b0115999827df
doc/ocaml-protoc.compiler-lib/Ocaml_protoc_compiler_lib/Pb_parsing_parse_tree/index.html
Module Ocaml_protoc_compiler_lib.Pb_parsing_parse_tree
Source
Protobuf parse tree
A field property defining its occurence
Oneof field fields label
Oneof fields have no label, they are simply choices for the oneof fiel they belong to.
Source
type 'a field = {
field_name : string;
field_number : int;
field_label : 'a;
field_type : Pb_field_type.unresolved_t;
field_options : Pb_option.set;
}
message field.
Note this field is parametrized with the label type so that it can be used both by normal field and one of field since the only difference between the 2 is the label.
Source
type map_field = {
map_name : string;
map_number : int;
map_key_type : Pb_field_type.map_key_type;
map_value_type : Pb_field_type.unresolved_t;
map_options : Pb_option.set;
}
oneof entity
Source
type extension_range =
| Extension_single_number of int
| Extension_range of extension_range_from * extension_range_to
Source
type message_body_content =
| Message_field of message_field
| Message_map_field of map_field
| Message_oneof_field of oneof
| Message_sub of message
| Message_enum of enum
| Message_extension of extension_range list
| Message_reserved of extension_range list
| Message_option of Pb_option.t
Body content defines all the possible consituant of a message.
Message entity.
Note the ID is simply for uniquely (and easily) identifying a type. It is expected to be generated by a parser. The later compilation functions expects this id to be unique.
Source
type rpc = {
rpc_name : string;
rpc_options : Pb_option.set;
rpc_req_stream : bool;
rpc_req : Pb_field_type.unresolved_t;
rpc_res_stream : bool;
rpc_res : Pb_field_type.unresolved_t;
}
Source
type proto = {
proto_file_name : string option;
syntax : string option;
imports : import list;
file_options : Pb_option.set;
package : string option;
messages : message list;
services : service list;
enums : enum list;
extends : extend list;
}
Definition of a protobuffer message file.
Source
val pp_message_field_label :
Format.formatter ->
[< `Nolabel | `Optional | `Repeated | `Required ] ->
unit
Source
val pp_message_field :
Format.formatter ->
[< `Nolabel | `Optional | `Repeated | `Required ] field ->
unit
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>