Protocol Documentation

Table of Contents

{{range .Files}} {{$file_name := .Name}}

{{.Name}}

Top
{{p .Description}} {{range .Messages}}

{{.LongName}}

{{p .Description}} {{if .HasFields}} {{range .Fields}} {{end}}
FieldTypeLabelDescription
{{.Name}} {{.LongType}} {{.Label}}

{{if (index .Options "deprecated"|default false)}}Deprecated. {{end}}{{.Description}} {{if .DefaultValue}}Default: {{.DefaultValue}}{{end}}

{{$message := .}} {{- range .FieldOptions}} {{$option := .}} {{if eq . "validator.field" "validate.rules" }}

Validated Fields

{{range $message.FieldsWithOption .}} {{end}}
Field Validations
{{.Name}}
    {{range (.Option $option).Rules}}
  • {{.Name}}: {{.Value}}
  • {{end}}
{{else}}

Fields with {{.}} option

{{range $message.FieldsWithOption .}} {{end}}
Name Option
{{.Name}}

{{ printf "%+v" (.Option $option)}}

{{end}} {{end -}} {{end}} {{if .HasExtensions}}
{{range .Extensions}} {{end}}
ExtensionTypeBaseNumberDescription
{{.Name}} {{.LongType}} {{.ContainingLongType}} {{.Number}}

{{.Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end}}

{{end}} {{end}} {{range .Enums}}

{{.LongName}}

{{p .Description}} {{range .Values}} {{end}}
NameNumberDescription
{{.Name}} {{.Number}}

{{.Description}}

{{end}} {{if .HasExtensions}}

File-level Extensions

{{range .Extensions}} {{end}}
ExtensionTypeBaseNumberDescription
{{.Name}} {{.LongType}} {{.ContainingLongType}} {{.Number}}

{{.Description}}{{if .DefaultValue}} Default: {{.DefaultValue}}{{end}}

{{end}} {{range .Services}}

{{.Name}}

{{p .Description}} {{range .Methods}} {{end}}
Method NameRequest TypeResponse TypeDescription
{{.Name}} {{.RequestLongType}}{{if .RequestStreaming}} stream{{end}} {{.ResponseLongType}}{{if .ResponseStreaming}} stream{{end}}

{{.Description}}

{{$service := .}} {{- range .MethodOptions}} {{$option := .}} {{if eq . "google.api.http"}}

Methods with HTTP bindings

{{range $service.MethodsWithOption .}} {{$name := .Name}} {{range (.Option $option).Rules}} {{end}} {{end}}
Method Name Method Pattern Body
{{$name}} {{.Method}} {{.Pattern}} {{.Body}}
{{else}}

Methods with {{.}} option

{{range $service.MethodsWithOption .}} {{end}}
Method Name Option
{{.Name}}

{{ printf "%+v" (.Option $option)}}

{{end}} {{end -}} {{end}} {{end}}

Scalar Value Types

{{range .Scalars}} {{end}}
.proto TypeNotesC++JavaPythonGoC#PHPRuby
{{.ProtoType}} {{.Notes}} {{.CppType}} {{.JavaType}} {{.PythonType}} {{.GoType}} {{.CSharp}} {{.PhpType}} {{.RubyType}}