forked from openshift/origin
/
messageExtended.go
37 lines (32 loc) · 1.14 KB
/
messageExtended.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
package ldapserver
// ExtendedRequest operation allows additional operations to be defined for
// services not already available in the protocol
// The Extended operation allows clients to send request with predefined
// syntaxes and semantics. These may be defined in RFCs or be private to
// particular implementations.
type ExtendedRequest struct {
requestName LDAPOID
requestValue []byte
}
func (r *ExtendedRequest) GetResponseName() LDAPOID {
return r.requestName
}
func (r *ExtendedRequest) GetResponseValue() []byte {
return r.requestValue
}
// ExtendedResponse operation allows additional operations to be defined for
// services not already available in the protocol, like the disconnection
// notification sent by the server before it stops serving
// The Extended operation allows clients to receive
// responses with predefined syntaxes and semantics. These may be
// defined in RFCs or be private to particular implementations.
type ExtendedResponse struct {
ldapResult
ResponseName LDAPOID
ResponseValue string
}
func NewExtendedResponse(resultCode int) *ExtendedResponse {
r := &ExtendedResponse{}
r.ResultCode = resultCode
return r
}