Packages

A pure Elixir implementation of Google Protobuf.

Current section

Files

Jump to
protobuf_ex priv templates service.ex.eex
Raw

priv/templates/service.ex.eex

defmodule <%= mod_name %> do
use Protobuf.Service
<%= Enum.map methods, fn {method, nil, docs} -> %>
<%= if docs, do: docs, else: "" %>rpc <%= method %>
<% {method, {type, path}, docs} -> %>
<%= if docs, do: docs, else: "" %>rpc <%= method %>, <%= type %>: "<%= path %>"
<% end %>
end