Version: v0.0.0-...-a546dff Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2018 License: GPL-2.0 Imports: 4 Imported by: 22




View Source
const BindRequestVersionMax = 127
View Source
const BindRequestVersionMin = 1
View Source
const ModifyRequestChangeOperationAdd = 0
View Source
const ModifyRequestChangeOperationDelete = 1
View Source
const ModifyRequestChangeOperationReplace = 2
View Source
const ResultCodeAdminLimitExceeded = 11
View Source
const ResultCodeAffectsMultipleDSAs = 71
View Source
const ResultCodeAliasDereferencingProblem = 36
View Source
const ResultCodeAliasProblem = 33
View Source
const ResultCodeAttributeOrValueExists = 20
View Source
const ResultCodeAuthMethodNotSupported = 7
View Source
const ResultCodeBusy = 51
View Source
const ResultCodeCompareFalse = 5
View Source
const ResultCodeCompareTrue = 6
View Source
const ResultCodeConfidentialityRequired = 13
View Source
const ResultCodeConstraintViolation = 19
View Source
const ResultCodeEntryAlreadyExists = 68
View Source
const ResultCodeInappropriateAuthentication = 48
View Source
const ResultCodeInappropriateMatching = 18
View Source
const ResultCodeInsufficientAccessRights = 50
View Source
const ResultCodeInvalidAttributeSyntax = 21
View Source
const ResultCodeInvalidCredentials = 49
View Source
const ResultCodeInvalidDNSyntax = 34
View Source
const ResultCodeLoopDetect = 54
View Source
const ResultCodeNamingViolation = 64
View Source
const ResultCodeNoSuchAttribute = 16
View Source
const ResultCodeNoSuchObject = 32
View Source
const ResultCodeNotAllowedOnNonLeaf = 66
View Source
const ResultCodeNotAllowedOnRDN = 67
View Source
const ResultCodeObjectClassModsProhibited = 69
View Source
const ResultCodeObjectClassViolation = 65
View Source
const ResultCodeOperationsError = 1
View Source
const ResultCodeOther = 80
View Source
const ResultCodeProtocolError = 2
View Source
const ResultCodeReferral = 10
View Source
const ResultCodeSaslBindInProgress = 14
View Source
const ResultCodeSizeLimitExceeded = 4
View Source
const ResultCodeStrongerAuthRequired = 8
View Source
const ResultCodeSuccess = 0
View Source
const ResultCodeTimeLimitExceeded = 3
View Source
const ResultCodeUnavailable = 52
View Source
const ResultCodeUnavailableCriticalExtension = 12
View Source
const ResultCodeUndefinedAttributeType = 17
View Source
const ResultCodeUnwillingToPerform = 53
View Source
const SearchRequestHomeSubtree = 2
View Source
const SearchRequestScopeBaseObject = 0
View Source
const SearchRequestSingleLevel = 1
View Source
const SearchRequetDerefAliasesDerefAlways = 3
View Source
const SearchRequetDerefAliasesDerefFindingBaseObj = 2
View Source
const SearchRequetDerefAliasesDerefInSearching = 1
View Source
const SearchRequetDerefAliasesNeverDerefAliases = 0
View Source
const TagAbandonRequest = 16

AbandonRequest ::= [APPLICATION 16] MessageID

View Source
const TagAddRequest = 8

Sermersheim Standards Track [Page 58]

RFC 4511 LDAPv3 June 2006

     entry           LDAPDN,
     attributes      AttributeList }
View Source
const TagAddResponse = 9

AddResponse ::= [APPLICATION 9] LDAPResult

View Source
const TagAuthenticationChoiceSaslCredentials = 3
View Source
const TagAuthenticationChoiceSimple = 0

AuthenticationChoice ::= CHOICE {

simple                  [0] OCTET STRING,
                        -- 1 and 2 reserved
sasl                    [3] SaslCredentials,
...  }
View Source
const TagBindRequest = 0

Sermersheim Standards Track [Page 56]

RFC 4511 LDAPv3 June 2006

BindRequest ::= [APPLICATION 0] SEQUENCE {
     version                 INTEGER (1 ..  127),
     name                    LDAPDN,
     authentication          AuthenticationChoice }
View Source
const TagBindResponse = 1

BindResponse ::= [APPLICATION 1] SEQUENCE {

serverSaslCreds    [7] OCTET STRING OPTIONAL }
View Source
const TagBindResponseServerSaslCreds = 7
View Source
const TagCompareRequest = 14

CompareRequest ::= [APPLICATION 14] SEQUENCE {

entry           LDAPDN,
ava             AttributeValueAssertion }
View Source
const TagCompareResponse = 15

CompareResponse ::= [APPLICATION 15] LDAPResult

View Source
const TagDelRequest = 10

DelRequest ::= [APPLICATION 10] LDAPDN

View Source
const TagDelResponse = 11

DelResponse ::= [APPLICATION 11] LDAPResult

View Source
const TagExtendedRequest = 23

ExtendedRequest ::= [APPLICATION 23] SEQUENCE {

requestName      [0] LDAPOID,
requestValue     [1] OCTET STRING OPTIONAL }
View Source
const TagExtendedRequestName = 0
View Source
const TagExtendedRequestValue = 1
View Source
const TagExtendedResponse = 24

ExtendedResponse ::= [APPLICATION 24] SEQUENCE {

responseName     [10] LDAPOID OPTIONAL,
responseValue    [11] OCTET STRING OPTIONAL }
View Source
const TagExtendedResponseName = 10
View Source
const TagExtendedResponseValue = 11
View Source
const TagFilterAnd = 0
Filter ::= CHOICE {
     and             [0] SET SIZE (1..MAX) OF filter Filter,
     or              [1] SET SIZE (1..MAX) OF filter Filter,
     not             [2] Filter,
     equalityMatch   [3] AttributeValueAssertion,

Sermersheim Standards Track [Page 57]

RFC 4511 LDAPv3 June 2006

substrings      [4] SubstringFilter,
greaterOrEqual  [5] AttributeValueAssertion,
lessOrEqual     [6] AttributeValueAssertion,
present         [7] AttributeDescription,
approxMatch     [8] AttributeValueAssertion,
extensibleMatch [9] MatchingRuleAssertion,
...  }
View Source
const TagFilterApproxMatch = 8
View Source
const TagFilterEqualityMatch = 3
View Source
const TagFilterExtensibleMatch = 9
View Source
const TagFilterGreaterOrEqual = 5
View Source
const TagFilterLessOrEqual = 6
View Source
const TagFilterNot = 2
View Source
const TagFilterOr = 1
View Source
const TagFilterPresent = 7
View Source
const TagFilterSubstrings = 4
View Source
const TagIntermediateResponse = 25

IntermediateResponse ::= [APPLICATION 25] SEQUENCE {

responseName     [0] LDAPOID OPTIONAL,
responseValue    [1] OCTET STRING OPTIONAL }
View Source
const TagIntermediateResponseName = 0
View Source
const TagIntermediateResponseValue = 1
View Source
const TagLDAPMessageControls = 0
View Source
const TagLDAPResultReferral = 3
View Source
const TagMatchingRuleAssertionDnAttributes = 4
View Source
const TagMatchingRuleAssertionMatchValue = 3
View Source
const TagMatchingRuleAssertionMatchingRule = 1
View Source
const TagMatchingRuleAssertionType = 2
View Source
const TagModifyDNRequest = 12

ModifyDNRequest ::= [APPLICATION 12] SEQUENCE {

entry           LDAPDN,
newrdn          RelativeLDAPDN,
deleteoldrdn    BOOLEAN,
newSuperior     [0] LDAPDN OPTIONAL }
View Source
const TagModifyDNRequestNewSuperior = 0
View Source
const TagModifyDNResponse = 13

ModifyDNResponse ::= [APPLICATION 13] LDAPResult

View Source
const TagModifyRequest = 6

ModifyRequest ::= [APPLICATION 6] SEQUENCE {

object          LDAPDN,
changes         SEQUENCE OF change SEQUENCE {
     operation       ENUMERATED {
          add     (0),
          delete  (1),
          replace (2),
          ...  },
     modification    PartialAttribute } }
View Source
const TagModifyResponse = 7

ModifyResponse ::= [APPLICATION 7] LDAPResult

View Source
const TagSearchRequest = 3

SearchRequest ::= [APPLICATION 3] SEQUENCE {

baseObject      LDAPDN,
scope           ENUMERATED {
     baseObject              (0),
     singleLevel             (1),
     wholeSubtree            (2),
     ...  },
derefAliases    ENUMERATED {
     neverDerefAliases       (0),
     derefInSearching        (1),
     derefFindingBaseObj     (2),
     derefAlways             (3) },
sizeLimit       INTEGER (0 ..  maxInt),
timeLimit       INTEGER (0 ..  maxInt),
typesOnly       BOOLEAN,
filter          Filter,
attributes      AttributeSelection }
View Source
const TagSearchResultDone = 5

SearchResultDone ::= [APPLICATION 5] LDAPResult

View Source
const TagSearchResultEntry = 4

SearchResultEntry ::= [APPLICATION 4] SEQUENCE {

objectName      LDAPDN,
attributes      PartialAttributeList }
View Source
const TagSearchResultReference = 19

SearchResultReference ::= [APPLICATION 19] SEQUENCE

SIZE (1..MAX) OF uri URI
View Source
const TagSubstringAny = 1
View Source
const TagSubstringFinal = 2
View Source
const TagSubstringInitial = 0
View Source
const TagUnbindRequest = 2

UnbindRequest ::= [APPLICATION 2] NULL


View Source
var EnumeratedLDAPResultCode = map[ENUMERATED]string{
	ResultCodeSuccess:                "success",
	ResultCodeOperationsError:        "operationsError",
	ResultCodeProtocolError:          "protocolError",
	ResultCodeTimeLimitExceeded:      "timeLimitExceeded",
	ResultCodeSizeLimitExceeded:      "sizeLimitExceeded",
	ResultCodeCompareFalse:           "compareFalse",
	ResultCodeCompareTrue:            "compareTrue",
	ResultCodeAuthMethodNotSupported: "authMethodNotSupported",
	ResultCodeStrongerAuthRequired:   "strongerAuthRequired",

	ResultCodeReferral:                     "referral",
	ResultCodeAdminLimitExceeded:           "adminLimitExceeded",
	ResultCodeUnavailableCriticalExtension: "unavailableCriticalExtension",
	ResultCodeConfidentialityRequired:      "confidentialityRequired",
	ResultCodeSaslBindInProgress:           "saslBindInProgress",
	ResultCodeNoSuchAttribute:              "noSuchAttribute",
	ResultCodeUndefinedAttributeType:       "undefinedAttributeType",
	ResultCodeInappropriateMatching:        "inappropriateMatching",
	ResultCodeConstraintViolation:          "constraintViolation",
	ResultCodeAttributeOrValueExists:       "attributeOrValueExists",
	ResultCodeInvalidAttributeSyntax:       "invalidAttributeSyntax",

	ResultCodeNoSuchObject:    "noSuchObject",
	ResultCodeAliasProblem:    "aliasProblem",
	ResultCodeInvalidDNSyntax: "invalidDNSyntax",

	ResultCodeAliasDereferencingProblem: "aliasDereferencingProblem",

	ResultCodeInappropriateAuthentication: "inappropriateAuthentication",
	ResultCodeInvalidCredentials:          "invalidCredentials",
	ResultCodeInsufficientAccessRights:    "insufficientAccessRights",
	ResultCodeBusy:                        "busy",
	ResultCodeUnavailable:                 "unavailable",
	ResultCodeUnwillingToPerform:          "unwillingToPerform",
	ResultCodeLoopDetect:                  "loopDetect",

	ResultCodeNamingViolation:           "namingViolation",
	ResultCodeObjectClassViolation:      "objectClassViolation",
	ResultCodeNotAllowedOnNonLeaf:       "notAllowedOnNonLeaf",
	ResultCodeNotAllowedOnRDN:           "notAllowedOnRDN",
	ResultCodeEntryAlreadyExists:        "entryAlreadyExists",
	ResultCodeObjectClassModsProhibited: "objectClassModsProhibited",

	ResultCodeAffectsMultipleDSAs: "affectsMultipleDSAs",

	ResultCodeOther: "other",
View Source
var EnumeratedModifyRequestChangeOperation = map[ENUMERATED]string{
	ModifyRequestChangeOperationAdd:     "add",
	ModifyRequestChangeOperationDelete:  "delete",
	ModifyRequestChangeOperationReplace: "replace",
View Source
var EnumeratedSearchRequestDerefAliases = map[ENUMERATED]string{
	SearchRequetDerefAliasesNeverDerefAliases:   "neverDerefAliases",
	SearchRequetDerefAliasesDerefInSearching:    "derefInSearching",
	SearchRequetDerefAliasesDerefFindingBaseObj: "derefFindingBaseObj",
	SearchRequetDerefAliasesDerefAlways:         "derefAlways",
View Source
var EnumeratedSearchRequestScope = map[ENUMERATED]string{
	SearchRequestScopeBaseObject: "baseObject",
	SearchRequestSingleLevel:     "singleLevel",
	SearchRequestHomeSubtree:     "homeSubtree",


func SizePrimitiveSubBytes

func SizePrimitiveSubBytes(tag int, value interface{}) (size int)

func SizeSubBytes

func SizeSubBytes(tag int, callback func() int) (size int)


type AbandonRequest

type AbandonRequest MessageID

type AddRequest

type AddRequest struct {
	// contains filtered or unexported fields

func (*AddRequest) Attributes

func (add *AddRequest) Attributes() AttributeList

func (*AddRequest) Entry

func (add *AddRequest) Entry() LDAPDN

type AddResponse

type AddResponse LDAPResult

func (*AddResponse) SetResultCode

func (l *AddResponse) SetResultCode(code int)

type AssertionValue

type AssertionValue OCTETSTRING

AssertionValue ::= OCTET STRING

type Attribute

type Attribute PartialAttribute

Attribute ::= PartialAttribute(WITH COMPONENTS {

vals (SIZE(1..MAX))})

func (*Attribute) Type_

func (attribute *Attribute) Type_() AttributeDescription

func (*Attribute) Vals

func (attribute *Attribute) Vals() []AttributeValue

type AttributeDescription

type AttributeDescription LDAPString

AttributeDescription ::= LDAPString

-- Constrained to <attributedescription>
-- [RFC4512]

func (AttributeDescription) Pointer

func (description AttributeDescription) Pointer() *AttributeDescription

type AttributeList

type AttributeList []Attribute

AttributeList ::= SEQUENCE OF attribute Attribute

type AttributeSelection

type AttributeSelection []LDAPString

AttributeSelection ::= SEQUENCE OF selector LDAPString

-- The LDAPString is constrained to
-- <attributeSelector> in Section

type AttributeValue

type AttributeValue OCTETSTRING

AttributeValue ::= OCTET STRING

type AttributeValueAssertion

type AttributeValueAssertion struct {
	// contains filtered or unexported fields

AttributeValueAssertion ::= SEQUENCE {

attributeDesc   AttributeDescription,
assertionValue  AssertionValue }

func (*AttributeValueAssertion) AssertionValue

func (assertion *AttributeValueAssertion) AssertionValue() AssertionValue

func (*AttributeValueAssertion) AttributeDesc

func (assertion *AttributeValueAssertion) AttributeDesc() AttributeDescription

type AuthenticationChoice

type AuthenticationChoice interface {
	// contains filtered or unexported methods


type BOOLEAN bool

func (BOOLEAN) Bool

func (boolean BOOLEAN) Bool() bool

type BindRequest

type BindRequest struct {
	// contains filtered or unexported fields

func (*BindRequest) Authentication

func (request *BindRequest) Authentication() AuthenticationChoice

func (*BindRequest) AuthenticationChoice

func (request *BindRequest) AuthenticationChoice() string

func (*BindRequest) AuthenticationSimple

func (request *BindRequest) AuthenticationSimple() OCTETSTRING

func (*BindRequest) Name

func (request *BindRequest) Name() LDAPDN

type BindResponse

type BindResponse struct {
	// contains filtered or unexported fields

type Bytes

type Bytes struct {
	// contains filtered or unexported fields

func NewBytes

func NewBytes(offset int, bytes []byte) (ret *Bytes)

func (*Bytes) Bytes

func (bytes *Bytes) Bytes() []byte

func (Bytes) Debug

func (bytes Bytes) Debug()

func (*Bytes) DumpCurrentBytes

func (bytes *Bytes) DumpCurrentBytes() (ret string)

Return a string with the hex dump of the bytes around the current offset The current offset byte is put in brackets Example: 0x01, [0x02], 0x03

func (*Bytes) HasMoreData

func (bytes *Bytes) HasMoreData() bool

func (*Bytes) ParseTagAndLength

func (bytes *Bytes) ParseTagAndLength() (ret TagAndLength, err error)

func (*Bytes) PreviewTagAndLength

func (bytes *Bytes) PreviewTagAndLength() (tagAndLength TagAndLength, err error)

func (*Bytes) ReadPrimitiveSubBytes

func (bytes *Bytes) ReadPrimitiveSubBytes(class int, tag int, typeTag int) (value interface{}, err error)

Parse tag, length and read the a primitive value Supported types are: - boolean - integer (parsed as int32) - enumerated (parsed as int32) - UTF8 string - Octet string

Parameters: - class: the expected class value(classUniversal, classApplication, classContextSpecific) - tag: the expected tag value - typeTag: the real primitive type to parse (tagBoolean, tagInteger, tagEnym, tagUTF8String, tagOctetString)

func (*Bytes) ReadSubBytes

func (bytes *Bytes) ReadSubBytes(class int, tag int, callback func(bytes *Bytes) error) (err error)

func (*Bytes) WritePrimitiveSubBytes

func (bytes *Bytes) WritePrimitiveSubBytes(class int, tag int, value interface{}) (size int)

func (*Bytes) WriteTagAndLength

func (bytes *Bytes) WriteTagAndLength(class int, compound bool, tag int, length int) int

type CompareRequest

type CompareRequest struct {
	// contains filtered or unexported fields

func (*CompareRequest) Ava

func (request *CompareRequest) Ava() *AttributeValueAssertion

func (*CompareRequest) Entry

func (request *CompareRequest) Entry() LDAPDN

type CompareResponse

type CompareResponse LDAPResult

func (*CompareResponse) SetResultCode

func (response *CompareResponse) SetResultCode(code int)

type Control

type Control struct {
	// contains filtered or unexported fields

Control ::= SEQUENCE {

controlType             LDAPOID,
criticality             BOOLEAN DEFAULT FALSE,
controlValue            OCTET STRING OPTIONAL }

func (*Control) ControlType

func (control *Control) ControlType() LDAPOID

func (*Control) ControlValue

func (control *Control) ControlValue() *OCTETSTRING

func (*Control) Criticality

func (control *Control) Criticality() BOOLEAN

type Controls

type Controls []Control

Controls ::= SEQUENCE OF control Control

func (Controls) Pointer

func (controls Controls) Pointer() *Controls

type DelRequest

type DelRequest LDAPDN

type DelResponse

type DelResponse LDAPResult

func (*DelResponse) SetResultCode

func (del *DelResponse) SetResultCode(code int)


type ENUMERATED int32


func (enum ENUMERATED) Int() int

type Enumerated

type Enumerated int

An Enumerated is represented as a plain int.

type ExtendedRequest

type ExtendedRequest struct {
	// contains filtered or unexported fields

func (*ExtendedRequest) RequestName

func (extended *ExtendedRequest) RequestName() LDAPOID

func (*ExtendedRequest) RequestValue

func (extended *ExtendedRequest) RequestValue() *OCTETSTRING

type ExtendedResponse

type ExtendedResponse struct {
	// contains filtered or unexported fields

func (*ExtendedResponse) SetResponseName

func (extended *ExtendedResponse) SetResponseName(name LDAPOID)

type Filter

type Filter interface {
	// contains filtered or unexported methods

type FilterAnd

type FilterAnd []Filter

type FilterApproxMatch

type FilterApproxMatch AttributeValueAssertion

func (*FilterApproxMatch) AssertionValue

func (a *FilterApproxMatch) AssertionValue() AssertionValue

func (*FilterApproxMatch) AttributeDesc

func (a *FilterApproxMatch) AttributeDesc() AttributeDescription

type FilterEqualityMatch

type FilterEqualityMatch AttributeValueAssertion

func (*FilterEqualityMatch) AssertionValue

func (a *FilterEqualityMatch) AssertionValue() AssertionValue

func (*FilterEqualityMatch) AttributeDesc

func (a *FilterEqualityMatch) AttributeDesc() AttributeDescription

type FilterExtensibleMatch

type FilterExtensibleMatch MatchingRuleAssertion

type FilterGreaterOrEqual

type FilterGreaterOrEqual AttributeValueAssertion

func (*FilterGreaterOrEqual) AssertionValue

func (filter *FilterGreaterOrEqual) AssertionValue() AssertionValue

func (*FilterGreaterOrEqual) AttributeDesc

func (filter *FilterGreaterOrEqual) AttributeDesc() AttributeDescription

type FilterLessOrEqual

type FilterLessOrEqual AttributeValueAssertion

func (*FilterLessOrEqual) AssertionValue

func (a *FilterLessOrEqual) AssertionValue() AssertionValue

func (*FilterLessOrEqual) AttributeDesc

func (a *FilterLessOrEqual) AttributeDesc() AttributeDescription

type FilterNot

type FilterNot struct {

type FilterOr

type FilterOr []Filter

type FilterPresent

type FilterPresent AttributeDescription

type FilterSubstrings

type FilterSubstrings SubstringFilter

func (*FilterSubstrings) Substrings

func (s *FilterSubstrings) Substrings() []Substring

func (*FilterSubstrings) Type_

type Flag

type Flag bool

A Flag accepts any data and is set to true if present.


type INTEGER int32 // In this RFC the max INTEGER value is 2^31 - 1, so int32 is enough

func (INTEGER) Int

func (l INTEGER) Int() int

type IntermediateResponse

type IntermediateResponse struct {
	// contains filtered or unexported fields


type LDAPDN LDAPString

LDAPDN ::= LDAPString -- Constrained to <distinguishedName>

-- [RFC4514]

func (LDAPDN) Pointer

func (l LDAPDN) Pointer() *LDAPDN

type LDAPMessage

type LDAPMessage struct {
	// contains filtered or unexported fields

This appendix is normative.

Lightweight-Directory-Access-Protocol-V3 {1 3 6 1 1 18}
-- Copyright (C) The Internet Society (2006).  This version of
-- this ASN.1 module is part of RFC 4511; see the RFC itself
-- for full legal notices.


LDAPMessage ::= SEQUENCE {
     messageID       MessageID,
     protocolOp      CHOICE {
          bindRequest           BindRequest,
          bindResponse          BindResponse,
          unbindRequest         UnbindRequest,
          searchRequest         SearchRequest,
          searchResEntry        SearchResultEntry,
          searchResDone         SearchResultDone,
          searchResRef          SearchResultReference,
          modifyRequest         ModifyRequest,
          modifyResponse        ModifyResponse,
          addRequest            AddRequest,
          addResponse           AddResponse,
          delRequest            DelRequest,
          delResponse           DelResponse,
          modDNRequest          ModifyDNRequest,
          modDNResponse         ModifyDNResponse,
          compareRequest        CompareRequest,
          compareResponse       CompareResponse,
          abandonRequest        AbandonRequest,
          extendedReq           ExtendedRequest,
          extendedResp          ExtendedResponse,
          intermediateResponse  IntermediateResponse },
     controls       [0] Controls OPTIONAL }

func NewLDAPMessage

func NewLDAPMessage() *LDAPMessage

func NewLDAPMessageWithProtocolOp

func NewLDAPMessageWithProtocolOp(po ProtocolOp) *LDAPMessage

func ReadLDAPMessage

func ReadLDAPMessage(bytes *Bytes) (message LDAPMessage, err error)

func (*LDAPMessage) Controls

func (l *LDAPMessage) Controls() *Controls

func (*LDAPMessage) MessageID

func (l *LDAPMessage) MessageID() MessageID

func (*LDAPMessage) ProtocolOp

func (l *LDAPMessage) ProtocolOp() ProtocolOp

func (*LDAPMessage) ProtocolOpName

func (l *LDAPMessage) ProtocolOpName() string

func (*LDAPMessage) ProtocolOpType

func (l *LDAPMessage) ProtocolOpType() int

func (*LDAPMessage) SetMessageID

func (l *LDAPMessage) SetMessageID(ID int)

func (*LDAPMessage) Write

func (m *LDAPMessage) Write() (bytes *Bytes, err error)



Sermersheim Standards Track [Page 54]

RFC 4511 LDAPv3 June 2006

LDAPOID ::= OCTET STRING -- Constrained to <numericoid>
                         -- [RFC4512]

func (LDAPOID) Bytes

func (l LDAPOID) Bytes() []byte

func (LDAPOID) Pointer

func (l LDAPOID) Pointer() *LDAPOID

func (LDAPOID) String

func (l LDAPOID) String() string

type LDAPResult

type LDAPResult struct {
	// contains filtered or unexported fields
     resultCode         ENUMERATED {
          success                      (0),
          operationsError              (1),
          protocolError                (2),
          timeLimitExceeded            (3),
          sizeLimitExceeded            (4),
          compareFalse                 (5),
          compareTrue                  (6),
          authMethodNotSupported       (7),
          strongerAuthRequired         (8),
               -- 9 reserved --
          referral                     (10),
          adminLimitExceeded           (11),
          unavailableCriticalExtension (12),
          confidentialityRequired      (13),
          saslBindInProgress           (14),

Sermersheim Standards Track [Page 55]

RFC 4511 LDAPv3 June 2006

     noSuchAttribute              (16),
     undefinedAttributeType       (17),
     inappropriateMatching        (18),
     constraintViolation          (19),
     attributeOrValueExists       (20),
     invalidAttributeSyntax       (21),
          -- 22-31 unused --
     noSuchObject                 (32),
     aliasProblem                 (33),
     invalidDNSyntax              (34),
          -- 35 reserved for undefined isLeaf --
     aliasDereferencingProblem    (36),
          -- 37-47 unused --
     inappropriateAuthentication  (48),
     invalidCredentials           (49),
     insufficientAccessRights     (50),
     busy                         (51),
     unavailable                  (52),
     unwillingToPerform           (53),
     loopDetect                   (54),
          -- 55-63 unused --
     namingViolation              (64),
     objectClassViolation         (65),
     notAllowedOnNonLeaf          (66),
     notAllowedOnRDN              (67),
     entryAlreadyExists           (68),
     objectClassModsProhibited    (69),
          -- 70 reserved for CLDAP --
     affectsMultipleDSAs          (71),
          -- 72-79 unused --
     other                        (80),
     ...  },
matchedDN          LDAPDN,
diagnosticMessage  LDAPString,
referral           [3] Referral OPTIONAL }

func (*LDAPResult) SeMatchedDN

func (l *LDAPResult) SeMatchedDN(code string)

func (*LDAPResult) SetDiagnosticMessage

func (l *LDAPResult) SetDiagnosticMessage(code string)

func (*LDAPResult) SetReferral

func (l *LDAPResult) SetReferral(r *Referral)

func (*LDAPResult) SetResultCode

func (l *LDAPResult) SetResultCode(code int)

type LDAPString


LDAPString ::= OCTET STRING -- UTF-8 encoded,

-- [ISO10646] characters

type LdapError

type LdapError struct {
	Msg string

func (LdapError) Error

func (err LdapError) Error() string

type MatchingRuleAssertion

type MatchingRuleAssertion struct {
	// contains filtered or unexported fields

MatchingRuleAssertion ::= SEQUENCE {

matchingRule    [1] MatchingRuleId OPTIONAL,
type            [2] AttributeDescription OPTIONAL,
matchValue      [3] AssertionValue,
dnAttributes    [4] BOOLEAN DEFAULT FALSE }

type MatchingRuleId

type MatchingRuleId LDAPString

MatchingRuleId ::= LDAPString

func (MatchingRuleId) Pointer

func (m MatchingRuleId) Pointer() *MatchingRuleId

type MessageID

type MessageID INTEGER

MessageID ::= INTEGER (0 .. maxInt)

func (MessageID) Int

func (l MessageID) Int() int

type ModifyDNRequest

type ModifyDNRequest struct {
	// contains filtered or unexported fields

type ModifyDNResponse

type ModifyDNResponse LDAPResult

type ModifyRequest

type ModifyRequest struct {
	// contains filtered or unexported fields

func (*ModifyRequest) Changes

func (m *ModifyRequest) Changes() []ModifyRequestChange

func (*ModifyRequest) Object

func (m *ModifyRequest) Object() LDAPDN

type ModifyRequestChange

type ModifyRequestChange struct {
	// contains filtered or unexported fields

func (*ModifyRequestChange) Modification

func (m *ModifyRequestChange) Modification() *PartialAttribute

func (*ModifyRequestChange) Operation

func (m *ModifyRequestChange) Operation() ENUMERATED

type ModifyResponse

type ModifyResponse LDAPResult

func (*ModifyResponse) SetResultCode

func (l *ModifyResponse) SetResultCode(code int)


type OCTETSTRING string

func (OCTETSTRING) Bytes

func (l OCTETSTRING) Bytes() []byte

func (OCTETSTRING) Pointer


func (OCTETSTRING) String

func (l OCTETSTRING) String() string

type PartialAttribute

type PartialAttribute struct {
	// contains filtered or unexported fields

PartialAttribute ::= SEQUENCE {

type       AttributeDescription,
vals       SET OF value AttributeValue }

func (*PartialAttribute) Type_

func (*PartialAttribute) Vals

func (p *PartialAttribute) Vals() []AttributeValue

type PartialAttributeList

type PartialAttributeList []PartialAttribute

PartialAttributeList ::= SEQUENCE OF

partialAttribute PartialAttribute

type ProtocolOp

type ProtocolOp interface {
	// contains filtered or unexported methods

type RawContent

type RawContent []byte

RawContent is used to signal that the undecoded, DER data needs to be preserved for a struct. To use it, the first field of the struct must have this type. It's an error for any of the other fields to have this type.

type RawValue

type RawValue struct {
	Class, Tag int
	IsCompound bool
	Bytes      []byte
	FullBytes  []byte // includes the tag and length

A RawValue represents an undecoded ASN.1 object.

type Referral

type Referral []URI

Referral ::= SEQUENCE SIZE (1..MAX) OF uri URI

func (Referral) Pointer

func (referral Referral) Pointer() *Referral

type RelativeLDAPDN

type RelativeLDAPDN LDAPString

RelativeLDAPDN ::= LDAPString -- Constrained to <name-component>

-- [RFC4514]

type SaslCredentials

type SaslCredentials struct {
	// contains filtered or unexported fields

SaslCredentials ::= SEQUENCE {

mechanism               LDAPString,
credentials             OCTET STRING OPTIONAL }

type SearchRequest

type SearchRequest struct {
	// contains filtered or unexported fields

func (*SearchRequest) Attributes

func (s *SearchRequest) Attributes() AttributeSelection

func (*SearchRequest) BaseObject

func (s *SearchRequest) BaseObject() LDAPDN

func (*SearchRequest) DerefAliases

func (s *SearchRequest) DerefAliases() ENUMERATED

func (*SearchRequest) Filter

func (s *SearchRequest) Filter() Filter

func (*SearchRequest) FilterString

func (s *SearchRequest) FilterString() string

func (*SearchRequest) Scope

func (s *SearchRequest) Scope() ENUMERATED

func (*SearchRequest) SizeLimit

func (s *SearchRequest) SizeLimit() INTEGER

func (*SearchRequest) TimeLimit

func (s *SearchRequest) TimeLimit() INTEGER

func (*SearchRequest) TypesOnly

func (s *SearchRequest) TypesOnly() BOOLEAN

type SearchResultDone

type SearchResultDone LDAPResult

func (*SearchResultDone) SetResultCode

func (l *SearchResultDone) SetResultCode(code int)

type SearchResultEntry

type SearchResultEntry struct {
	// contains filtered or unexported fields

func (*SearchResultEntry) AddAttribute

func (s *SearchResultEntry) AddAttribute(name AttributeDescription, values ...AttributeValue)

func (*SearchResultEntry) SetObjectName

func (s *SearchResultEntry) SetObjectName(on string)

type SearchResultReference

type SearchResultReference []URI

type StructuralError

type StructuralError struct {
	Msg string

A StructuralError suggests that the ASN.1 data is valid, but the Go type which is receiving it doesn't match.

func (StructuralError) Error

func (e StructuralError) Error() string

type Substring

type Substring interface{}

type SubstringAny

type SubstringAny AssertionValue

type SubstringFilter

type SubstringFilter struct {
	// contains filtered or unexported fields

SubstringFilter ::= SEQUENCE {

type           AttributeDescription,
substrings     SEQUENCE SIZE (1..MAX) OF substring CHOICE {
     initial [0] AssertionValue,  -- can occur at most once
     any     [1] AssertionValue,
     final   [2] AssertionValue } -- can occur at most once

type SubstringFinal

type SubstringFinal AssertionValue

type SubstringInitial

type SubstringInitial AssertionValue

type SyntaxError

type SyntaxError struct {
	Msg string

A SyntaxError suggests that the ASN.1 data is invalid.

func (SyntaxError) Error

func (e SyntaxError) Error() string

type TagAndLength

type TagAndLength struct {
	Class, Tag, Length int
	IsCompound         bool

func ParseTagAndLength

func ParseTagAndLength(bytes []byte, initOffset int) (ret TagAndLength, offset int, err error)

func (*TagAndLength) Expect

func (t *TagAndLength) Expect(class int, tag int, isCompound bool) (err error)

func (*TagAndLength) ExpectClass

func (t *TagAndLength) ExpectClass(class int) (err error)

func (*TagAndLength) ExpectCompound

func (t *TagAndLength) ExpectCompound(isCompound bool) (err error)

func (*TagAndLength) ExpectTag

func (t *TagAndLength) ExpectTag(tag int) (err error)

type URI

type URI LDAPString

URI ::= LDAPString -- limited to characters permitted in

-- URIs

type UnbindRequest

type UnbindRequest struct {

type Writable

type Writable interface {
	// contains filtered or unexported methods

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL