chore: auto-generate protobuf files [skip ci]
This commit is contained in:
@@ -21,107 +21,6 @@ const (
|
||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||
)
|
||||
|
||||
// Полная модель пользователя
|
||||
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_auth_proto_msgTypes[0]
|
||||
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_auth_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 UserData.ProtoReflect.Descriptor instead.
|
||||
func (*UserData) Descriptor() ([]byte, []int) {
|
||||
return file_ldap_auth_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
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 VerifyRequest struct {
|
||||
state protoimpl.MessageState `protogen:"open.v1"`
|
||||
@@ -133,7 +32,7 @@ type VerifyRequest struct {
|
||||
|
||||
func (x *VerifyRequest) Reset() {
|
||||
*x = VerifyRequest{}
|
||||
mi := &file_ldap_auth_proto_msgTypes[1]
|
||||
mi := &file_ldap_auth_proto_msgTypes[0]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -145,7 +44,7 @@ func (x *VerifyRequest) String() string {
|
||||
func (*VerifyRequest) ProtoMessage() {}
|
||||
|
||||
func (x *VerifyRequest) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ldap_auth_proto_msgTypes[1]
|
||||
mi := &file_ldap_auth_proto_msgTypes[0]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -158,7 +57,7 @@ func (x *VerifyRequest) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use VerifyRequest.ProtoReflect.Descriptor instead.
|
||||
func (*VerifyRequest) Descriptor() ([]byte, []int) {
|
||||
return file_ldap_auth_proto_rawDescGZIP(), []int{1}
|
||||
return file_ldap_auth_proto_rawDescGZIP(), []int{0}
|
||||
}
|
||||
|
||||
func (x *VerifyRequest) GetUsername() string {
|
||||
@@ -186,7 +85,7 @@ type VerifyResponse struct {
|
||||
|
||||
func (x *VerifyResponse) Reset() {
|
||||
*x = VerifyResponse{}
|
||||
mi := &file_ldap_auth_proto_msgTypes[2]
|
||||
mi := &file_ldap_auth_proto_msgTypes[1]
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
ms.StoreMessageInfo(mi)
|
||||
}
|
||||
@@ -198,7 +97,7 @@ func (x *VerifyResponse) String() string {
|
||||
func (*VerifyResponse) ProtoMessage() {}
|
||||
|
||||
func (x *VerifyResponse) ProtoReflect() protoreflect.Message {
|
||||
mi := &file_ldap_auth_proto_msgTypes[2]
|
||||
mi := &file_ldap_auth_proto_msgTypes[1]
|
||||
if x != nil {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
@@ -211,7 +110,7 @@ func (x *VerifyResponse) ProtoReflect() protoreflect.Message {
|
||||
|
||||
// Deprecated: Use VerifyResponse.ProtoReflect.Descriptor instead.
|
||||
func (*VerifyResponse) Descriptor() ([]byte, []int) {
|
||||
return file_ldap_auth_proto_rawDescGZIP(), []int{2}
|
||||
return file_ldap_auth_proto_rawDescGZIP(), []int{1}
|
||||
}
|
||||
|
||||
func (x *VerifyResponse) GetSuccess() bool {
|
||||
@@ -239,23 +138,15 @@ var File_ldap_auth_proto protoreflect.FileDescriptor
|
||||
|
||||
const file_ldap_auth_proto_rawDesc = "" +
|
||||
"\n" +
|
||||
"\x0fldap-auth.proto\x12\fldap_auth.v1\"\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\"G\n" +
|
||||
"\x0fldap-auth.proto\x12\fldap_auth.v1\x1a\n" +
|
||||
"ldap.proto\"G\n" +
|
||||
"\rVerifyRequest\x12\x1a\n" +
|
||||
"\busername\x18\x01 \x01(\tR\busername\x12\x1a\n" +
|
||||
"\bpassword\x18\x02 \x01(\tR\bpassword\"{\n" +
|
||||
"\bpassword\x18\x02 \x01(\tR\bpassword\"v\n" +
|
||||
"\x0eVerifyResponse\x12\x18\n" +
|
||||
"\asuccess\x18\x01 \x01(\bR\asuccess\x12#\n" +
|
||||
"\rerror_message\x18\x02 \x01(\tR\ferrorMessage\x12*\n" +
|
||||
"\x04user\x18\x03 \x01(\v2\x16.ldap_auth.v1.UserDataR\x04user2Z\n" +
|
||||
"\rerror_message\x18\x02 \x01(\tR\ferrorMessage\x12%\n" +
|
||||
"\x04user\x18\x03 \x01(\v2\x11.ldap.v1.UserDataR\x04user2Z\n" +
|
||||
"\x0fLdapAuthService\x12G\n" +
|
||||
"\n" +
|
||||
"VerifyUser\x12\x1b.ldap_auth.v1.VerifyRequest\x1a\x1c.ldap_auth.v1.VerifyResponseB*Z(git.lendry.ru/lendry-erp/proto.git/go;pbb\x06proto3"
|
||||
@@ -272,16 +163,16 @@ func file_ldap_auth_proto_rawDescGZIP() []byte {
|
||||
return file_ldap_auth_proto_rawDescData
|
||||
}
|
||||
|
||||
var file_ldap_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
|
||||
var file_ldap_auth_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_ldap_auth_proto_goTypes = []any{
|
||||
(*UserData)(nil), // 0: ldap_auth.v1.UserData
|
||||
(*VerifyRequest)(nil), // 1: ldap_auth.v1.VerifyRequest
|
||||
(*VerifyResponse)(nil), // 2: ldap_auth.v1.VerifyResponse
|
||||
(*VerifyRequest)(nil), // 0: ldap_auth.v1.VerifyRequest
|
||||
(*VerifyResponse)(nil), // 1: ldap_auth.v1.VerifyResponse
|
||||
(*UserData)(nil), // 2: ldap.v1.UserData
|
||||
}
|
||||
var file_ldap_auth_proto_depIdxs = []int32{
|
||||
0, // 0: ldap_auth.v1.VerifyResponse.user:type_name -> ldap_auth.v1.UserData
|
||||
1, // 1: ldap_auth.v1.LdapAuthService.VerifyUser:input_type -> ldap_auth.v1.VerifyRequest
|
||||
2, // 2: ldap_auth.v1.LdapAuthService.VerifyUser:output_type -> ldap_auth.v1.VerifyResponse
|
||||
2, // 0: ldap_auth.v1.VerifyResponse.user:type_name -> ldap.v1.UserData
|
||||
0, // 1: ldap_auth.v1.LdapAuthService.VerifyUser:input_type -> ldap_auth.v1.VerifyRequest
|
||||
1, // 2: ldap_auth.v1.LdapAuthService.VerifyUser:output_type -> ldap_auth.v1.VerifyResponse
|
||||
2, // [2:3] is the sub-list for method output_type
|
||||
1, // [1:2] is the sub-list for method input_type
|
||||
1, // [1:1] is the sub-list for extension type_name
|
||||
@@ -294,13 +185,14 @@ func file_ldap_auth_proto_init() {
|
||||
if File_ldap_auth_proto != nil {
|
||||
return
|
||||
}
|
||||
file_ldap_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_ldap_auth_proto_rawDesc), len(file_ldap_auth_proto_rawDesc)),
|
||||
NumEnums: 0,
|
||||
NumMessages: 3,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user