summaryrefslogtreecommitdiffstats
path: root/grpc-md.tmpl
blob: 78a569f2bedd108532865a0ec2c90b771280c1ca (plain)
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
68
69
70
71
72
73
74
75
76
77
# AGL Vehicle to Cloud Reference Documents
The following documents the protocol buffer message schemas for the Vehicle To Cloud Communication Project, including all objects, object types and descriptions, as well as the recommended MQTT Topic designa and message orchesration.  


# Table of Contents
{{range .Files}}
{{if .HasServices}}
- Services
  {{range .Services}}  - [{{.Name}}](#{{.FullName | lower | replace "." ""}})
  {{end}}
{{end}}
{{if .HasMessages}}
- Messages
  {{range .Messages}}  - [{{.LongName}}](#{{.LongName | lower | replace "." ""}})
  {{end}}
{{end}}
{{if .HasEnums}}
- Enums
  {{range .Enums}}  - [{{.LongName}}](#{{.LongName | lower | replace "." ""}})
  {{end}}
{{end}}
{{end}}
- [Scalar Value Types](#scalar-value-types)

{{range .Files}}

{{range .Services -}}
# {{.Name}} {#{{.FullName | lower | replace "." ""}}}
{{.Description}}

{{range .Methods -}}
## {{.Name}}

> **rpc** {{.Name}}([{{.RequestLongType}}](#{{.RequestLongType | lower | replace "." ""}}))
    [{{.ResponseLongType}}](#{{.ResponseLongType | lower | replace "." ""}})

{{ .Description}}
{{end}} <!-- end methods -->
{{end}} <!-- end services -->

# Messages
{{range .Messages}}

## {{.LongName}} {#{{.LongName | lower | replace "." ""}}}
{{.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}}