Documentation ¶
Index ¶
- Constants
- Variables
- func SizePrimitiveSubBytes(tag int, value interface{}) (size int)
- func SizeSubBytes(tag int, callback func() int) (size int)
- type AbandonRequest
- type AddRequest
- type AddResponse
- type AssertionValue
- type Attribute
- type AttributeDescription
- type AttributeList
- type AttributeSelection
- type AttributeValue
- type AttributeValueAssertion
- type AuthenticationChoice
- type BOOLEAN
- type BindRequest
- type BindResponse
- type Bytes
- func (bytes *Bytes) Bytes() []byte
- func (bytes Bytes) Debug()
- func (bytes *Bytes) DumpCurrentBytes() (ret string)
- func (bytes *Bytes) HasMoreData() bool
- func (bytes *Bytes) ParseTagAndLength() (ret TagAndLength, err error)
- func (bytes *Bytes) PreviewTagAndLength() (tagAndLength TagAndLength, err error)
- func (bytes *Bytes) ReadPrimitiveSubBytes(class int, tag int, typeTag int) (value interface{}, err error)
- func (bytes *Bytes) ReadSubBytes(class int, tag int, callback func(bytes *Bytes) error) (err error)
- func (bytes *Bytes) WritePrimitiveSubBytes(class int, tag int, value interface{}) (size int)
- func (bytes *Bytes) WriteTagAndLength(class int, compound bool, tag int, length int) int
- type CompareRequest
- type CompareResponse
- type Control
- type Controls
- type DelRequest
- type DelResponse
- type ENUMERATED
- type Enumerated
- type ExtendedRequest
- type ExtendedResponse
- type Filter
- type FilterAnd
- type FilterApproxMatch
- type FilterEqualityMatch
- type FilterExtensibleMatch
- type FilterGreaterOrEqual
- type FilterLessOrEqual
- type FilterNot
- type FilterOr
- type FilterPresent
- type FilterSubstrings
- type Flag
- type INTEGER
- type IntermediateResponse
- type LDAPDN
- type LDAPMessage
- func (l *LDAPMessage) Controls() *Controls
- func (l *LDAPMessage) MessageID() MessageID
- func (l *LDAPMessage) ProtocolOp() ProtocolOp
- func (l *LDAPMessage) ProtocolOpName() string
- func (l *LDAPMessage) ProtocolOpType() int
- func (l *LDAPMessage) SetMessageID(ID int)
- func (m *LDAPMessage) Write() (bytes *Bytes, err error)
- type LDAPOID
- type LDAPResult
- type LDAPString
- type LdapError
- type MatchingRuleAssertion
- type MatchingRuleId
- type MessageID
- type ModifyDNRequest
- type ModifyDNResponse
- type ModifyRequest
- type ModifyRequestChange
- type ModifyResponse
- type OCTETSTRING
- type PartialAttribute
- type PartialAttributeList
- type ProtocolOp
- type RawContent
- type RawValue
- type Referral
- type RelativeLDAPDN
- type SaslCredentials
- type SearchRequest
- func (s *SearchRequest) Attributes() AttributeSelection
- func (s *SearchRequest) BaseObject() LDAPDN
- func (s *SearchRequest) DerefAliases() ENUMERATED
- func (s *SearchRequest) Filter() Filter
- func (s *SearchRequest) FilterString() string
- func (s *SearchRequest) Scope() ENUMERATED
- func (s *SearchRequest) SizeLimit() INTEGER
- func (s *SearchRequest) TimeLimit() INTEGER
- func (s *SearchRequest) TypesOnly() BOOLEAN
- type SearchResultDone
- type SearchResultEntry
- type SearchResultReference
- type StructuralError
- type Substring
- type SubstringAny
- type SubstringFilter
- type SubstringFinal
- type SubstringInitial
- type SyntaxError
- type TagAndLength
- type URI
- type UnbindRequest
- type Writable
Constants ¶
const BindRequestVersionMax = 127
const BindRequestVersionMin = 1
const ModifyRequestChangeOperationAdd = 0
const ModifyRequestChangeOperationDelete = 1
const ModifyRequestChangeOperationReplace = 2
const ResultCodeAdminLimitExceeded = 11
const ResultCodeAffectsMultipleDSAs = 71
const ResultCodeAliasDereferencingProblem = 36
const ResultCodeAliasProblem = 33
const ResultCodeAttributeOrValueExists = 20
const ResultCodeAuthMethodNotSupported = 7
const ResultCodeBusy = 51
const ResultCodeCompareFalse = 5
const ResultCodeCompareTrue = 6
const ResultCodeConfidentialityRequired = 13
const ResultCodeConstraintViolation = 19
const ResultCodeEntryAlreadyExists = 68
const ResultCodeInappropriateAuthentication = 48
const ResultCodeInappropriateMatching = 18
const ResultCodeInsufficientAccessRights = 50
const ResultCodeInvalidAttributeSyntax = 21
const ResultCodeInvalidCredentials = 49
const ResultCodeInvalidDNSyntax = 34
const ResultCodeLoopDetect = 54
const ResultCodeNamingViolation = 64
const ResultCodeNoSuchAttribute = 16
const ResultCodeNoSuchObject = 32
const ResultCodeNotAllowedOnNonLeaf = 66
const ResultCodeNotAllowedOnRDN = 67
const ResultCodeObjectClassModsProhibited = 69
const ResultCodeObjectClassViolation = 65
const ResultCodeOperationsError = 1
const ResultCodeOther = 80
const ResultCodeProtocolError = 2
const ResultCodeReferral = 10
const ResultCodeSaslBindInProgress = 14
const ResultCodeSizeLimitExceeded = 4
const ResultCodeStrongerAuthRequired = 8
const ResultCodeSuccess = 0
const ResultCodeTimeLimitExceeded = 3
const ResultCodeUndefinedAttributeType = 17
const ResultCodeUnwillingToPerform = 53
const SearchRequestHomeSubtree = 2
const SearchRequestScopeBaseObject = 0
const SearchRequestSingleLevel = 1
const SearchRequetDerefAliasesDerefAlways = 3
const SearchRequetDerefAliasesDerefFindingBaseObj = 2
const SearchRequetDerefAliasesDerefInSearching = 1
const SearchRequetDerefAliasesNeverDerefAliases = 0
const TagAbandonRequest = 16
AbandonRequest ::= [APPLICATION 16] MessageID
const TagAddRequest = 8
Sermersheim Standards Track [Page 58]
RFC 4511 LDAPv3 June 2006
AddRequest ::= [APPLICATION 8] SEQUENCE { entry LDAPDN, attributes AttributeList }
const TagAddResponse = 9
AddResponse ::= [APPLICATION 9] LDAPResult
const TagAuthenticationChoiceSaslCredentials = 3
const TagAuthenticationChoiceSimple = 0
AuthenticationChoice ::= CHOICE { simple [0] OCTET STRING, -- 1 and 2 reserved sasl [3] SaslCredentials, ... }
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 }
const TagBindResponse = 1
BindResponse ::= [APPLICATION 1] SEQUENCE { COMPONENTS OF LDAPResult, serverSaslCreds [7] OCTET STRING OPTIONAL }
const TagBindResponseServerSaslCreds = 7
const TagCompareRequest = 14
CompareRequest ::= [APPLICATION 14] SEQUENCE { entry LDAPDN, ava AttributeValueAssertion }
const TagCompareResponse = 15
CompareResponse ::= [APPLICATION 15] LDAPResult
const TagDelRequest = 10
DelRequest ::= [APPLICATION 10] LDAPDN
const TagDelResponse = 11
DelResponse ::= [APPLICATION 11] LDAPResult
const TagExtendedRequest = 23
ExtendedRequest ::= [APPLICATION 23] SEQUENCE { requestName [0] LDAPOID, requestValue [1] OCTET STRING OPTIONAL }
const TagExtendedRequestName = 0
const TagExtendedRequestValue = 1
const TagExtendedResponse = 24
ExtendedResponse ::= [APPLICATION 24] SEQUENCE { COMPONENTS OF LDAPResult, responseName [10] LDAPOID OPTIONAL, responseValue [11] OCTET STRING OPTIONAL }
const TagExtendedResponseName = 10
const TagExtendedResponseValue = 11
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, ... }
const TagFilterApproxMatch = 8
const TagFilterEqualityMatch = 3
const TagFilterExtensibleMatch = 9
const TagFilterGreaterOrEqual = 5
const TagFilterLessOrEqual = 6
const TagFilterNot = 2
const TagFilterOr = 1
const TagFilterPresent = 7
const TagFilterSubstrings = 4
const TagIntermediateResponse = 25
IntermediateResponse ::= [APPLICATION 25] SEQUENCE { responseName [0] LDAPOID OPTIONAL, responseValue [1] OCTET STRING OPTIONAL }
const TagIntermediateResponseName = 0
const TagIntermediateResponseValue = 1
const TagLDAPMessageControls = 0
const TagLDAPResultReferral = 3
const TagMatchingRuleAssertionDnAttributes = 4
const TagMatchingRuleAssertionMatchValue = 3
const TagMatchingRuleAssertionMatchingRule = 1
const TagMatchingRuleAssertionType = 2
const TagModifyDNRequest = 12
ModifyDNRequest ::= [APPLICATION 12] SEQUENCE { entry LDAPDN, newrdn RelativeLDAPDN, deleteoldrdn BOOLEAN, newSuperior [0] LDAPDN OPTIONAL }
const TagModifyDNRequestNewSuperior = 0
const TagModifyDNResponse = 13
ModifyDNResponse ::= [APPLICATION 13] LDAPResult
const TagModifyRequest = 6
ModifyRequest ::= [APPLICATION 6] SEQUENCE { object LDAPDN, changes SEQUENCE OF change SEQUENCE { operation ENUMERATED { add (0), delete (1), replace (2), ... }, modification PartialAttribute } }
const TagModifyResponse = 7
ModifyResponse ::= [APPLICATION 7] LDAPResult
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 }
const TagSearchResultDone = 5
SearchResultDone ::= [APPLICATION 5] LDAPResult
const TagSearchResultEntry = 4
SearchResultEntry ::= [APPLICATION 4] SEQUENCE { objectName LDAPDN, attributes PartialAttributeList }
const TagSearchResultReference = 19
SearchResultReference ::= [APPLICATION 19] SEQUENCE
SIZE (1..MAX) OF uri URI
const TagSubstringAny = 1
const TagSubstringFinal = 2
const TagSubstringInitial = 0
const TagUnbindRequest = 2
UnbindRequest ::= [APPLICATION 2] NULL
Variables ¶
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", }
var EnumeratedModifyRequestChangeOperation = map[ENUMERATED]string{ ModifyRequestChangeOperationAdd: "add", ModifyRequestChangeOperationDelete: "delete", ModifyRequestChangeOperationReplace: "replace", }
var EnumeratedSearchRequestDerefAliases = map[ENUMERATED]string{ SearchRequetDerefAliasesNeverDerefAliases: "neverDerefAliases", SearchRequetDerefAliasesDerefInSearching: "derefInSearching", SearchRequetDerefAliasesDerefFindingBaseObj: "derefFindingBaseObj", SearchRequetDerefAliasesDerefAlways: "derefAlways", }
var EnumeratedSearchRequestScope = map[ENUMERATED]string{ SearchRequestScopeBaseObject: "baseObject", SearchRequestSingleLevel: "singleLevel", SearchRequestHomeSubtree: "homeSubtree", }
Functions ¶
func SizePrimitiveSubBytes ¶
func SizeSubBytes ¶
Types ¶
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 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 4.5.1.8
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 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 { LDAPResult // contains filtered or unexported fields }
type Bytes ¶
type Bytes struct {
// contains filtered or unexported fields
}
func (*Bytes) DumpCurrentBytes ¶
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) 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) WritePrimitiveSubBytes ¶
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) ControlValue ¶
func (control *Control) ControlValue() *OCTETSTRING
func (*Control) Criticality ¶
type DelRequest ¶
type DelRequest LDAPDN
type DelResponse ¶
type DelResponse LDAPResult
func (*DelResponse) SetResultCode ¶
func (del *DelResponse) SetResultCode(code 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 { LDAPResult // contains filtered or unexported fields }
func (*ExtendedResponse) SetResponseName ¶
func (extended *ExtendedResponse) SetResponseName(name LDAPOID)
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 FilterPresent ¶
type FilterPresent AttributeDescription
type FilterSubstrings ¶
type FilterSubstrings SubstringFilter
func (*FilterSubstrings) Substrings ¶
func (s *FilterSubstrings) Substrings() []Substring
func (*FilterSubstrings) Type_ ¶
func (s *FilterSubstrings) Type_() AttributeDescription
type INTEGER ¶
type INTEGER int32 // In this RFC the max INTEGER value is 2^31 - 1, so int32 is enough
type IntermediateResponse ¶
type IntermediateResponse struct {
// contains filtered or unexported fields
}
type LDAPDN ¶
type LDAPDN LDAPString
LDAPDN ::= LDAPString -- Constrained to <distinguishedName>
-- [RFC4514]
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. DEFINITIONS IMPLICIT TAGS EXTENSIBILITY IMPLIED ::= BEGIN 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)
type LDAPOID ¶
type LDAPOID OCTETSTRING
Sermersheim Standards Track [Page 54]
RFC 4511 LDAPv3 June 2006
LDAPOID ::= OCTET STRING -- Constrained to <numericoid> -- [RFC4512]
type LDAPResult ¶
type LDAPResult struct {
// contains filtered or unexported fields
}
LDAPResult ::= SEQUENCE { 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 ¶
type LDAPString OCTETSTRING
LDAPString ::= OCTET STRING -- UTF-8 encoded,
-- [ISO10646] characters
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 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 ¶
type OCTETSTRING string
func (OCTETSTRING) Bytes ¶
func (l OCTETSTRING) Bytes() []byte
func (OCTETSTRING) Pointer ¶
func (o OCTETSTRING) Pointer() *OCTETSTRING
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 (p *PartialAttribute) Type_() AttributeDescription
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 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 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 ¶
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 UnbindRequest ¶
type UnbindRequest struct { }
Source Files ¶
- abandon_request.go
- add_request.go
- add_response.go
- asn1.go
- assertion_value.go
- attribute.go
- attribute_description.go
- attribute_list.go
- attribute_selection.go
- attribute_value.go
- attribute_value_assertion.go
- authentication_choice.go
- bind_request.go
- bind_response.go
- boolean.go
- bytes.go
- compare_request.go
- compare_response.go
- control.go
- controls.go
- del_request.go
- del_response.go
- dn.go
- enumerated.go
- error.go
- extended_request.go
- extended_response.go
- filter.go
- filter_and.go
- filter_approx_match.go
- filter_equality_match.go
- filter_extensible_match.go
- filter_greater_or_equal.go
- filter_less_or_equal.go
- filter_not.go
- filter_or.go
- filter_present.go
- filter_substring.go
- integer.go
- intermediate_response.go
- matching_rule_assertion.go
- matching_rule_id.go
- message.go
- message_id.go
- modify_dn_request.go
- modify_dn_response.go
- modify_request.go
- modify_request_change.go
- modify_response.go
- octetstring.go
- oid.go
- partial_attribute.go
- partial_attribute_list.go
- protocol_op.go
- read.go
- referral.go
- relative_ldap_dn.go
- result.go
- sasl_credentials.go
- search_request.go
- search_result_done.go
- search_result_entry.go
- search_result_reference.go
- string.go
- struct.go
- struct_methods.go
- unbind_request.go
- uri.go
- write.go