syncerror

package
v0.0.28 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsMemberLookupError

func IsMemberLookupError(e error) bool

func NewMemberLookupError

func NewMemberLookupError(ldapGroupUID, ldapUserUID string, causedBy error) error

Types

type Handler

type Handler interface {
	// HandleError processess an error without mutating it. If the error is determined to be fatal,
	// a non-nil error should be returned.
	HandleError(err error) (handled bool, fatalError error)
}

Handler knows how to handle errors

func NewCompoundHandler

func NewCompoundHandler(handlers ...Handler) Handler

func NewMemberLookupMemberNotFoundSuppressor

func NewMemberLookupMemberNotFoundSuppressor(logger logr.Logger) Handler

func NewMemberLookupOutOfBoundsSuppressor

func NewMemberLookupOutOfBoundsSuppressor(logger logr.Logger) Handler

type LDAPGroupDetector

type LDAPGroupDetector interface {
	Exists(ldapGroupUID string) (exists bool, err error)
}

LDAPGroupDetector determines if a group identified by an LDAP group UID exists on the LDAP server

type LDAPGroupGetter

type LDAPGroupGetter interface {
	GroupEntryFor(ldapGroupUID string) (group *ldap.Entry, err error)
}

LDAPGroupGetter maps a ldapGroupUID to a first-class LDAP group entry

type LDAPGroupLister

type LDAPGroupLister interface {
	ListGroups() (ldapGroupUIDs []string, err error)
}

LDAPGroupLister lists the LDAP groups that need to be synced by a job. The LDAPGroupLister needs to be paired with an LDAPMemberExtractor that understands the format of the unique identifiers returned to represent the LDAP groups to be synced.

type LDAPGroupListerNameMapper

type LDAPGroupListerNameMapper interface {
	LDAPGroupLister
	LDAPGroupNameMapper
}

type LDAPGroupNameMapper

type LDAPGroupNameMapper interface {
	GroupNameFor(ldapGroupUID string) (openShiftGroupName string, err error)
}

LDAPGroupNameMapper maps a ldapGroupUID representing an LDAP group to the OpenShift Group name for the resource

type LDAPMemberExtractor

type LDAPMemberExtractor interface {
	// ExtractMembers returns the list of LDAP first-class user entries that are members of the LDAP group
	// specified by the ldapGroupUID
	ExtractMembers(ldapGroupUID string) (members []*ldap.Entry, err error)
}

LDAPMemberExtractor retrieves member data about an LDAP group from the LDAP server.

type LDAPUserNameMapper

type LDAPUserNameMapper interface {
	UserNameFor(ldapUser *ldap.Entry) (openShiftUserName string, err error)
}

LDAPUserNameMapper maps an LDAP entry representing an LDAP user to the OpenShift User name for the resource

Jump to

Keyboard shortcuts

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