-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi.proto
30 lines (23 loc) · 1012 Bytes
/
api.proto
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
// Generate by
// Google API's
//
// protoc api.proto -IC:\Users\dlemon\go\src\github.com\googleapis\googleapis -I. --go_out=plugins=grpc:lib/go/v1
// protoc api.proto -IC:\Users\dlemon\go\src\github.com\googleapis\googleapis -I. --grpc-gateway_out=lib/go/v1
// protoc api.proto -I. -IC:\Users\dlemon\go\src\github.com\googleapis\googleapis --swagger_out=swagger
// go generate .
syntax = "proto3";
import "google/api/annotations.proto";
package v1;
service DNSService {
rpc PutRecord(Entry) returns (Entry) { option (google.api.http) = { put: "/v1/record" body: "*" }; }
rpc PostRecord(Entry) returns (Entry) { option (google.api.http) = { post: "/v1/record" body: "*" }; }
rpc GetRecord(Entry) returns (Entries) { option (google.api.http) = { get: "/v1/record" }; }
rpc DeleteRecord(Entry) returns (Entry) { option (google.api.http) = { delete: "/v1/record" }; }
}
message Entry {
string name = 1;
string address = 2;
}
message Entries {
repeated Entry entries = 1;
}