aboutsummaryrefslogtreecommitdiff
path: root/goldap/filter_present.go
diff options
context:
space:
mode:
Diffstat (limited to 'goldap/filter_present.go')
-rw-r--r--goldap/filter_present.go28
1 files changed, 28 insertions, 0 deletions
diff --git a/goldap/filter_present.go b/goldap/filter_present.go
new file mode 100644
index 0000000..686b83a
--- /dev/null
+++ b/goldap/filter_present.go
@@ -0,0 +1,28 @@
+package message
+
+import "fmt"
+
+// present [7] AttributeDescription,
+func readFilterPresent(bytes *Bytes) (ret FilterPresent, err error) {
+ var attributedescription AttributeDescription
+ attributedescription, err = readTaggedAttributeDescription(bytes, classContextSpecific, TagFilterPresent)
+ if err != nil {
+ err = LdapError{fmt.Sprintf("readFilterPresent:\n%s", err.Error())}
+ return
+ }
+ ret = FilterPresent(attributedescription)
+ return
+}
+
+// present [7] AttributeDescription,
+func (f FilterPresent) write(bytes *Bytes) int {
+ return AttributeDescription(f).writeTagged(bytes, classContextSpecific, TagFilterPresent)
+}
+func (filterAnd FilterPresent) getFilterTag() int {
+ return TagFilterPresent
+}
+
+// present [7] AttributeDescription,
+func (f FilterPresent) size() int {
+ return AttributeDescription(f).sizeTagged(TagFilterPresent)
+}