frostfs-api/.github/markdown.tmpl

84 lines
2 KiB
Cheetah
Raw Permalink Normal View History

2020-01-30 11:41:24 +00:00
# Protocol Documentation
<a name="top"></a>
## Table of Contents
{{range .Files}}
{{$file_name := .Name}}- [{{.Name}}](#{{.Name}})
{{if .Services}} - Services
{{range .Services}}- [{{.Name}}](#{{.FullName}})
{{end}}{{end}}
{{if .Messages}} - Messages
{{range .Messages}}- [{{.LongName}}](#{{.FullName}})
{{end}}{{end}}
{{end}}
- [Scalar Value Types](#scalar-value-types)
{{range .Files}}
{{$file_name := .Name}}
<a name="{{.Name}}"></a>
<p align="right"><a href="#top">Top</a></p>
## {{.Name}}
{{.Description}}
{{range .Services}}
<a name="{{.FullName}}"></a>
### Service "{{.FullName}}"
{{.Description}}
```
{{range .Methods -}}
rpc {{.Name}}({{if .RequestStreaming}}stream {{end}}{{.RequestLongType}}) returns ({{if .ResponseStreaming}}stream {{end}}{{.ResponseLongType}});
{{end}}
```
{{range .Methods -}}
#### Method {{.Name}}
{{.Description}}
| Name | Input | Output |
| ---- | ----- | ------ |
| {{.Name}} | [{{.RequestLongType}}](#{{.RequestFullType}}) | [{{.ResponseLongType}}](#{{.ResponseFullType}}) |
{{end}}{{end}} <!-- end services -->
{{range .Messages}}
<a name="{{.FullName}}"></a>
### Message {{.LongName}}
{{.Description}}
{{if .HasFields}}
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
{{range .Fields -}}
| {{.Name}} | [{{.LongType}}](#{{.FullType}}) | {{.Label}} | {{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end}} |
{{end}}{{end}}
{{end}} <!-- end messages -->
{{range .Enums}}
<a name="{{.FullName}}"></a>
### {{.LongName}}
{{.Description}}
| Name | Number | Description |
| ---- | ------ | ----------- |
{{range .Values -}}
| {{.Name}} | {{.Number}} | {{nobr .Description}} |
{{end}}
{{end}} <!-- end enums -->
{{end}}
## Scalar Value Types
| .proto Type | Notes | C++ Type | Java Type | Python Type |
| ----------- | ----- | -------- | --------- | ----------- |
{{range .Scalars -}}
| <a name="{{.ProtoType}}" /> {{.ProtoType}} | {{.Notes}} | {{.CppType}} | {{.JavaType}} | {{.PythonType}} |
{{end}}