mapper

package
v0.12.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGroupsMember added in v0.5.0

func GetGroupsMember(members []string, userDNs map[string]string) []string

func GetGroupsMemberOf added in v0.5.0

func GetGroupsMemberOf(memberOf []string, groupDNs map[string]string) []string

func GetUserGroups added in v0.5.0

func GetUserGroups(users *ldap.SearchResult, groups *ldap.SearchResult, config *config.Config, logger *slog.Logger) (map[string][]Group, error)

func ParseDN

func ParseDN(dn string) string

func RequiredAttrs

func RequiredAttrs(attrType string, enabledMappers []string) []string

func ValidMappers

func ValidMappers() []string

Types

type Group added in v0.5.0

type Group struct {
	// contains filtered or unexported fields
}

type Mapper

type Mapper interface {
	Name() string
	ConfigMapName() string
	GetData(users *ldap.SearchResult, groups *ldap.SearchResult) (map[string]string, error)
}

func GetMappers

func GetMappers(config *config.Config, logger *slog.Logger) []Mapper

func NewUserGIDMapper

func NewUserGIDMapper(config *config.Config, logger *slog.Logger) Mapper

func NewUserGIDsMapper added in v0.5.0

func NewUserGIDsMapper(config *config.Config, logger *slog.Logger) Mapper

func NewUserGroupsMapper

func NewUserGroupsMapper(config *config.Config, logger *slog.Logger) Mapper

func NewUserUIDMapper

func NewUserUIDMapper(config *config.Config, logger *slog.Logger) Mapper

type UserGID

type UserGID struct {
	// contains filtered or unexported fields
}

func (UserGID) ConfigMapName

func (m UserGID) ConfigMapName() string

func (UserGID) GetData

func (m UserGID) GetData(users *ldap.SearchResult, groups *ldap.SearchResult) (map[string]string, error)

func (UserGID) Name

func (m UserGID) Name() string

type UserGIDs added in v0.5.0

type UserGIDs struct {
	// contains filtered or unexported fields
}

func (UserGIDs) ConfigMapName added in v0.5.0

func (m UserGIDs) ConfigMapName() string

func (UserGIDs) GetData added in v0.5.0

func (m UserGIDs) GetData(users *ldap.SearchResult, groups *ldap.SearchResult) (map[string]string, error)

func (UserGIDs) Name added in v0.5.0

func (m UserGIDs) Name() string

type UserGroups

type UserGroups struct {
	// contains filtered or unexported fields
}

func (UserGroups) ConfigMapName

func (m UserGroups) ConfigMapName() string

func (UserGroups) GetData

func (m UserGroups) GetData(users *ldap.SearchResult, groups *ldap.SearchResult) (map[string]string, error)

func (UserGroups) Name

func (m UserGroups) Name() string

type UserUID

type UserUID struct {
	// contains filtered or unexported fields
}

func (UserUID) ConfigMapName

func (m UserUID) ConfigMapName() string

func (UserUID) GetData

func (m UserUID) GetData(users *ldap.SearchResult, groups *ldap.SearchResult) (map[string]string, error)

func (UserUID) Name

func (m UserUID) Name() string

Jump to

Keyboard shortcuts

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