839 lines
26 KiB
Go
839 lines
26 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.11
|
|
// protoc v3.21.12
|
|
// source: ldap.proto
|
|
|
|
package pb
|
|
|
|
import (
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
unsafe "unsafe"
|
|
)
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
// ==========================================
|
|
// БАЗОВЫЕ И ПЕРЕИСПОЛЬЗУЕМЫЕ СТРУКТУРЫ
|
|
// ==========================================
|
|
type EmptyRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *EmptyRequest) Reset() {
|
|
*x = EmptyRequest{}
|
|
mi := &file_ldap_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *EmptyRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*EmptyRequest) ProtoMessage() {}
|
|
|
|
func (x *EmptyRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ldap_proto_msgTypes[0]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use EmptyRequest.ProtoReflect.Descriptor instead.
|
|
func (*EmptyRequest) Descriptor() ([]byte, []int) {
|
|
return file_ldap_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
// Стандартный ответ для мутаций (создание, обновление, удаление)
|
|
type StatusResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
|
|
ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *StatusResponse) Reset() {
|
|
*x = StatusResponse{}
|
|
mi := &file_ldap_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *StatusResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*StatusResponse) ProtoMessage() {}
|
|
|
|
func (x *StatusResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ldap_proto_msgTypes[1]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use StatusResponse.ProtoReflect.Descriptor instead.
|
|
func (*StatusResponse) Descriptor() ([]byte, []int) {
|
|
return file_ldap_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *StatusResponse) GetSuccess() bool {
|
|
if x != nil {
|
|
return x.Success
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *StatusResponse) GetErrorMessage() string {
|
|
if x != nil {
|
|
return x.ErrorMessage
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// Полная модель пользователя
|
|
type UserData struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Dn string `protobuf:"bytes,1,opt,name=dn,proto3" json:"dn,omitempty"` // Полный путь в AD (Distinguished Name)
|
|
Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"` // Логин (sAMAccountName)
|
|
DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` // ФИО (displayName)
|
|
Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` // Почта (mail)
|
|
Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` // Описание/Должность (description)
|
|
Avatar []byte `protobuf:"bytes,6,opt,name=avatar,proto3" json:"avatar,omitempty"` // Аватарка в байтах (thumbnailPhoto)
|
|
Groups []string `protobuf:"bytes,7,rep,name=groups,proto3" json:"groups,omitempty"` // Список групп
|
|
IsActive bool `protobuf:"varint,8,opt,name=is_active,json=isActive,proto3" json:"is_active,omitempty"` // Статус аккаунта
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *UserData) Reset() {
|
|
*x = UserData{}
|
|
mi := &file_ldap_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *UserData) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*UserData) ProtoMessage() {}
|
|
|
|
func (x *UserData) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ldap_proto_msgTypes[2]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use UserData.ProtoReflect.Descriptor instead.
|
|
func (*UserData) Descriptor() ([]byte, []int) {
|
|
return file_ldap_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *UserData) GetDn() string {
|
|
if x != nil {
|
|
return x.Dn
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *UserData) GetUsername() string {
|
|
if x != nil {
|
|
return x.Username
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *UserData) GetDisplayName() string {
|
|
if x != nil {
|
|
return x.DisplayName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *UserData) GetEmail() string {
|
|
if x != nil {
|
|
return x.Email
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *UserData) GetDescription() string {
|
|
if x != nil {
|
|
return x.Description
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *UserData) GetAvatar() []byte {
|
|
if x != nil {
|
|
return x.Avatar
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *UserData) GetGroups() []string {
|
|
if x != nil {
|
|
return x.Groups
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *UserData) GetIsActive() bool {
|
|
if x != nil {
|
|
return x.IsActive
|
|
}
|
|
return false
|
|
}
|
|
|
|
// Модель группы
|
|
type GroupData struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Dn string `protobuf:"bytes,1,opt,name=dn,proto3" json:"dn,omitempty"`
|
|
Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Короткое имя группы (cn)
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *GroupData) Reset() {
|
|
*x = GroupData{}
|
|
mi := &file_ldap_proto_msgTypes[3]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *GroupData) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GroupData) ProtoMessage() {}
|
|
|
|
func (x *GroupData) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ldap_proto_msgTypes[3]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use GroupData.ProtoReflect.Descriptor instead.
|
|
func (*GroupData) Descriptor() ([]byte, []int) {
|
|
return file_ldap_proto_rawDescGZIP(), []int{3}
|
|
}
|
|
|
|
func (x *GroupData) GetDn() string {
|
|
if x != nil {
|
|
return x.Dn
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *GroupData) GetName() string {
|
|
if x != nil {
|
|
return x.Name
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// --- Списки ---
|
|
type UserListResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
|
|
ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
|
|
Users []*UserData `protobuf:"bytes,3,rep,name=users,proto3" json:"users,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *UserListResponse) Reset() {
|
|
*x = UserListResponse{}
|
|
mi := &file_ldap_proto_msgTypes[4]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *UserListResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*UserListResponse) ProtoMessage() {}
|
|
|
|
func (x *UserListResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ldap_proto_msgTypes[4]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use UserListResponse.ProtoReflect.Descriptor instead.
|
|
func (*UserListResponse) Descriptor() ([]byte, []int) {
|
|
return file_ldap_proto_rawDescGZIP(), []int{4}
|
|
}
|
|
|
|
func (x *UserListResponse) GetSuccess() bool {
|
|
if x != nil {
|
|
return x.Success
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *UserListResponse) GetErrorMessage() string {
|
|
if x != nil {
|
|
return x.ErrorMessage
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *UserListResponse) GetUsers() []*UserData {
|
|
if x != nil {
|
|
return x.Users
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type GroupListResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
|
|
ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
|
|
Groups []*GroupData `protobuf:"bytes,3,rep,name=groups,proto3" json:"groups,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *GroupListResponse) Reset() {
|
|
*x = GroupListResponse{}
|
|
mi := &file_ldap_proto_msgTypes[5]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *GroupListResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GroupListResponse) ProtoMessage() {}
|
|
|
|
func (x *GroupListResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ldap_proto_msgTypes[5]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use GroupListResponse.ProtoReflect.Descriptor instead.
|
|
func (*GroupListResponse) Descriptor() ([]byte, []int) {
|
|
return file_ldap_proto_rawDescGZIP(), []int{5}
|
|
}
|
|
|
|
func (x *GroupListResponse) GetSuccess() bool {
|
|
if x != nil {
|
|
return x.Success
|
|
}
|
|
return false
|
|
}
|
|
|
|
func (x *GroupListResponse) GetErrorMessage() string {
|
|
if x != nil {
|
|
return x.ErrorMessage
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *GroupListResponse) GetGroups() []*GroupData {
|
|
if x != nil {
|
|
return x.Groups
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// --- Управление профилем ---
|
|
type CreateUserRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
|
|
FullName string `protobuf:"bytes,2,opt,name=full_name,json=fullName,proto3" json:"full_name,omitempty"`
|
|
Password string `protobuf:"bytes,3,opt,name=password,proto3" json:"password,omitempty"`
|
|
Email *string `protobuf:"bytes,4,opt,name=email,proto3,oneof" json:"email,omitempty"` // Сразу при создании можно задать почту
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *CreateUserRequest) Reset() {
|
|
*x = CreateUserRequest{}
|
|
mi := &file_ldap_proto_msgTypes[6]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *CreateUserRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*CreateUserRequest) ProtoMessage() {}
|
|
|
|
func (x *CreateUserRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ldap_proto_msgTypes[6]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use CreateUserRequest.ProtoReflect.Descriptor instead.
|
|
func (*CreateUserRequest) Descriptor() ([]byte, []int) {
|
|
return file_ldap_proto_rawDescGZIP(), []int{6}
|
|
}
|
|
|
|
func (x *CreateUserRequest) GetUsername() string {
|
|
if x != nil {
|
|
return x.Username
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *CreateUserRequest) GetFullName() string {
|
|
if x != nil {
|
|
return x.FullName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *CreateUserRequest) GetPassword() string {
|
|
if x != nil {
|
|
return x.Password
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *CreateUserRequest) GetEmail() string {
|
|
if x != nil && x.Email != nil {
|
|
return *x.Email
|
|
}
|
|
return ""
|
|
}
|
|
|
|
// Запрос на обновление. Используем optional для частичного обновления.
|
|
type UpdateUserRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` // Обязательное поле: кого обновляем
|
|
DisplayName *string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3,oneof" json:"display_name,omitempty"` // Новое ФИО (повлечет Rename CN)
|
|
Email *string `protobuf:"bytes,3,opt,name=email,proto3,oneof" json:"email,omitempty"` // Новая почта
|
|
Description *string `protobuf:"bytes,4,opt,name=description,proto3,oneof" json:"description,omitempty"` // Новое описание
|
|
Avatar []byte `protobuf:"bytes,5,opt,name=avatar,proto3,oneof" json:"avatar,omitempty"` // Новая аватарка (бинарник картинки)
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *UpdateUserRequest) Reset() {
|
|
*x = UpdateUserRequest{}
|
|
mi := &file_ldap_proto_msgTypes[7]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *UpdateUserRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*UpdateUserRequest) ProtoMessage() {}
|
|
|
|
func (x *UpdateUserRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ldap_proto_msgTypes[7]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use UpdateUserRequest.ProtoReflect.Descriptor instead.
|
|
func (*UpdateUserRequest) Descriptor() ([]byte, []int) {
|
|
return file_ldap_proto_rawDescGZIP(), []int{7}
|
|
}
|
|
|
|
func (x *UpdateUserRequest) GetUsername() string {
|
|
if x != nil {
|
|
return x.Username
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *UpdateUserRequest) GetDisplayName() string {
|
|
if x != nil && x.DisplayName != nil {
|
|
return *x.DisplayName
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *UpdateUserRequest) GetEmail() string {
|
|
if x != nil && x.Email != nil {
|
|
return *x.Email
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *UpdateUserRequest) GetDescription() string {
|
|
if x != nil && x.Description != nil {
|
|
return *x.Description
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *UpdateUserRequest) GetAvatar() []byte {
|
|
if x != nil {
|
|
return x.Avatar
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type ChangePasswordRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
|
|
NewPassword string `protobuf:"bytes,2,opt,name=new_password,json=newPassword,proto3" json:"new_password,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ChangePasswordRequest) Reset() {
|
|
*x = ChangePasswordRequest{}
|
|
mi := &file_ldap_proto_msgTypes[8]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ChangePasswordRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ChangePasswordRequest) ProtoMessage() {}
|
|
|
|
func (x *ChangePasswordRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ldap_proto_msgTypes[8]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ChangePasswordRequest.ProtoReflect.Descriptor instead.
|
|
func (*ChangePasswordRequest) Descriptor() ([]byte, []int) {
|
|
return file_ldap_proto_rawDescGZIP(), []int{8}
|
|
}
|
|
|
|
func (x *ChangePasswordRequest) GetUsername() string {
|
|
if x != nil {
|
|
return x.Username
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ChangePasswordRequest) GetNewPassword() string {
|
|
if x != nil {
|
|
return x.NewPassword
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type ToggleStatusRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
|
|
SetActive bool `protobuf:"varint,2,opt,name=set_active,json=setActive,proto3" json:"set_active,omitempty"` // true - включить (512), false - отключить (514)
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ToggleStatusRequest) Reset() {
|
|
*x = ToggleStatusRequest{}
|
|
mi := &file_ldap_proto_msgTypes[9]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ToggleStatusRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ToggleStatusRequest) ProtoMessage() {}
|
|
|
|
func (x *ToggleStatusRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ldap_proto_msgTypes[9]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ToggleStatusRequest.ProtoReflect.Descriptor instead.
|
|
func (*ToggleStatusRequest) Descriptor() ([]byte, []int) {
|
|
return file_ldap_proto_rawDescGZIP(), []int{9}
|
|
}
|
|
|
|
func (x *ToggleStatusRequest) GetUsername() string {
|
|
if x != nil {
|
|
return x.Username
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *ToggleStatusRequest) GetSetActive() bool {
|
|
if x != nil {
|
|
return x.SetActive
|
|
}
|
|
return false
|
|
}
|
|
|
|
// --- Управление членством в группах ---
|
|
type GroupMemberRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"` // Логин пользователя
|
|
GroupDn string `protobuf:"bytes,2,opt,name=group_dn,json=groupDn,proto3" json:"group_dn,omitempty"` // Полный путь группы (в которую добавляем / из которой удаляем)
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *GroupMemberRequest) Reset() {
|
|
*x = GroupMemberRequest{}
|
|
mi := &file_ldap_proto_msgTypes[10]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *GroupMemberRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GroupMemberRequest) ProtoMessage() {}
|
|
|
|
func (x *GroupMemberRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_ldap_proto_msgTypes[10]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use GroupMemberRequest.ProtoReflect.Descriptor instead.
|
|
func (*GroupMemberRequest) Descriptor() ([]byte, []int) {
|
|
return file_ldap_proto_rawDescGZIP(), []int{10}
|
|
}
|
|
|
|
func (x *GroupMemberRequest) GetUsername() string {
|
|
if x != nil {
|
|
return x.Username
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *GroupMemberRequest) GetGroupDn() string {
|
|
if x != nil {
|
|
return x.GroupDn
|
|
}
|
|
return ""
|
|
}
|
|
|
|
var File_ldap_proto protoreflect.FileDescriptor
|
|
|
|
const file_ldap_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\n" +
|
|
"ldap.proto\x12\aldap.v1\"\x0e\n" +
|
|
"\fEmptyRequest\"O\n" +
|
|
"\x0eStatusResponse\x12\x18\n" +
|
|
"\asuccess\x18\x01 \x01(\bR\asuccess\x12#\n" +
|
|
"\rerror_message\x18\x02 \x01(\tR\ferrorMessage\"\xde\x01\n" +
|
|
"\bUserData\x12\x0e\n" +
|
|
"\x02dn\x18\x01 \x01(\tR\x02dn\x12\x1a\n" +
|
|
"\busername\x18\x02 \x01(\tR\busername\x12!\n" +
|
|
"\fdisplay_name\x18\x03 \x01(\tR\vdisplayName\x12\x14\n" +
|
|
"\x05email\x18\x04 \x01(\tR\x05email\x12 \n" +
|
|
"\vdescription\x18\x05 \x01(\tR\vdescription\x12\x16\n" +
|
|
"\x06avatar\x18\x06 \x01(\fR\x06avatar\x12\x16\n" +
|
|
"\x06groups\x18\a \x03(\tR\x06groups\x12\x1b\n" +
|
|
"\tis_active\x18\b \x01(\bR\bisActive\"/\n" +
|
|
"\tGroupData\x12\x0e\n" +
|
|
"\x02dn\x18\x01 \x01(\tR\x02dn\x12\x12\n" +
|
|
"\x04name\x18\x02 \x01(\tR\x04name\"z\n" +
|
|
"\x10UserListResponse\x12\x18\n" +
|
|
"\asuccess\x18\x01 \x01(\bR\asuccess\x12#\n" +
|
|
"\rerror_message\x18\x02 \x01(\tR\ferrorMessage\x12'\n" +
|
|
"\x05users\x18\x03 \x03(\v2\x11.ldap.v1.UserDataR\x05users\"~\n" +
|
|
"\x11GroupListResponse\x12\x18\n" +
|
|
"\asuccess\x18\x01 \x01(\bR\asuccess\x12#\n" +
|
|
"\rerror_message\x18\x02 \x01(\tR\ferrorMessage\x12*\n" +
|
|
"\x06groups\x18\x03 \x03(\v2\x12.ldap.v1.GroupDataR\x06groups\"\x8d\x01\n" +
|
|
"\x11CreateUserRequest\x12\x1a\n" +
|
|
"\busername\x18\x01 \x01(\tR\busername\x12\x1b\n" +
|
|
"\tfull_name\x18\x02 \x01(\tR\bfullName\x12\x1a\n" +
|
|
"\bpassword\x18\x03 \x01(\tR\bpassword\x12\x19\n" +
|
|
"\x05email\x18\x04 \x01(\tH\x00R\x05email\x88\x01\x01B\b\n" +
|
|
"\x06_email\"\xec\x01\n" +
|
|
"\x11UpdateUserRequest\x12\x1a\n" +
|
|
"\busername\x18\x01 \x01(\tR\busername\x12&\n" +
|
|
"\fdisplay_name\x18\x02 \x01(\tH\x00R\vdisplayName\x88\x01\x01\x12\x19\n" +
|
|
"\x05email\x18\x03 \x01(\tH\x01R\x05email\x88\x01\x01\x12%\n" +
|
|
"\vdescription\x18\x04 \x01(\tH\x02R\vdescription\x88\x01\x01\x12\x1b\n" +
|
|
"\x06avatar\x18\x05 \x01(\fH\x03R\x06avatar\x88\x01\x01B\x0f\n" +
|
|
"\r_display_nameB\b\n" +
|
|
"\x06_emailB\x0e\n" +
|
|
"\f_descriptionB\t\n" +
|
|
"\a_avatar\"V\n" +
|
|
"\x15ChangePasswordRequest\x12\x1a\n" +
|
|
"\busername\x18\x01 \x01(\tR\busername\x12!\n" +
|
|
"\fnew_password\x18\x02 \x01(\tR\vnewPassword\"P\n" +
|
|
"\x13ToggleStatusRequest\x12\x1a\n" +
|
|
"\busername\x18\x01 \x01(\tR\busername\x12\x1d\n" +
|
|
"\n" +
|
|
"set_active\x18\x02 \x01(\bR\tsetActive\"K\n" +
|
|
"\x12GroupMemberRequest\x12\x1a\n" +
|
|
"\busername\x18\x01 \x01(\tR\busername\x12\x19\n" +
|
|
"\bgroup_dn\x18\x02 \x01(\tR\agroupDn2\xbc\x04\n" +
|
|
"\vLdapService\x12<\n" +
|
|
"\bGetUsers\x12\x15.ldap.v1.EmptyRequest\x1a\x19.ldap.v1.UserListResponse\x12A\n" +
|
|
"\n" +
|
|
"CreateUser\x12\x1a.ldap.v1.CreateUserRequest\x1a\x17.ldap.v1.StatusResponse\x12A\n" +
|
|
"\n" +
|
|
"UpdateUser\x12\x1a.ldap.v1.UpdateUserRequest\x1a\x17.ldap.v1.StatusResponse\x12I\n" +
|
|
"\x0eChangePassword\x12\x1e.ldap.v1.ChangePasswordRequest\x1a\x17.ldap.v1.StatusResponse\x12I\n" +
|
|
"\x10ToggleUserStatus\x12\x1c.ldap.v1.ToggleStatusRequest\x1a\x17.ldap.v1.StatusResponse\x12>\n" +
|
|
"\tGetGroups\x12\x15.ldap.v1.EmptyRequest\x1a\x1a.ldap.v1.GroupListResponse\x12F\n" +
|
|
"\x0eAddUserToGroup\x12\x1b.ldap.v1.GroupMemberRequest\x1a\x17.ldap.v1.StatusResponse\x12K\n" +
|
|
"\x13RemoveUserFromGroup\x12\x1b.ldap.v1.GroupMemberRequest\x1a\x17.ldap.v1.StatusResponseB*Z(git.lendry.ru/lendry-erp/proto.git/go;pbb\x06proto3"
|
|
|
|
var (
|
|
file_ldap_proto_rawDescOnce sync.Once
|
|
file_ldap_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_ldap_proto_rawDescGZIP() []byte {
|
|
file_ldap_proto_rawDescOnce.Do(func() {
|
|
file_ldap_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_ldap_proto_rawDesc), len(file_ldap_proto_rawDesc)))
|
|
})
|
|
return file_ldap_proto_rawDescData
|
|
}
|
|
|
|
var file_ldap_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
|
|
var file_ldap_proto_goTypes = []any{
|
|
(*EmptyRequest)(nil), // 0: ldap.v1.EmptyRequest
|
|
(*StatusResponse)(nil), // 1: ldap.v1.StatusResponse
|
|
(*UserData)(nil), // 2: ldap.v1.UserData
|
|
(*GroupData)(nil), // 3: ldap.v1.GroupData
|
|
(*UserListResponse)(nil), // 4: ldap.v1.UserListResponse
|
|
(*GroupListResponse)(nil), // 5: ldap.v1.GroupListResponse
|
|
(*CreateUserRequest)(nil), // 6: ldap.v1.CreateUserRequest
|
|
(*UpdateUserRequest)(nil), // 7: ldap.v1.UpdateUserRequest
|
|
(*ChangePasswordRequest)(nil), // 8: ldap.v1.ChangePasswordRequest
|
|
(*ToggleStatusRequest)(nil), // 9: ldap.v1.ToggleStatusRequest
|
|
(*GroupMemberRequest)(nil), // 10: ldap.v1.GroupMemberRequest
|
|
}
|
|
var file_ldap_proto_depIdxs = []int32{
|
|
2, // 0: ldap.v1.UserListResponse.users:type_name -> ldap.v1.UserData
|
|
3, // 1: ldap.v1.GroupListResponse.groups:type_name -> ldap.v1.GroupData
|
|
0, // 2: ldap.v1.LdapService.GetUsers:input_type -> ldap.v1.EmptyRequest
|
|
6, // 3: ldap.v1.LdapService.CreateUser:input_type -> ldap.v1.CreateUserRequest
|
|
7, // 4: ldap.v1.LdapService.UpdateUser:input_type -> ldap.v1.UpdateUserRequest
|
|
8, // 5: ldap.v1.LdapService.ChangePassword:input_type -> ldap.v1.ChangePasswordRequest
|
|
9, // 6: ldap.v1.LdapService.ToggleUserStatus:input_type -> ldap.v1.ToggleStatusRequest
|
|
0, // 7: ldap.v1.LdapService.GetGroups:input_type -> ldap.v1.EmptyRequest
|
|
10, // 8: ldap.v1.LdapService.AddUserToGroup:input_type -> ldap.v1.GroupMemberRequest
|
|
10, // 9: ldap.v1.LdapService.RemoveUserFromGroup:input_type -> ldap.v1.GroupMemberRequest
|
|
4, // 10: ldap.v1.LdapService.GetUsers:output_type -> ldap.v1.UserListResponse
|
|
1, // 11: ldap.v1.LdapService.CreateUser:output_type -> ldap.v1.StatusResponse
|
|
1, // 12: ldap.v1.LdapService.UpdateUser:output_type -> ldap.v1.StatusResponse
|
|
1, // 13: ldap.v1.LdapService.ChangePassword:output_type -> ldap.v1.StatusResponse
|
|
1, // 14: ldap.v1.LdapService.ToggleUserStatus:output_type -> ldap.v1.StatusResponse
|
|
5, // 15: ldap.v1.LdapService.GetGroups:output_type -> ldap.v1.GroupListResponse
|
|
1, // 16: ldap.v1.LdapService.AddUserToGroup:output_type -> ldap.v1.StatusResponse
|
|
1, // 17: ldap.v1.LdapService.RemoveUserFromGroup:output_type -> ldap.v1.StatusResponse
|
|
10, // [10:18] is the sub-list for method output_type
|
|
2, // [2:10] is the sub-list for method input_type
|
|
2, // [2:2] is the sub-list for extension type_name
|
|
2, // [2:2] is the sub-list for extension extendee
|
|
0, // [0:2] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_ldap_proto_init() }
|
|
func file_ldap_proto_init() {
|
|
if File_ldap_proto != nil {
|
|
return
|
|
}
|
|
file_ldap_proto_msgTypes[6].OneofWrappers = []any{}
|
|
file_ldap_proto_msgTypes[7].OneofWrappers = []any{}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_ldap_proto_rawDesc), len(file_ldap_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumMessages: 11,
|
|
NumExtensions: 0,
|
|
NumServices: 1,
|
|
},
|
|
GoTypes: file_ldap_proto_goTypes,
|
|
DependencyIndexes: file_ldap_proto_depIdxs,
|
|
MessageInfos: file_ldap_proto_msgTypes,
|
|
}.Build()
|
|
File_ldap_proto = out.File
|
|
file_ldap_proto_goTypes = nil
|
|
file_ldap_proto_depIdxs = nil
|
|
}
|