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
232
+
typeSearchAsyncResponsestruct {
233
+
// Type indicates the SearchAsyncResponse type
234
+
TypeSearchAsyncResponseType
235
+
// Entry is the received entry, only set if Type is SearchAsyncResponseTypeEntry
236
+
Entry*Entry
237
+
// Referral is the received referral, only set if Type is SearchAsyncResponseTypeReferral
238
+
Referralstring
239
+
// Control is the received control, only set if Type is SearchAsyncResponseTypeControl
240
+
ControlControl
241
+
// closed indicates that the request is finished
242
+
closedbool
243
+
// err holds the encountered error while processing server's response, if any
244
+
errerror
245
+
}
246
+
247
+
// Closed returns true if the request is finished
248
+
func (r*SearchAsyncResponse) Closed() bool {
249
+
returnr.closed
250
+
}
251
+
252
+
// Err returns the encountered error while processing server's response, if any
253
+
func (r*SearchAsyncResponse) Err() error {
254
+
returnr.err
255
+
}
256
+
221
257
// SearchRequest represents a search request to send to the server
222
258
typeSearchRequeststruct {
223
259
BaseDNstring
@@ -285,10 +321,11 @@ func NewSearchRequest(
285
321
// SearchWithPaging accepts a search request and desired page size in order to execute LDAP queries to fulfill the
286
322
// search request. All paged LDAP query responses will be buffered and the final result will be returned atomically.
287
323
// The following four cases are possible given the arguments:
288
-
// - given SearchRequest missing a control of type ControlTypePaging: we will add one with the desired paging size
289
-
// - given SearchRequest contains a control of type ControlTypePaging that isn't actually a ControlPaging: fail without issuing any queries
290
-
// - given SearchRequest contains a control of type ControlTypePaging with pagingSize equal to the size requested: no change to the search request
291
-
// - given SearchRequest contains a control of type ControlTypePaging with pagingSize not equal to the size requested: fail without issuing any queries
324
+
// - given SearchRequest missing a control of type ControlTypePaging: we will add one with the desired paging size
325
+
// - given SearchRequest contains a control of type ControlTypePaging that isn't actually a ControlPaging: fail without issuing any queries
326
+
// - given SearchRequest contains a control of type ControlTypePaging with pagingSize equal to the size requested: no change to the search request
327
+
// - given SearchRequest contains a control of type ControlTypePaging with pagingSize not equal to the size requested: fail without issuing any queries
328
+
//
292
329
// 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
443
+
// closed when the request finished and an error, not nil if the request to the server failed
0 commit comments