Files
glauth/pkg/handler/handler.go
T
Jörn Friedrich Dreyer 1b92cfbae6 v2.0.0 RC1 (#125)
Co-authored-by: Jörn Friedrich Dreyer <jfd@butonic.de>
Co-authored-by: Zhou Wenzong <wenzong@users.noreply.github.com>
Co-authored-by: Jairo Llopis <Yajo@users.noreply.github.com>
Co-authored-by: Benedikt Kulmann <benedikt@kulmann.biz>
Co-authored-by: Nicolai Willems <172633+nwillems@users.noreply.github.com>
Co-authored-by: Thibault Soubiran <soubi.thibault@gmail.com>
Co-authored-by: Clement JACOB <clems71@gmail.com>
Co-authored-by: Lutz Horn <code@lhorn.de>
Co-authored-by: Márk Sági-Kazár <sagikazarmark@users.noreply.github.com>
Co-authored-by: Peter Heise <pheise@koprolalie.com>
Co-authored-by: Ben Yanke <ben@benyanke.com>
Co-authored-by: Chris F Ravenscroft <chris@voilaweb.com>
Co-authored-by: fanlix <fanlix@gmail.com>
2021-08-12 21:41:58 -07:00

36 lines
829 B
Go

package handler
import (
"github.com/glauth/glauth/pkg/config"
"github.com/nmcclain/ldap"
)
type HelperMaker interface {
FindUser(userName string, searchByUPN bool) (bool, config.User, error)
FindGroup(groupName string) (bool, config.Group, error)
}
// Handler is the common interface for all datastores
type Handler interface {
// read support
ldap.Binder
ldap.Searcher
ldap.Closer
// write support
ldap.Adder
ldap.Modifier // Note: modifying eg the uid or cn might change the dn because the hierarchy is determined by the backend
ldap.Deleter
// helper
HelperMaker
}
// TODO When I grow up, I want to handle pointers same as I would in C
// and not need a counter because I would not allocate statically
// but use idiomatic slicing instead
type HandlerWrapper struct {
Handlers []Handler
Count *int
}