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.
 
 

52 lines
1.1 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 auto(request)returns(response){
option(auth.auth) = true;
option (google.api.http) = {
get: "/api/v1/user/auto",
};
}
rpc all(request)returns(response){
option(auth.auth) = false;
option (google.api.http) = {
get: "/api/v1/user/all",
};
}
//有 "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",
};
}
}
message request{
}
message response{
//密钥
string token = 1;
}