ID service (#143)

* Add examples for DB

* add the id service

Co-authored-by: Janos Dobronszki <dobronszki@gmail.com>
This commit is contained in:
Asim Aslam
2021-06-08 12:18:42 +01:00
committed by GitHub
parent 82f0819aa7
commit 7a33de64cc
13 changed files with 497 additions and 0 deletions

23
id/proto/id.proto Normal file
View File

@@ -0,0 +1,23 @@
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;
}