package ocaml-protoc
Pure OCaml compiler for .proto files
Install
Dune Dependency
Authors
Maintainers
Sources
ocaml-protoc-3.1.1.tbz
sha256=c5657fcbfcbaea361beb847f72b8a6a6f36ce9e773bf285b278a0da75f988fbc
sha512=ea86d04b6293eba48360409049f907fc3e73138ec434b5d1894a2dcdaa0478f6f5a1d13f1ba87c553ddf6806a618525f621d2af862b495ce3426242a3a42e339
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 enum_value = {
enum_value_name : string;
enum_value_int : int;
enum_value_options : Pb_option.set;
}
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)"
>