// Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.6.1 // - protoc v3.21.12 // source: ldap.proto package ldap_service import ( context "context" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" ) // This is a compile-time assertion to ensure that this generated file // is compatible with the grpc package it is being compiled against. // Requires gRPC-Go v1.64.0 or later. const _ = grpc.SupportPackageIsVersion9 const ( LdapAuth_VerifyUser_FullMethodName = "/ldap_service.LdapAuth/VerifyUser" LdapAuth_GetUsers_FullMethodName = "/ldap_service.LdapAuth/GetUsers" LdapAuth_CreateUser_FullMethodName = "/ldap_service.LdapAuth/CreateUser" LdapAuth_UpdateUser_FullMethodName = "/ldap_service.LdapAuth/UpdateUser" LdapAuth_ChangePassword_FullMethodName = "/ldap_service.LdapAuth/ChangePassword" LdapAuth_ToggleUserStatus_FullMethodName = "/ldap_service.LdapAuth/ToggleUserStatus" LdapAuth_GetGroups_FullMethodName = "/ldap_service.LdapAuth/GetGroups" LdapAuth_AddUserToGroup_FullMethodName = "/ldap_service.LdapAuth/AddUserToGroup" LdapAuth_RemoveUserFromGroup_FullMethodName = "/ldap_service.LdapAuth/RemoveUserFromGroup" ) // LdapAuthClient is the client API for LdapAuth service. // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. // // ========================================== // ГЛАВНЫЙ СЕРВИС // ========================================== type LdapAuthClient interface { // --- Вектор 1: Авторизация (Bind от имени пользователя) --- VerifyUser(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*VerifyResponse, error) // --- Вектор 2: Управление Пользователями (Bind системного аккаунта) --- GetUsers(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*UserListResponse, error) CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*StatusResponse, error) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*StatusResponse, error) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*StatusResponse, error) ToggleUserStatus(ctx context.Context, in *ToggleStatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) // --- Вектор 3: Управление Группами --- GetGroups(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*GroupListResponse, error) AddUserToGroup(ctx context.Context, in *GroupMemberRequest, opts ...grpc.CallOption) (*StatusResponse, error) RemoveUserFromGroup(ctx context.Context, in *GroupMemberRequest, opts ...grpc.CallOption) (*StatusResponse, error) } type ldapAuthClient struct { cc grpc.ClientConnInterface } func NewLdapAuthClient(cc grpc.ClientConnInterface) LdapAuthClient { return &ldapAuthClient{cc} } func (c *ldapAuthClient) VerifyUser(ctx context.Context, in *VerifyRequest, opts ...grpc.CallOption) (*VerifyResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(VerifyResponse) err := c.cc.Invoke(ctx, LdapAuth_VerifyUser_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *ldapAuthClient) GetUsers(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*UserListResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(UserListResponse) err := c.cc.Invoke(ctx, LdapAuth_GetUsers_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *ldapAuthClient) CreateUser(ctx context.Context, in *CreateUserRequest, opts ...grpc.CallOption) (*StatusResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StatusResponse) err := c.cc.Invoke(ctx, LdapAuth_CreateUser_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *ldapAuthClient) UpdateUser(ctx context.Context, in *UpdateUserRequest, opts ...grpc.CallOption) (*StatusResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StatusResponse) err := c.cc.Invoke(ctx, LdapAuth_UpdateUser_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *ldapAuthClient) ChangePassword(ctx context.Context, in *ChangePasswordRequest, opts ...grpc.CallOption) (*StatusResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StatusResponse) err := c.cc.Invoke(ctx, LdapAuth_ChangePassword_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *ldapAuthClient) ToggleUserStatus(ctx context.Context, in *ToggleStatusRequest, opts ...grpc.CallOption) (*StatusResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StatusResponse) err := c.cc.Invoke(ctx, LdapAuth_ToggleUserStatus_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *ldapAuthClient) GetGroups(ctx context.Context, in *EmptyRequest, opts ...grpc.CallOption) (*GroupListResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(GroupListResponse) err := c.cc.Invoke(ctx, LdapAuth_GetGroups_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *ldapAuthClient) AddUserToGroup(ctx context.Context, in *GroupMemberRequest, opts ...grpc.CallOption) (*StatusResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StatusResponse) err := c.cc.Invoke(ctx, LdapAuth_AddUserToGroup_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } func (c *ldapAuthClient) RemoveUserFromGroup(ctx context.Context, in *GroupMemberRequest, opts ...grpc.CallOption) (*StatusResponse, error) { cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) out := new(StatusResponse) err := c.cc.Invoke(ctx, LdapAuth_RemoveUserFromGroup_FullMethodName, in, out, cOpts...) if err != nil { return nil, err } return out, nil } // LdapAuthServer is the server API for LdapAuth service. // All implementations must embed UnimplementedLdapAuthServer // for forward compatibility. // // ========================================== // ГЛАВНЫЙ СЕРВИС // ========================================== type LdapAuthServer interface { // --- Вектор 1: Авторизация (Bind от имени пользователя) --- VerifyUser(context.Context, *VerifyRequest) (*VerifyResponse, error) // --- Вектор 2: Управление Пользователями (Bind системного аккаунта) --- GetUsers(context.Context, *EmptyRequest) (*UserListResponse, error) CreateUser(context.Context, *CreateUserRequest) (*StatusResponse, error) UpdateUser(context.Context, *UpdateUserRequest) (*StatusResponse, error) ChangePassword(context.Context, *ChangePasswordRequest) (*StatusResponse, error) ToggleUserStatus(context.Context, *ToggleStatusRequest) (*StatusResponse, error) // --- Вектор 3: Управление Группами --- GetGroups(context.Context, *EmptyRequest) (*GroupListResponse, error) AddUserToGroup(context.Context, *GroupMemberRequest) (*StatusResponse, error) RemoveUserFromGroup(context.Context, *GroupMemberRequest) (*StatusResponse, error) mustEmbedUnimplementedLdapAuthServer() } // UnimplementedLdapAuthServer must be embedded to have // forward compatible implementations. // // NOTE: this should be embedded by value instead of pointer to avoid a nil // pointer dereference when methods are called. type UnimplementedLdapAuthServer struct{} func (UnimplementedLdapAuthServer) VerifyUser(context.Context, *VerifyRequest) (*VerifyResponse, error) { return nil, status.Error(codes.Unimplemented, "method VerifyUser not implemented") } func (UnimplementedLdapAuthServer) GetUsers(context.Context, *EmptyRequest) (*UserListResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetUsers not implemented") } func (UnimplementedLdapAuthServer) CreateUser(context.Context, *CreateUserRequest) (*StatusResponse, error) { return nil, status.Error(codes.Unimplemented, "method CreateUser not implemented") } func (UnimplementedLdapAuthServer) UpdateUser(context.Context, *UpdateUserRequest) (*StatusResponse, error) { return nil, status.Error(codes.Unimplemented, "method UpdateUser not implemented") } func (UnimplementedLdapAuthServer) ChangePassword(context.Context, *ChangePasswordRequest) (*StatusResponse, error) { return nil, status.Error(codes.Unimplemented, "method ChangePassword not implemented") } func (UnimplementedLdapAuthServer) ToggleUserStatus(context.Context, *ToggleStatusRequest) (*StatusResponse, error) { return nil, status.Error(codes.Unimplemented, "method ToggleUserStatus not implemented") } func (UnimplementedLdapAuthServer) GetGroups(context.Context, *EmptyRequest) (*GroupListResponse, error) { return nil, status.Error(codes.Unimplemented, "method GetGroups not implemented") } func (UnimplementedLdapAuthServer) AddUserToGroup(context.Context, *GroupMemberRequest) (*StatusResponse, error) { return nil, status.Error(codes.Unimplemented, "method AddUserToGroup not implemented") } func (UnimplementedLdapAuthServer) RemoveUserFromGroup(context.Context, *GroupMemberRequest) (*StatusResponse, error) { return nil, status.Error(codes.Unimplemented, "method RemoveUserFromGroup not implemented") } func (UnimplementedLdapAuthServer) mustEmbedUnimplementedLdapAuthServer() {} func (UnimplementedLdapAuthServer) testEmbeddedByValue() {} // UnsafeLdapAuthServer may be embedded to opt out of forward compatibility for this service. // Use of this interface is not recommended, as added methods to LdapAuthServer will // result in compilation errors. type UnsafeLdapAuthServer interface { mustEmbedUnimplementedLdapAuthServer() } func RegisterLdapAuthServer(s grpc.ServiceRegistrar, srv LdapAuthServer) { // If the following call panics, it indicates UnimplementedLdapAuthServer was // embedded by pointer and is nil. This will cause panics if an // unimplemented method is ever invoked, so we test this at initialization // time to prevent it from happening at runtime later due to I/O. if t, ok := srv.(interface{ testEmbeddedByValue() }); ok { t.testEmbeddedByValue() } s.RegisterService(&LdapAuth_ServiceDesc, srv) } func _LdapAuth_VerifyUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(VerifyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(LdapAuthServer).VerifyUser(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: LdapAuth_VerifyUser_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LdapAuthServer).VerifyUser(ctx, req.(*VerifyRequest)) } return interceptor(ctx, in, info, handler) } func _LdapAuth_GetUsers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(EmptyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(LdapAuthServer).GetUsers(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: LdapAuth_GetUsers_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LdapAuthServer).GetUsers(ctx, req.(*EmptyRequest)) } return interceptor(ctx, in, info, handler) } func _LdapAuth_CreateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(CreateUserRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(LdapAuthServer).CreateUser(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: LdapAuth_CreateUser_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LdapAuthServer).CreateUser(ctx, req.(*CreateUserRequest)) } return interceptor(ctx, in, info, handler) } func _LdapAuth_UpdateUser_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(UpdateUserRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(LdapAuthServer).UpdateUser(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: LdapAuth_UpdateUser_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LdapAuthServer).UpdateUser(ctx, req.(*UpdateUserRequest)) } return interceptor(ctx, in, info, handler) } func _LdapAuth_ChangePassword_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ChangePasswordRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(LdapAuthServer).ChangePassword(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: LdapAuth_ChangePassword_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LdapAuthServer).ChangePassword(ctx, req.(*ChangePasswordRequest)) } return interceptor(ctx, in, info, handler) } func _LdapAuth_ToggleUserStatus_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ToggleStatusRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(LdapAuthServer).ToggleUserStatus(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: LdapAuth_ToggleUserStatus_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LdapAuthServer).ToggleUserStatus(ctx, req.(*ToggleStatusRequest)) } return interceptor(ctx, in, info, handler) } func _LdapAuth_GetGroups_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(EmptyRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(LdapAuthServer).GetGroups(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: LdapAuth_GetGroups_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LdapAuthServer).GetGroups(ctx, req.(*EmptyRequest)) } return interceptor(ctx, in, info, handler) } func _LdapAuth_AddUserToGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GroupMemberRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(LdapAuthServer).AddUserToGroup(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: LdapAuth_AddUserToGroup_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LdapAuthServer).AddUserToGroup(ctx, req.(*GroupMemberRequest)) } return interceptor(ctx, in, info, handler) } func _LdapAuth_RemoveUserFromGroup_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(GroupMemberRequest) if err := dec(in); err != nil { return nil, err } if interceptor == nil { return srv.(LdapAuthServer).RemoveUserFromGroup(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, FullMethod: LdapAuth_RemoveUserFromGroup_FullMethodName, } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(LdapAuthServer).RemoveUserFromGroup(ctx, req.(*GroupMemberRequest)) } return interceptor(ctx, in, info, handler) } // LdapAuth_ServiceDesc is the grpc.ServiceDesc for LdapAuth service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) var LdapAuth_ServiceDesc = grpc.ServiceDesc{ ServiceName: "ldap_service.LdapAuth", HandlerType: (*LdapAuthServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "VerifyUser", Handler: _LdapAuth_VerifyUser_Handler, }, { MethodName: "GetUsers", Handler: _LdapAuth_GetUsers_Handler, }, { MethodName: "CreateUser", Handler: _LdapAuth_CreateUser_Handler, }, { MethodName: "UpdateUser", Handler: _LdapAuth_UpdateUser_Handler, }, { MethodName: "ChangePassword", Handler: _LdapAuth_ChangePassword_Handler, }, { MethodName: "ToggleUserStatus", Handler: _LdapAuth_ToggleUserStatus_Handler, }, { MethodName: "GetGroups", Handler: _LdapAuth_GetGroups_Handler, }, { MethodName: "AddUserToGroup", Handler: _LdapAuth_AddUserToGroup_Handler, }, { MethodName: "RemoveUserFromGroup", Handler: _LdapAuth_RemoveUserFromGroup_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "ldap.proto", }