-
Notifications
You must be signed in to change notification settings - Fork 0
/
interfaces.go
39 lines (33 loc) · 1.42 KB
/
interfaces.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package cli
import (
"github.com/openshift/origin/pkg/client"
"github.com/openshift/origin/pkg/cmd/admin/groups/sync/interfaces"
)
// SyncBuilder describes an object that can build all the schema-specific parts of an LDAPGroupSyncer
type SyncBuilder interface {
GetGroupLister() (interfaces.LDAPGroupLister, error)
GetGroupNameMapper() (interfaces.LDAPGroupNameMapper, error)
GetUserNameMapper() (interfaces.LDAPUserNameMapper, error)
GetGroupMemberExtractor() (interfaces.LDAPMemberExtractor, error)
}
// PruneBuilder describes an object that can build all the schema-specific parts of an LDAPGroupPruner
type PruneBuilder interface {
GetGroupLister() (interfaces.LDAPGroupLister, error)
GetGroupNameMapper() (interfaces.LDAPGroupNameMapper, error)
GetGroupDetector() (interfaces.LDAPGroupDetector, error)
}
// GroupNameRestrictions desribes an object that holds blacklists and whitelists
type GroupNameRestrictions interface {
GetWhitelist() []string
GetBlacklist() []string
}
// OpenShiftGroupNameRestrictions describes an object that holds blacklists and whitelists as well as
// a client that can retrieve OpenShift groups to satisfy those lists
type OpenShiftGroupNameRestrictions interface {
GroupNameRestrictions
GetClient() client.GroupInterface
}
// MappedNameRestrictions describes an object that holds user name mappings for a group sync job
type MappedNameRestrictions interface {
GetGroupNameMappings() map[string]string
}