137 lines
2.5 KiB
Protocol Buffer
137 lines
2.5 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package analysis;
|
|
option go_package = "lone-services/rpc/analysis";
|
|
|
|
import "google/api/annotations.proto";
|
|
|
|
service Analysis {
|
|
rpc InternalCreateUser(InternalCreateUserReq) returns (InternalCreateUserData);
|
|
|
|
rpc AgreementInfo(AgreementInfoReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
post: "/api/v2/analysis/agreement/info"
|
|
body: "*"
|
|
};
|
|
}
|
|
|
|
rpc Switch(SwitchReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
post: "/api/v2/analysis/switch"
|
|
body: "*"
|
|
};
|
|
}
|
|
}
|
|
|
|
service AnalysisUser {
|
|
rpc UserRegister(UserRegisterReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
post: "/api/v2/analysis/user/register"
|
|
body: "*"
|
|
};
|
|
}
|
|
|
|
rpc FaceBind(FaceBindReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
post: "/api/v2/analysis/face/bind"
|
|
body: "*"
|
|
};
|
|
}
|
|
|
|
rpc UserImprove(UserImproveReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
post: "/api/v2/analysis/user/improve"
|
|
body: "*"
|
|
};
|
|
}
|
|
|
|
rpc UserDelete(UserDeleteReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
post: "/api/v2/analysis/user/delete"
|
|
body: "*"
|
|
};
|
|
}
|
|
|
|
rpc UserAuth(UserAuthReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
post: "/api/v2/analysis/user/auth"
|
|
body: "*"
|
|
};
|
|
}
|
|
}
|
|
|
|
service AnalysisStore {
|
|
rpc StoreAuth(StoreAuthReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
post: "/api/v2/analysis/store/auth"
|
|
body: "*"
|
|
};
|
|
}
|
|
|
|
rpc StoreAuthQrcode(StoreAuthQrcodeReq) returns (Response) {
|
|
option (google.api.http) = {
|
|
post: "/api/v2/analysis/store/auth/qrcode"
|
|
body: "*"
|
|
};
|
|
}
|
|
}
|
|
|
|
service AnalysisDevice {}
|
|
|
|
message Response {
|
|
int32 code = 1;
|
|
string msg = 2;
|
|
string data = 3;
|
|
}
|
|
|
|
message InternalCreateUserReq {}
|
|
|
|
message InternalCreateUserData {
|
|
int64 id = 1;
|
|
}
|
|
|
|
message UserImproveReq {
|
|
string avatar = 1;
|
|
string nickname = 2;
|
|
string birthday = 3;
|
|
string mobile = 4;
|
|
int32 gender = 5;
|
|
string password = 6;
|
|
string district = 7;
|
|
string address = 8;
|
|
}
|
|
|
|
message UserRegisterReq {
|
|
string code = 1;
|
|
}
|
|
|
|
message FaceBindReq {
|
|
string face_path = 1;
|
|
}
|
|
|
|
message AgreementInfoReq {
|
|
int32 type = 1;
|
|
}
|
|
|
|
message UserDeleteReq {
|
|
int64 id = 1;
|
|
}
|
|
|
|
message SwitchReq {
|
|
int32 type = 1;
|
|
}
|
|
|
|
message StoreAuthReq {
|
|
string username = 1;
|
|
string password = 2;
|
|
string validity_time = 3;
|
|
}
|
|
|
|
message StoreAuthQrcodeReq {}
|
|
|
|
message UserAuthReq {
|
|
int32 type = 1;
|
|
int64 store_id = 2;
|
|
string validity_time = 3;
|
|
}
|