dictionary() = term()
dict:dict().
item_type() =
pkgs | msgs | groups | enums | services | rpcs | msg_types |
enum_types | inverse_pkgs | inverse_msgs | inverse_groups |
invert_enums
renamings() = no_renamings | [{item_type(), dictionary()}]
| apply_enum_type_renaming/2 | Apply enum type renamings. |
| apply_msg_type_renaming/2 | Apply msg type renamings. |
| apply_renamings/2 | Apply any renamings. |
| compute_renamings/2 | Compute any renamings to be applied. |
| file_name_to_module_name/2 | Given a file name of a proto file, turn it into a module name, possibly with name transformations, such as prefix or suffix according to options. |
| format_error/1 | |
| is_not_renaming_opt/1 | The opposite of is_renaming_opt/1 |
| is_renaming_opt/1 | Check whether an option is a renaming option or not. |
| rename_defs/2 | Rename definitions according to options, for example lowercasing message names. |
| rename_enum_macro/2 | Given an enum macro name, rename it according to opts, for example by prefixing it. |
| rename_module/2 | Given a module name, rename it according to opts, for example by prefixing it. |
apply_enum_type_renaming(EnumName, Renamings) -> any()
Apply enum type renamings
apply_msg_type_renaming(MsgName, Renamings) -> any()
Apply msg type renamings
Apply any renamings.
compute_renamings(Defs :: gpb_defs:defs(), Opts :: gpb_compile:opts()) -> {ok, renamings()} | {error, Reason :: term()}
Compute any renamings to be applied.
file_name_to_module_name(ProtoFileName :: string(),
Opts :: gpb_compile:opts()) ->
atom()
Given a file name of a proto file, turn it into a module name, possibly with name transformations, such as prefix or suffix according to options.
format_error(Reason) -> any()
is_not_renaming_opt(Opt :: term()) -> boolean()
The opposite of is_renaming_opt/1
is_renaming_opt(Opt :: term()) -> boolean()
Check whether an option is a renaming option or not.
rename_defs(Defs :: gpb_defs:defs(), Opts :: gpb_compile:opts()) -> {ok, gpb_defs:defs()} | {error, Reason :: term()}
Rename definitions according to options, for example lowercasing message names.
This effectively invokesapply_renamings/2 with the
result from compute_renamings/2.
rename_enum_macro(EnumMacro :: atom(), Opts :: gpb_compile:opts()) -> atom()
Given an enum macro name, rename it according to opts, for example by prefixing it.
rename_module(Mod :: atom() | string(),
Opts :: gpb_compile:opts()) ->
atom()
Given a module name, rename it according to opts, for example by prefixing it.
Generated by EDoc