-
Notifications
You must be signed in to change notification settings - Fork 93
/
responsemessage.go
57 lines (47 loc) · 1.22 KB
/
responsemessage.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
package ldapserver
import ldap "github.com/lor00x/goldap/message"
func NewBindResponse(resultCode int) ldap.BindResponse {
r := ldap.BindResponse{}
r.SetResultCode(resultCode)
return r
}
func NewResponse(resultCode int) ldap.LDAPResult {
r := ldap.LDAPResult{}
r.SetResultCode(resultCode)
return r
}
func NewExtendedResponse(resultCode int) ldap.ExtendedResponse {
r := ldap.ExtendedResponse{}
r.SetResultCode(resultCode)
return r
}
func NewCompareResponse(resultCode int) ldap.CompareResponse {
r := ldap.CompareResponse{}
r.SetResultCode(resultCode)
return r
}
func NewModifyResponse(resultCode int) ldap.ModifyResponse {
r := ldap.ModifyResponse{}
r.SetResultCode(resultCode)
return r
}
func NewDeleteResponse(resultCode int) ldap.DelResponse {
r := ldap.DelResponse{}
r.SetResultCode(resultCode)
return r
}
func NewAddResponse(resultCode int) ldap.AddResponse {
r := ldap.AddResponse{}
r.SetResultCode(resultCode)
return r
}
func NewSearchResultDoneResponse(resultCode int) ldap.SearchResultDone {
r := ldap.SearchResultDone{}
r.SetResultCode(resultCode)
return r
}
func NewSearchResultEntry(objectname string) ldap.SearchResultEntry {
r := ldap.SearchResultEntry{}
r.SetObjectName(objectname)
return r
}