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.
 
 

32 lines
766 B

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";
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;
}