aboutsummaryrefslogtreecommitdiff
path: root/goldap/filter_approx_match.go
blob: 65a802fd8bcf73db8ad94fd16610c69fac4eebe1 (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
30
31
32
33
34
package message

import "fmt"

//             approxMatch     [8] AttributeValueAssertion,
func readFilterApproxMatch(bytes *Bytes) (ret FilterApproxMatch, err error) {
	var attributevalueassertion AttributeValueAssertion
	attributevalueassertion, err = readTaggedAttributeValueAssertion(bytes, classContextSpecific, TagFilterApproxMatch)
	if err != nil {
		err = LdapError{fmt.Sprintf("readFilterApproxMatch:\n%s", err.Error())}
		return
	}
	ret = FilterApproxMatch(attributevalueassertion)
	return
}

//             approxMatch     [8] AttributeValueAssertion,
func (f FilterApproxMatch) write(bytes *Bytes) int {
	return AttributeValueAssertion(f).writeTagged(bytes, classContextSpecific, TagFilterApproxMatch)
}
func (filterAnd FilterApproxMatch) getFilterTag() int {
	return TagFilterApproxMatch
}

//             approxMatch     [8] AttributeValueAssertion,
func (f FilterApproxMatch) size() int {
	return AttributeValueAssertion(f).sizeTagged(TagFilterApproxMatch)
}
func (a *FilterApproxMatch) AttributeDesc() AttributeDescription {
	return a.attributeDesc
}
func (a *FilterApproxMatch) AssertionValue() AssertionValue {
	return a.assertionValue
}