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.
 
 

38 lines
939 B

syntax = "proto3";
package com.diulo.api;
option go_package = "./;user";
import "validate/validate.proto";
import "google/api/annotations.proto";
//import "google/protobuf/wrappers.proto";
import "auth/auth.proto";
import "google/protobuf/descriptor.proto";
service user{
//列表
rpc list(loginRequest)returns(loginResponse){
option(auth.auth_key) = "user:list";
option(google.api.http) = {
get:"/api/v1/user/list"
};
}
//等了
rpc login(loginRequest)returns(loginResponse){
option(auth.auth_key) = "none";
option (google.api.http) = {
get: "/api/v1/user/login",
};
}
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;
}