mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +00:00
* Add examples for DB * add the id service Co-authored-by: Janos Dobronszki <dobronszki@gmail.com>
24 lines
429 B
Protocol Buffer
24 lines
429 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package id;
|
|
|
|
option go_package = "./proto;id";
|
|
|
|
service Id {
|
|
rpc Generate(GenerateRequest) returns (GenerateResponse) {}
|
|
}
|
|
|
|
// Generate a unique ID. Defaults to uuid.
|
|
message GenerateRequest {
|
|
// type of id e.g uuid, shortid, snowflake (64 bit), bigflake (128 bit)
|
|
string type = 1;
|
|
}
|
|
|
|
message GenerateResponse {
|
|
// the unique id generated
|
|
string id = 1;
|
|
// the type of id generated
|
|
string type = 2;
|
|
}
|
|
|