mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-11 19:04:35 +00:00
24 lines
525 B
Protocol Buffer
24 lines
525 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package qr;
|
|
|
|
option go_package = "./proto;qr";
|
|
|
|
service Qr {
|
|
// Generate a QR code
|
|
rpc Generate(GenerateRequest) returns (GenerateResponse) {}
|
|
}
|
|
|
|
// Generate a QR code with a specific text and size
|
|
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;
|
|
}
|