forked from go-adsi/adsi
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconstants.go
40 lines (31 loc) · 1.51 KB
/
constants.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
38
39
40
package adsi
import (
"errors"
"github.com/continuum-nilesh-akhade/adsi/api"
)
var (
// ErrClosed is returned from calls to a service or interface in the event
// that the Close() function has already been called.
ErrClosed = errors.New("interface is closing or already closed")
// ErrNonDispatchVariant is returned when an attempt is made to cast an
// ole.VARIANT to an ole.IDispatch type, but the VARIANT is of some other
// This might happen, for example, when an iterator is interrogating the
// members of an IEnumVARIANT in an attempt to convert them into an expected
// type.
ErrNonDispatchVariant = errors.New("object iterator unexpectedly yielded non-dispatch variant")
// ErrInvalidGUID is returned when a given value cannot be interpreted as
// a globally unique identifier.
ErrInvalidGUID = errors.New("invalid GUID")
// ErrNonArrayAttribute is returned when a given attribute cannot be converted
// to a safe array.
ErrNonArrayAttribute = errors.New("attribute is not an array")
// ErrMultiDimArrayAttribute is returned when an attribute contains more than
// one dimension in its array of values.
ErrMultiDimArrayAttribute = errors.New("attribute contains a multi-dimensional array of values")
// ErrNonVariantArrayAttribute is returned when the array members of a given
// attribute are not variants.
ErrNonVariantArrayAttribute = errors.New("attribute contains non-variant array members")
)
const (
defaultFlags = api.ADS_READONLY_SERVER | api.ADS_SECURE_AUTHENTICATION | api.ADS_USE_SEALING
)