增加 ldap proto

This commit is contained in:
laodaming@fusen.cn 2024-01-12 15:55:04 +08:00
parent ebf1be84e6
commit a8e75109b7

200
service/ldap.proto Normal file
View File

@ -0,0 +1,200 @@
syntax = "proto3"; //使v3版本
package ldap;
option go_package = "gitlab.fusenpack.com/backend/ldap;service";
// google/api/annotations.proto
import "google/api/annotations.proto";
import "service/basic.proto";
import "google/protobuf/struct.proto";
import "google/protobuf/any.proto";
import "google/protobuf/empty.proto";
import "google/api/httpbody.proto";
import "google/protobuf/timestamp.proto";
//
service ldap {
//
rpc Ping(basic.Request) returns (basic.Response) {}
//ldap部门列表
rpc GetLdapOrganizations(basic.Request) returns(GetLdapOrganizationsRsp){}
//ldap部门
rpc CreateLdapOrganization(CreateLdapOrganizationReq)returns(basic.Response){}
//ldap部门
rpc DeleteLdapOrganization(DeleteLdapOrganizationReq) returns(basic.Response){}
//ldap部门
rpc UpdateLdapOrganization(UpdateLdapOrganizationReq) returns(basic.Response){}
//ldap用户帐号
rpc CreateLdapUser(CreateLdapUserReq) returns(basic.Response){}
//ldap用户信息
rpc UpdateLdapUser(UpdateLdapUserReq) returns(basic.Response){}
//ldap用户密码
rpc UpdateLdapUserPwd(UpdateLdapUserPwdReq) returns(basic.Response){}
//ldap用户帐号
rpc DisableLdapUser(DisableLdapUserReq) returns(basic.Response){}
//
rpc GetLdapUserInfo(GetLdapUserInfoReq) returns(GetLdapUserInfoRsp){}
//ldap部门添加成员
rpc AddLdapOrganizationMember(AddLdapOrganizationMemberReq) returns(basic.Response){}
//ldap部门移除成员
rpc RemoveLdapOrganizationMember(RemoveLdapOrganizationMemberReq) returns(basic.Response){}
//ldap组织成员列表
rpc GetLdapOrganizationMembers(GetLdapOrganizationMembersReq) returns(GetLdapOrganizationMembersRsp){}
//
rpc CreateLdapUserBaseGroup(basic.Request) returns (basic.Response) {}
//
rpc GetLdapUsers(GetLdapUsersReq) returns (GetLdapUsersRsp) {}
//
rpc LdapUserLogin(LdapUserLoginReq) returns (LdapUserLoginRsp) {}
}
//ldap部门列表
message GetLdapOrganizationsRsp{
repeated LdapOrganization list = 1;
}
message LdapOrganization {
int32 member_count = 1; //
string organization_name = 2; //
string organization_dn = 3; //dn
string owner_name = 4; //
string owner_dn = 5; //dn
int32 level = 6; //
string parent_organization_dn = 7;//dn
int32 sort = 8; //
repeated LdapOrganization child = 9;//
}
//ldap部门
message CreateLdapOrganizationReq{
string organization_name = 1; //
string parent_organization_dn = 2; //dn
string owner_dn = 3 ; //dn
}
//ldap部门
message DeleteLdapOrganizationReq{
repeated string organization_dns = 1;//dn集合
}
//ldap部门
message UpdateLdapOrganizationReq{
string organization_dn = 1; //dn
string organization_name = 2; //
string organization_owner_dn = 3; //dn
}
//ldap用户帐号
message CreateLdapUserReq{
string user_name = 1; //
string email = 2; //
string password = 3; //
string mobile = 4; //
string avatar = 5; //
int64 employee_type = 6; //1 2 3
int64 group_id = 7; //id
int64 gender = 8; // 1 2 3
string birthday = 9; //
int64 status = 10; // 10
}
//ldap用户信息
message UpdateLdapUserReq{
string user_dn = 1; //dn
string user_name = 2; //
string mobile = 3; //
string avatar = 4; //
int64 status = 5; // 10
int64 employee_type = 6; //1 2 3
int64 group_id = 7; //id
int64 gender = 8; // 1 2 3
string birthday = 9; //
}
//ldap用户密码
message UpdateLdapUserPwdReq{
string user_dn = 1; //dn
string new_password = 2;//
string old_password = 3;//
}
//ldap用户帐号
message DisableLdapUserReq{
string user_dn = 1;//dn
}
//
message GetLdapUserInfoReq{
string user_dn = 1;//dn
}
message GetLdapUserInfoRsp{
int64 user_id = 1; //id
string user_dn = 2; //dn
string user_name = 3; //
string email = 4; //
string mobile = 5; //
string avatar = 6; //
int64 employee_type = 7;// 1 2 3
int64 gender = 8; // 1 2 3
string birthday = 9; //
repeated string belong_organization = 10;//
repeated string manage_organization = 11; //
int64 status = 12 ; // 10
}
//ldap部门添加成员
message AddLdapOrganizationMemberReq{
string organization_dn = 1 ; //DN
string user_dn = 2; //DN
}
//ldap部门移除成员
message RemoveLdapOrganizationMemberReq{
string organization_dn = 1; //DN
string user_dn = 2; //DN
}
//ldap组织成员列表
message GetLdapOrganizationMembersReq{
string organization_dn = 1; //dn
string user_name = 2; //
}
message GetLdapOrganizationMembersRsp {
repeated GetLdapOrganizationMembersItem list = 1;
}
message GetLdapOrganizationMembersItem {
int64 userId = 1; //id
string user_dn = 2 ; //dn
string user_name = 3 ; //
string email = 4 ; //
string mobile = 5; //
string avatar = 6; //
int64 employee_type = 7 ; //
int64 gender = 8 ; // 1 2 3
string birthday = 9 ; //
repeated string belong_organizations = 10; //
repeated string manage_organizations = 11 ;//
int64 status = 12 ; // 10
int64 group_id = 13; //id
}
//
message GetLdapUsersReq{
string page_cookie = 1; ///
string user_name = 2 ; //
int64 gender = 3; // 0 1 2 3
int64 employee_type = 4;//0 1 2 3
}
message GetLdapUsersRsp{
repeated GetLdapUsersItem list = 1;
string paging_cookie = 2;
}
message GetLdapUsersItem {
int64 user_id = 1; //id
string user_dn = 2; //dn
string user_name = 3; //
string email = 4; //
string mobile = 5; //
string avatar = 6; //
int64 employee_type = 7; // 1 2 3
int64 gender = 8; // 1 2 3
string birthday = 9; //
repeated string belong_organizations = 10 ;//
repeated string manage_organizations = 11 ;//
int64 status = 12 ; // 10
int64 group_id = 13; //id
}
//
message LdapUserLoginReq{
string email = 1; //
string password = 2;//
}
message LdapUserLoginRsp{
string token = 1;
}