{"modulePath":"github.phpd.cn/openshift/origin","version":"v3.6.1+incompatible","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package syncgroups\n\n## Functions\n\n```go\nfunc ISO8601(t time.Time) string\n```\nISO8601 returns an ISO 6801 formatted string from a time.\n\n```go\nfunc NewAllOpenShiftGroupLister(blacklist []string, ldapURL string, groupClient osclient.GroupInterface) interfaces.LDAPGroupListerNameMapper\n```\nNewAllOpenShiftGroupLister returns a new allOpenShiftGroupLister\n\n```go\nfunc NewEntryAttributeGroupNameMapper(nameAttribute []string, groupGetter interfaces.LDAPGroupGetter) interfaces.LDAPGroupNameMapper\n```\nNewEntryAttributeGroupNameMapper returns a new EntryAttributeLDAPGroupNameMapper\n\n```go\nfunc NewLDAPBlacklistGroupLister(blacklist []string, baseLister interfaces.LDAPGroupLister) interfaces.LDAPGroupLister\n```\nNewLDAPBlacklistGroupLister filters out the blacklisted names from the base lister\n\n```go\nfunc NewLDAPWhitelistGroupLister(whitelist []string) interfaces.LDAPGroupLister\n```\nNewLDAPWhitelistGroupLister returns a new whitelistLDAPGroupLister that divulges the given whitelist of LDAP group unique identifiers\n\n```go\nfunc NewOpenShiftGroupLister(whitelist, blacklist []string, ldapURL string, client osclient.GroupInterface) interfaces.LDAPGroupListerNameMapper\n```\nNewOpenShiftGroupLister returns a new openshiftGroupLister that divulges the LDAP group unique identifier for each entry in the given whitelist of OpenShift Group names\n\n```go\nfunc NewUserDefinedGroupNameMapper(mapping map[string]string) interfaces.LDAPGroupNameMapper\n```\nNewUserDefinedGroupNameMapper returns a new UserDefinedLDAPGroupNameMapper which maps a ldapGroupUID representing an LDAP group to the OpenShift Group name for the resource\n\n```go\nfunc NewUserNameMapper(nameAttributes []string) interfaces.LDAPUserNameMapper\n```\nNewUserNameMapper returns a new DefaultLDAPGroupUserNameMapper\n\n## Types\n\n```go\ntype DNLDAPGroupNameMapper struct{}\n```\nDNLDAPGroupNameMapper passes through the ldapGroupUID as the OpenShift group name\n\n```go\nfunc (m *DNLDAPGroupNameMapper) GroupNameFor(ldapGroupUID string) (string, error)\n```\n\n```go\ntype DefaultLDAPUserNameMapper struct {\n\t// contains filtered or unexported fields\n}\n```\nDefaultLDAPUserNameMapper extracts the OpenShift User name of an LDAP entry representing a user in a deterministic manner\n\n```go\nfunc (m *DefaultLDAPUserNameMapper) UserNameFor(ldapUser *ldap.Entry) (string, error)\n```\n\n```go\ntype EntryAttributeLDAPGroupNameMapper struct {\n\t// contains filtered or unexported fields\n}\n```\nEntryAttributeLDAPGroupNameMapper references the name attribute mapping to determine which attribute of a first-class LDAP group entry should be used as the OpenShift Group name for the resource\n\n```go\nfunc (m *EntryAttributeLDAPGroupNameMapper) GroupNameFor(ldapGroupUID string) (string, error)\n```\n\n```go\ntype GroupPruner interface {\n\tPrune() (errors []error)\n}\n```\nGroupPruner runs a prune job on Groups\n\n```go\ntype GroupSyncer interface {\n\t// Sync syncs groups in OpenShift with records from an external source\n\tSync() (groupsAffected []*userapi.Group, errors []error)\n}\n```\nGroupSyncer runs a Sync job on Groups\n\n```go\ntype LDAPGroupPruner struct {\n\t// Lists all groups to be synced\n\tGroupLister interfaces.LDAPGroupLister\n\t// Fetches a group and extracts object metainformation and membership list from a group\n\tGroupDetector interfaces.LDAPGroupDetector\n\t// Maps an LDAP group enrty to an OpenShift Group's Name\n\tGroupNameMapper interfaces.LDAPGroupNameMapper\n\t// Allows the Pruner to search for OpenShift Groups\n\tGroupClient client.GroupInterface\n\t// Host stores the address:port of the LDAP server\n\tHost string\n\t// DryRun indicates that no changes should be made.\n\tDryRun bool\n\n\t// Out is used to provide output while the sync job is happening\n\tOut io.Writer\n\tErr io.Writer\n}\n```\nLDAPGroupPruner prunes Groups referencing records on an external LDAP server\n\n```go\nfunc (s *LDAPGroupPruner) Prune() []error\n```\nPrune allows the LDAPGroupPruner to be a GroupPruner\n\n```go\ntype LDAPGroupSyncer struct {\n\t// Lists all groups to be synced\n\tGroupLister interfaces.LDAPGroupLister\n\t// Fetches a group and extracts object metainformation and membership list from a group\n\tGroupMemberExtractor interfaces.LDAPMemberExtractor\n\t// Maps an LDAP user entry to an OpenShift User's Name\n\tUserNameMapper interfaces.LDAPUserNameMapper\n\t// Maps an LDAP group enrty to an OpenShift Group's Name\n\tGroupNameMapper interfaces.LDAPGroupNameMapper\n\t// Allows the Syncer to search for OpenShift Groups\n\tGroupClient client.GroupInterface\n\t// Host stores the address:port of the LDAP server\n\tHost string\n\t// DryRun indicates that no changes should be made.\n\tDryRun bool\n\n\t// Out is used to provide output while the sync job is happening\n\tOut io.Writer\n\tErr io.Writer\n}\n```\nLDAPGroupSyncer sync Groups with records on an external LDAP server\n\n```go\nfunc (s *LDAPGroupSyncer) Sync() ([]*userapi.Group, []error)\n```\nSync allows the LDAPGroupSyncer to be a GroupSyncer\n\n```go\ntype UnionGroupNameMapper struct {\n\tGroupNameMappers []interfaces.LDAPGroupNameMapper\n}\n```\n\n```go\nfunc (m *UnionGroupNameMapper) GroupNameFor(ldapGroupUID string) (string, error)\n```\n\n```go\ntype UserDefinedLDAPGroupNameMapper struct {\n\t// contains filtered or unexported fields\n}\n```\nUserDefinedLDAPGroupNameMapper maps a ldapGroupUID representing an LDAP group to the OpenShift Group name for the resource by using a pre-defined mapping of ldapGroupUID to name (e.g. from a file)\n\n```go\nfunc (m *UserDefinedLDAPGroupNameMapper) GroupNameFor(ldapGroupUID string) (string, error)\n```\n\n","path":"github.phpd.cn/openshift/origin/pkg/cmd/admin/groups/sync","name":"syncgroups","synopsis":"","isRedistributable":true}
