aboutsummaryrefslogtreecommitdiff
path: root/goldap/del_response.go
blob: f2e14a7c5142a3d19163a97f1799c9c03d5329c8 (plain) (blame)
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
package message

import "fmt"

//
//        DelResponse ::= [APPLICATION 11] LDAPResult

func (del *DelResponse) SetResultCode(code int) {
	del.resultCode = ENUMERATED(code)
}

func readDelResponse(bytes *Bytes) (ret DelResponse, err error) {
	var res LDAPResult
	res, err = readTaggedLDAPResult(bytes, classApplication, TagDelResponse)
	if err != nil {
		err = LdapError{fmt.Sprintf("readDelResponse:\n%s", err.Error())}
		return
	}
	ret = DelResponse(res)
	return
}

func (del DelResponse) write(bytes *Bytes) int {
	return LDAPResult(del).writeTagged(bytes, classApplication, TagDelResponse)
}

func (del DelResponse) size() int {
	return LDAPResult(del).sizeTagged(TagDelResponse)
}