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){ option (google.api.http) = { delete: "/api/v1/user/delete", body:"*" }; } } 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; }