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
856 B

syntax = "proto3";
package com.web.api.user;
option go_package = "./;user";
import "validate/validate.proto";
import "google/api/annotations.proto";
//import "google/protobuf/wrappers.proto";
import "google/protobuf/descriptor.proto";
service user{
//列表
rpc list(loginRequest)returns(loginResponse){
option(google.api.http) = {
get:"/api/v1/user/list"
};
}
//等了
rpc login(loginRequest)returns(loginResponse){
option (google.api.http) = {
post: "/api/v1/user/login",
body:"*"
};
}
rpc delete(loginRequest)returns(loginResponse);
}
message loginRequest{
//用户名
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;
}
message loginResponse{
//密钥
string token = 1;
}