Module gpb_names

Transformation of module names and names in parsed definitions, such as prefixing and lowercasing of message names etc.

Description

Transformation of module names and names in parsed definitions, such as prefixing and lowercasing of message names etc.

Function Index

file_name_to_module_name/2Given 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
rename_defs/2Rename definitions according to options, for example lowercasing message names.
rename_module/2Given a module name, rename it according to opts, for example by prefixing it.

Function Details

file_name_to_module_name/2

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/1

format_error(Reason) -> any()

rename_defs/2

rename_defs(Defs::gpb_parse:defs(), Opts::gpb_compile:opts()) -> {ok, gpb_parse:defs()} | {error, Reason::term()}

Rename definitions according to options, for example lowercasing message names.

rename_module/2

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