This commit is contained in:
Dominic Wong
2021-09-20 11:15:52 +01:00
committed by GitHub
parent 0ab4b37981
commit 4319f7bf4c
14 changed files with 514 additions and 0 deletions

22
qr/proto/qr.proto Normal file
View File

@@ -0,0 +1,22 @@
syntax = "proto3";
package qr;
option go_package = "./proto;qr";
service Qr {
// Generate a QR code
rpc Generate(GenerateRequest) returns (GenerateResponse) {}
}
message GenerateRequest {
// the text to encode as a QR code (URL, phone number, email, etc)
string text = 1;
// the size (height and width) in pixels of the generated QR code. Defaults to 256
int64 size = 2;
}
message GenerateResponse {
// link to the QR code image in PNG format
string qr = 1;
}