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.
 
 

59 lines
1.2 KiB

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(request)returns(response){
option(auth.auth_key) = "user:list";
option(google.api.http) = {
get:"/api/v1/user/list"
};
}
rpc all(request)returns(response){
option(auth.auth) = true;
option (google.api.http) = {
get: "/api/v1/user/all",
};
}
rpc auto(request)returns(response){
option(auth.auth) = false;
option (google.api.http) = {
get: "/api/v1/user/auto",
};
}
//有 "user:list"
rpc loginWithList(request)returns(response){
option (google.api.http) = {
get: "/api/v1/user/login_list",
};
}
// 没有 "user:list" 权限
rpc login(request)returns(response){
option (google.api.http) = {
get: "/api/v1/user/login",
};
}
rpc login1(request)returns(response){
option (google.api.http) = {
post: "/api/v1/user/login1",
body:"*",
};
}
}
message request{
}
message response{
//密钥
string token = 1;
}