schema

package
v1.5.17 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SchemaName   = "ldap"
	APIPrefix    = "/ldap/v1"
	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"
	AttrObjectClass    = "objectClass"
	AttrAttributeTypes = "attributeTypes"
	AttrSubSchemaDN    = "subschemaSubentry"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AttributeType added in v1.5.13

type AttributeType struct {
	*parser.AttributeTypeSchema
}

func ParseAttributeType added in v1.5.13

func ParseAttributeType(v string) (*AttributeType, error)

func (*AttributeType) String added in v1.5.13

func (o *AttributeType) String() string

type DN added in v1.5.13

type DN ldap.DN

func NewDN added in v1.5.13

func NewDN(v string) (*DN, error)

func (*DN) AncestorOf added in v1.5.13

func (dn *DN) AncestorOf(other *DN) bool

func (*DN) Join added in v1.5.13

func (dn *DN) Join(other *DN) *DN

func (*DN) String added in v1.5.13

func (dn *DN) String() string

type Object

type Object struct {
	DN         string `json:"dn"`
	url.Values `json:"attrs,omitempty"`
}

func NewObject

func NewObject(v ...string) *Object

func NewObjectFromEntry

func NewObjectFromEntry(entry *ldap.Entry) *Object

func (*Object) Get added in v1.5.13

func (o *Object) Get(attr string) *string

Returns an attribute value or nil if not found

func (*Object) GetAll added in v1.5.13

func (o *Object) GetAll(attr string) []string

Returns array or attributes or nil if not found

func (*Object) Set added in v1.5.13

func (o *Object) Set(attr string, v ...string)

Sets an attribute value

func (*Object) String

func (o *Object) String() string

type ObjectClass added in v1.5.13

type ObjectClass struct {
	*parser.ObjectClassSchema
}

func ParseObjectClass added in v1.5.13

func ParseObjectClass(v string) (*ObjectClass, error)

func (*ObjectClass) String added in v1.5.13

func (o *ObjectClass) String() string

type ObjectList

type ObjectList struct {
	Count uint64    `json:"count"`
	Body  []*Object `json:"body,omitempty"`
}

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) String

func (o *ObjectListRequest) String() string

type ObjectType added in v1.5.13

type ObjectType struct {
	// DN for the type
	DN *DN `json:"dn"`

	// Field name
	Field string `json:"field"`

	// Classes for the type
	ObjectClass []string `json:"objectclass"`
}

func NewObjectType added in v1.5.13

func NewObjectType(dn, field string, classes ...string) (*ObjectType, error)

func (*ObjectType) New added in v1.5.13

func (o *ObjectType) New(value string, attrs url.Values) (*Object, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL