aboutsummaryrefslogtreecommitdiff
path: root/goldap/attribute_value.go
blob: 34fea9743da5d796c3b555dbabfc8b681cdf612a (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
package message

import "fmt"

//
//        AttributeValue ::= OCTET STRING

func readAttributeValue(bytes *Bytes) (ret AttributeValue, err error) {
	octetstring, err := readOCTETSTRING(bytes)
	if err != nil {
		err = LdapError{fmt.Sprintf("readAttributeValue:\n%s", err.Error())}
		return
	}
	ret = AttributeValue(octetstring)
	return
}

func (value AttributeValue) write(bytes *Bytes) int {
	return OCTETSTRING(value).write(bytes)
}

func (value AttributeValue) size() int {
	return OCTETSTRING(value).size()
}