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.

42 lines
959 B

2 years ago
syntax = "proto3";
package com.web.api.user;
option go_package = "./;user";
import "validate/validate.proto";
import "google/api/annotations.proto";
import "google/protobuf/descriptor.proto";
import "auth/auth.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){
option (google.api.http) = {
delete: "/api/v1/user/delete",
body:"*"
};
option(auth.auth) = {
auth:true,
auth_key:"11",
};
}
}
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;
}