File: helloworld.proto

package info (click to toggle)
golang-github-grpc-ecosystem-grpc-gateway.v2 2.11.3-2
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 6,148 kB
  • sloc: javascript: 352; makefile: 136; sh: 26
file content (60 lines) | stat: -rw-r--r-- 1,573 bytes parent folder | download
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
syntax = "proto3";

package grpc.gateway.examples.internal.helloworld;

import "google/api/annotations.proto";
import "google/protobuf/wrappers.proto";

option go_package = "github.com/grpc-ecosystem/grpc-gateway/v2/examples/internal/helloworld";

service Greeter {
  rpc SayHello(HelloRequest) returns (HelloReply) {
    option (google.api.http) = {
      get: "/say/{name}"
      additional_bindings: {
        get: "/say/strval/{strVal}",
      }
      additional_bindings: {
        get: "/say/floatval/{floatVal}",
      }
      additional_bindings: {
        get: "/say/doubleval/{doubleVal}",
      }
      additional_bindings: {
        get: "/say/boolval/{boolVal}",
      }
      additional_bindings: {
        get: "/say/bytesval/{bytesVal}",
      }
      additional_bindings: {
        get: "/say/int32val/{int32Val}",
      }
      additional_bindings: {
        get: "/say/uint32val/{uint32Val}",
      }
      additional_bindings: {
        get: "/say/int64val/{int64Val}",
      }
      additional_bindings: {
        get: "/say/uint64val/{uint64Val}",
      }
    };
  }
}

message HelloRequest {
  string name = 1;
  google.protobuf.StringValue strVal = 2;
  google.protobuf.FloatValue floatVal = 3;
  google.protobuf.DoubleValue doubleVal = 4;
  google.protobuf.BoolValue boolVal = 5;
  google.protobuf.BytesValue bytesVal = 6;
  google.protobuf.Int32Value int32Val = 7;
  google.protobuf.UInt32Value uint32Val = 8;
  google.protobuf.Int64Value int64Val = 9;
  google.protobuf.UInt64Value uint64Val = 10;
}

message HelloReply {
  string message = 1;
}