You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// SearchAsyncResponse holds the server's response message to an async search request
352
+
typeSearchAsyncResponsestruct {
353
+
// Type indicates the SearchAsyncResponse type
354
+
TypeSearchAsyncResponseType
355
+
// Entry is the received entry, only set if Type is SearchAsyncResponseTypeEntry
356
+
Entry*Entry
357
+
// Referral is the received referral, only set if Type is SearchAsyncResponseTypeReferral
358
+
Referralstring
359
+
// Control is the received control, only set if Type is SearchAsyncResponseTypeControl
360
+
ControlControl
361
+
// closed indicates that the request is finished
362
+
closedbool
363
+
// err holds the encountered error while processing server's response, if any
364
+
errerror
365
+
}
366
+
367
+
// Closed returns true if the request is finished
368
+
func (r*SearchAsyncResponse) Closed() bool {
369
+
returnr.closed
370
+
}
371
+
372
+
// Err returns the encountered error while processing server's response, if any
373
+
func (r*SearchAsyncResponse) Err() error {
374
+
returnr.err
375
+
}
376
+
341
377
// SearchRequest represents a search request to send to the server
342
378
typeSearchRequeststruct {
343
379
BaseDNstring
@@ -405,10 +441,11 @@ func NewSearchRequest(
405
441
// SearchWithPaging accepts a search request and desired page size in order to execute LDAP queries to fulfill the
406
442
// search request. All paged LDAP query responses will be buffered and the final result will be returned atomically.
407
443
// The following four cases are possible given the arguments:
408
-
// - given SearchRequest missing a control of type ControlTypePaging: we will add one with the desired paging size
409
-
// - given SearchRequest contains a control of type ControlTypePaging that isn't actually a ControlPaging: fail without issuing any queries
410
-
// - given SearchRequest contains a control of type ControlTypePaging with pagingSize equal to the size requested: no change to the search request
411
-
// - given SearchRequest contains a control of type ControlTypePaging with pagingSize not equal to the size requested: fail without issuing any queries
444
+
// - given SearchRequest missing a control of type ControlTypePaging: we will add one with the desired paging size
445
+
// - given SearchRequest contains a control of type ControlTypePaging that isn't actually a ControlPaging: fail without issuing any queries
446
+
// - given SearchRequest contains a control of type ControlTypePaging with pagingSize equal to the size requested: no change to the search request
447
+
// - given SearchRequest contains a control of type ControlTypePaging with pagingSize not equal to the size requested: fail without issuing any queries
448
+
//
412
449
// A requested pagingSize of 0 is interpreted as no limit by LDAP servers.
// SearchAsync performs the given search request asynchronously, it takes an optional done channel to stop the request. It returns a SearchAsyncResponse channel which will be
560
+
// closed when the request finished and an error, not nil if the request to the server failed
0 commit comments