-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.template.mustache
67 lines (52 loc) · 1.85 KB
/
.template.mustache
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Contents
{{range .Files}}
{{if .HasServices}}
{{range .Services}}
- [{{.Name}}](#{{.Name | lower | replace "." ""}})
{{ range .Methods}}
- [{{.Name}}](#{{.Name | lower | replace "." ""}})
{{end}}
{{end}}
{{end}}
{{end}}
{{range .Files}}
{{range .Services -}}
# {{.Name}}
{{.Description}}
## Methods
{{range .Methods -}}
### {{.Name}}
> **rpc** {{.Name}}([{{.RequestLongType}}](#{{.RequestLongType | lower | replace "." ""}}))
[{{.ResponseLongType}}](#{{.ResponseLongType | lower | replace "." ""}})
{{ .Description}}
{{end}} <!-- end methods -->
{{end}} <!-- end services -->
## Messages
{{range .Messages}}
### {{.LongName}}
{{.Description}}
{{if .HasFields}}
| Field | Type | Description |
| ----- | ---- | ----------- |
{{range .Fields -}}
| {{if .IsOneof}}[**oneof**](https://developers.google.com/protocol-buffers/docs/proto3#oneof) {{.OneofDecl}}.{{end}}{{.Name}} | [{{if .IsMap}}map {{else}}{{.Label}} {{end}}{{.LongType}}](#{{.LongType | lower | replace "." ""}}) | {{if .Description}}{{nobr .Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end}}{{else}}none{{end}} |
{{end}} <!-- end Fields -->
{{end}} <!-- end HasFields -->
{{end}} <!-- end messages -->
## Enums
{{range .Enums}}
### {{.LongName}} {#{{.LongName | lower | replace "." ""}}}
{{.Description}}
| Name | Number | Description |
| ---- | ------ | ----------- |
{{range .Values -}}
| {{.Name}} | {{.Number}} | {{if .Description}}{{nobr .Description}}{{else}}none{{end}} |
{{end}}
{{end}} <!-- end Enums -->
{{end}} <!-- end Files -->
# Scalar Value Types
| .proto Type | Notes | C++ Type | Java Type | Python Type |
| ----------- | ----- | -------- | --------- | ----------- |
{{range .Scalars -}}
| <div><h4 id="{{.ProtoType | lower | replace "." ""}}" /></div><a name="{{.ProtoType}}" /> {{.ProtoType}} | {{.Notes}} | {{.CppType}} | {{.JavaType}} | {{.PythonType}} |
{{end}}