Documentation
¶
Index ¶
- Constants
- Variables
- type AttributeType
- type AttributeTypeListRequest
- type AttributeTypeListResponse
- type AttributeUsage
- type DN
- type Group
- type Object
- type ObjectClass
- type ObjectClassKind
- type ObjectClassListRequest
- type ObjectClassListResponse
- type ObjectList
- type ObjectListRequest
- type ObjectPasswordRequest
- type ObjectPutRequest
- type PasswordResponse
Constants ¶
View Source
const ( SchemaName = "ldap" MethodPlain = "ldap" MethodSecure = "ldaps" PortPlain = 389 PortSecure = 636 // Time between connection retries MinRetryInterval = time.Second * 5 MaxRetries = 10 // Maximum number of entries to return in a single request MaxListPaging = 500 // Maximum list entries to return MaxListEntries = 1000 // Attributes AttrObjectClasses = "objectClasses" AttrAttributeTypes = "attributeTypes" AttrSubSchemaDN = "subschemaSubentry" // Initial GID/UID allocated when the lastgid/lastuid device entry is first created InitialGID = 1000 InitialUID = 1000 )
Variables ¶
View Source
var DefaultGroupObjectClasses = []string{"groupOfNames"}
DefaultGroupObjectClasses is used when no group object classes are configured.
View Source
var DefaultUserObjectClasses = []string{"inetOrgPerson"}
DefaultUserObjectClasses is used when no user object classes are configured.
View Source
var WellKnownGroupClasses = []string{"group", "posixGroup", "groupOfNames", "groupOfUniqueNames", "groupOfMembers"}
WellKnownGroupClasses is the list of object classes checked during auto-discovery.
View Source
var WellKnownUserAuxiliaryClasses = []string{"posixAccount"}
WellKnownUserAuxiliaryClasses is the list of auxiliary user classes checked during auto-discovery.
View Source
var WellKnownUserClasses = []string{"user", "inetOrgPerson", "organizationalPerson", "person", "account"}
WellKnownUserClasses is the list of structural object classes checked during auto-discovery.
Functions ¶
This section is empty.
Types ¶
type AttributeType ¶
type AttributeType struct {
*schemadef.AttributeTypeSchema
}
func ParseAttributeType ¶
func ParseAttributeType(v string) (*AttributeType, error)
func (*AttributeType) Identifier ¶
func (o *AttributeType) Identifier() string
func (*AttributeType) Matches ¶
func (o *AttributeType) Matches(req AttributeTypeListRequest) bool
func (AttributeType) String ¶
func (o AttributeType) String() string
type AttributeTypeListRequest ¶
type AttributeTypeListRequest struct {
pg.OffsetLimit
Filter *string `json:"filter,omitempty" help:"Exact attribute name or OID match (case-insensitive for names)" arg:"" optional:""`
Usage *AttributeUsage `json:"usage,omitempty" help:"Attribute usage" enum:"userApplications,directoryOperation,distributedOperation,dSAOperation"`
Superior *string `json:"superior,omitempty" help:"Exact superior attribute type match"`
Obsolete *bool `json:"obsolete,omitempty" help:"Filter obsolete attribute types"`
SingleValue *bool `json:"singleValue,omitempty" help:"Filter single-value attribute types" name:"single-value"`
Collective *bool `json:"collective,omitempty" help:"Filter collective attribute types"`
NoUserModification *bool `json:"noUserModification,omitempty" help:"Filter non-user-modifiable attribute types" name:"no-user-modification"`
}
func (AttributeTypeListRequest) Query ¶
func (req AttributeTypeListRequest) Query() url.Values
func (AttributeTypeListRequest) String ¶
func (o AttributeTypeListRequest) String() string
type AttributeTypeListResponse ¶
type AttributeTypeListResponse struct {
Count uint64 `json:"count" help:"Total number of matching attribute types before pagination"`
Body []*AttributeType `json:"body,omitempty" help:"Attribute types returned for the current page"`
}
func (AttributeTypeListResponse) String ¶
func (o AttributeTypeListResponse) String() string
type AttributeUsage ¶
type AttributeUsage string
const ( AttributeUsageUserApplications AttributeUsage = AttributeUsage(schemadef.AttributeUsageUserApplications) AttributeUsageDirectoryOperation AttributeUsage = AttributeUsage(schemadef.AttributeUsageDirectoryOperation) AttributeUsageDistributedOperation AttributeUsage = AttributeUsage(schemadef.AttributeUsageDistributedOperation) AttributeUsageDSAOperation AttributeUsage = AttributeUsage(schemadef.AttributeUsageDSAOperation) )
func (AttributeUsage) String ¶
func (o AttributeUsage) String() string
type DN ¶
func (*DN) AncestorOf ¶
type Object ¶
func NewObjectFromEntry ¶
func (*Object) WithPassword ¶
func (o *Object) WithPassword(password *string) *PasswordResponse
WithPassword embeds a generated password into the response object using the PasswordResponse wrapper. An empty password leaves the password field unset.
type ObjectClass ¶
type ObjectClass struct {
*schemadef.ObjectClassSchema
}
func ParseObjectClass ¶
func ParseObjectClass(v string) (*ObjectClass, error)
func (*ObjectClass) Identifier ¶
func (o *ObjectClass) Identifier() string
func (*ObjectClass) Matches ¶
func (o *ObjectClass) Matches(req ObjectClassListRequest) bool
func (ObjectClass) String ¶
func (o ObjectClass) String() string
type ObjectClassKind ¶
type ObjectClassKind string
const ( ObjectClassKindAbstract ObjectClassKind = ObjectClassKind(schemadef.ObjectClassKindAbstract) ObjectClassKindStructural ObjectClassKind = ObjectClassKind(schemadef.ObjectClassKindStructural) ObjectClassKindAuxiliary ObjectClassKind = ObjectClassKind(schemadef.ObjectClassKindAuxiliary) )
func (ObjectClassKind) String ¶
func (o ObjectClassKind) String() string
type ObjectClassListRequest ¶
type ObjectClassListRequest struct {
pg.OffsetLimit
Filter *string `json:"filter,omitempty" help:"Exact class name or OID match (case-insensitive for names)" arg:"" optional:""`
Kind *ObjectClassKind `json:"kind,omitempty" help:"Class kind" enum:"ABSTRACT,STRUCTURAL,AUXILIARY"`
Superior []string `json:"superior,omitempty" help:"Required superior classes"`
Must []string `json:"must,omitempty" help:"Required MUST attributes"`
May []string `json:"may,omitempty" help:"Required MAY attributes"`
Obsolete *bool `json:"obsolete,omitempty" help:"Filter obsolete classes"`
}
func (ObjectClassListRequest) Query ¶
func (req ObjectClassListRequest) Query() url.Values
func (ObjectClassListRequest) String ¶
func (o ObjectClassListRequest) String() string
type ObjectClassListResponse ¶
type ObjectClassListResponse struct {
Count uint64 `json:"count" help:"Total number of matching object classes before pagination"`
Body []*ObjectClass `json:"body,omitempty" help:"Object classes returned for the current page"`
}
func (ObjectClassListResponse) String ¶
func (o ObjectClassListResponse) String() string
type ObjectList ¶
func (ObjectList) LDIF ¶
func (o ObjectList) LDIF() string
func (ObjectList) String ¶
func (o ObjectList) String() string
type ObjectListRequest ¶
type ObjectListRequest struct {
pg.OffsetLimit
Filter *string `json:"filter,omitempty" help:"Filter"`
Attr []string `json:"attr,omitempty" help:"Attributes to return"`
}
func (ObjectListRequest) Query ¶
func (req ObjectListRequest) Query() url.Values
func (ObjectListRequest) String ¶
func (o ObjectListRequest) String() string
type ObjectPasswordRequest ¶
type ObjectPasswordRequest struct {
Old string `json:"old,omitempty"`
New *string `json:"new,omitempty"`
}
func (ObjectPasswordRequest) String ¶
func (o ObjectPasswordRequest) String() string
type ObjectPutRequest ¶
func (ObjectPutRequest) String ¶
func (o ObjectPutRequest) String() string
func (ObjectPutRequest) ValidateCreate ¶
func (req ObjectPutRequest) ValidateCreate() (url.Values, error)
func (ObjectPutRequest) ValidateUpdate ¶
func (req ObjectPutRequest) ValidateUpdate() (url.Values, error)
type PasswordResponse ¶
type PasswordResponse struct {
Object
GeneratedPassword string `json:"generated-password,omitempty"`
}
func (PasswordResponse) LDIF ¶
func (o PasswordResponse) LDIF() string
func (PasswordResponse) String ¶
func (o PasswordResponse) String() string
Click to show internal directories.
Click to hide internal directories.