daml/ledger-api/grpc-definitions/rst_mmd.tmpl
Beth Aitman 233b814469
Move protobuf docs into rst format (#334)
* Attempt to move template to rst

* Removing pandoc from export

* Get rst tables working

* Move proto comments into rst format

* More tidying up proto docs to work in rst

* Remove unnecessary whitespace

* Add back some necessary whitespace

* Correcting rst whitespace, again

* Remove processing script

* Clean up proto files

* Remove broken link from pdf toc

* Reinstate post-process script

* Try to fix process script

* Fix permissions issue
2019-04-10 16:42:35 +02:00

144 lines
2.9 KiB
Cheetah

Ledger API Reference
####################
{{range .Files}}
{{$file_name := .Name}}
.. _{{.Name}}:
{{.Name}}
***************************************************************************************************
{{.Description}}
{{range .Messages}}
.. _{{.FullName}}:
{{.LongName}}
===================================================================================================
{{$full_name := .FullName}}
{{.Description}}
{{if .HasFields}}
.. list-table::
:header-rows: 1
* - Field
- Type
- Label
- Description
{{range .Fields -}}
* - .. _{{$full_name}}.{{.Name}}:
{{.Name}}
- :ref:`{{.LongType}} <{{.FullType}}>`
- {{.Label}}
- {{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end}}
{{end}}
{{end}}
{{if .HasExtensions}}
.. list-table::
:header-rows: 1
* - Extension
- Type
- Base
- Number
- Description
{{range .Extensions -}}
* - {{.Name}}
- {{.LongType}}
- {{.ContainingLongType}}
- {{.Number}}
- {{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end}}
{{end}}
{{end}}
{{end}}
{{range .Enums}}
.. _{{.FullName}}:
{{.LongName}}
===================================================================================================
{{$full_name := .FullName}}
{{.Description}}
.. list-table::
:header-rows: 1
* - Name
- Number
- Description
{{range .Values -}}
* - .. _{{$full_name}}.{{.Name}}:
{{.Name}}
- {{.Number}}
- {{nobr .Description}}
{{end}}
{{end}}
{{if .HasExtensions}}
.. _{{$file_name}}-extensions:
File-level Extensions
===================================================================================================
.. list-table::
:header-rows: 1
* - Extension
- Type
- Base
- Number
- Description
{{range .Extensions -}}
* - {{.Name}}
- {{.LongType}}
- {{.ContainingLongType}}
- {{.Number}}
- {{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end}}
{{end}}
{{end}}
{{range .Services}}
.. _{{.FullName}}:
{{.LongName}}
===================================================================================================
{{.Description}}
.. list-table::
:header-rows: 1
* - Method name
- Request type
- Response type
- Description
{{range .Methods -}}
* - {{.Name}}
- :ref:`{{.RequestLongType}} <{{.RequestFullType}}>`
- :ref:`{{.ResponseLongType}} <{{.ResponseFullType}}>`
- {{nobr .Description}}
{{end}}
{{end}}
{{end}}
.. _scalarvaluetypes:
Scalar Value Types
***************************************************************************************************
.. list-table::
:header-rows: 1
* - .proto type
- Notes
- C++ type
- Java type
- Python type
{{range .Scalars -}}
* - .. _{{.ProtoType}}:
{{.ProtoType}}
- {{.Notes}}
- {{.CppType}}
- {{.JavaType}}
- {{.PythonType}}
{{end}}