42 lines
738 B
Protocol Buffer
42 lines
738 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
import "google/protobuf/empty.proto";
|
|
|
|
package v1.primitives.integer;
|
|
|
|
service IntCacheService {
|
|
rpc Create(IntCreateRequest) returns (IntCreateResponse);
|
|
rpc Set(IntSetRequest) returns (google.protobuf.Empty);
|
|
rpc Get(IntGetRequest) returns (IntGetResponse);
|
|
rpc Delete(IntDeleteRequest) returns (IntDeleteResponse);
|
|
}
|
|
|
|
message IntCreateRequest {
|
|
int64 value = 1;
|
|
optional uint32 ttl_seconds = 2;
|
|
}
|
|
|
|
message IntCreateResponse {
|
|
string id = 1;
|
|
}
|
|
|
|
message IntSetRequest {
|
|
string id = 1;
|
|
int64 value = 2;
|
|
}
|
|
|
|
message IntGetRequest {
|
|
string id = 1;
|
|
}
|
|
|
|
message IntGetResponse {
|
|
int64 value = 1;
|
|
}
|
|
|
|
message IntDeleteRequest {
|
|
string id = 1;
|
|
}
|
|
|
|
message IntDeleteResponse {
|
|
int64 removed_value = 1;
|
|
} |