Files
services/url/proto/url.proto
Janos Dobronszki 114fa6735b Fix url (#105)
2021-05-17 15:01:22 +01:00

41 lines
656 B
Protocol Buffer

syntax = "proto3";
package url;
option go_package = "github.com/micro/services/url/proto;url";
service Url {
rpc Shorten(ShortenRequest) returns (ShortenResponse) {}
rpc List(ListRequest) returns (ListResponse) {}
rpc Proxy(ProxyRequest) returns (ProxyResponse) {}
}
message ShortenRequest {
string destinationURL = 1;
}
message ShortenResponse {
string shortURL = 1;
}
message URLPair {
string destinationURL = 1;
string shortURL = 2;
string owner = 3;
}
message ListRequest {
}
message ListResponse {
repeated URLPair urlPairs = 1;
}
message ProxyRequest {
string shortURL = 1;
}
message ProxyResponse {
string destinationURL = 1;
}