You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
854 B

2 years ago
syntax = "proto3";
2 years ago
package com.web.api.user;
option go_package = "./;user";
2 years ago
import "validate/validate.proto";
import "google/api/annotations.proto";
2 years ago
import "google/protobuf/wrappers.proto";
2 years ago
import "google/protobuf/descriptor.proto";
2 years ago
2 years ago
service user{
2 years ago
//列表
2 years ago
rpc list(loginRequest)returns(loginResponse){
2 years ago
option(google.api.http) = {
2 years ago
get:"/api/v1/user/list"
2 years ago
};
}
2 years ago
//等了
2 years ago
rpc login(loginRequest)returns(loginResponse){
2 years ago
option (google.api.http) = {
post: "/api/v1/user/login",
body:"*"
2 years ago
};
}
2 years ago
rpc delete(loginRequest)returns(loginResponse);
2 years ago
}
message loginRequest{
2 years ago
//用户名
string username = 1 [(validate.rules).string = {min_len:4,max_len:10}];
string password = 2 [(validate.rules).string = {min_len:4,max_len:10}];
string first_name = 3;
2 years ago
}
message loginResponse{
2 years ago
//密钥
string token = 1;
}