Files
smart-search-back/api/proto/invite/invite.proto
vallyenfail 3552f69572
Some checks failed
Deploy Smart Search Backend Test / deploy (push) Failing after 25s
add service
2026-01-19 19:51:39 +03:00

34 lines
731 B
Protocol Buffer

syntax = "proto3";
package invite;
option go_package = "git.techease.ru/Smart-search/smart-search-back/pkg/pb/invite";
import "google/protobuf/timestamp.proto";
service InviteService {
rpc Generate(GenerateRequest) returns (GenerateResponse);
rpc GetInfo(GetInfoRequest) returns (GetInfoResponse);
}
message GenerateRequest {
int64 user_id = 1;
int32 ttl_days = 2;
int32 max_uses = 3;
}
message GenerateResponse {
string code = 1;
int32 max_uses = 2;
google.protobuf.Timestamp expires_at = 3;
}
message GetInfoRequest {
int64 user_id = 1;
}
message GetInfoResponse {
string code = 1;
int32 can_be_used_count = 2;
google.protobuf.Timestamp expires_at = 3;
google.protobuf.Timestamp created_at = 4;
}