{"modulePath":"github.phpd.cn/openshift/origin","version":"v3.10.0+incompatible","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package cli\n\n## Constants\n\n```go\nconst PruneRecommendedName = \"prune\"\n```\n\n```go\nconst SyncRecommendedName = \"sync\"\n```\n\n## Variables\n\n```go\nvar AllowedSourceTypes = []string{string(GroupSyncSourceLDAP), string(GroupSyncSourceOpenShift)}\n```\n\n## Functions\n\n```go\nfunc NewCmdPrune(name, fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command\n```\n\n```go\nfunc NewCmdSync(name, fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command\n```\n\n```go\nfunc ValidateSource(source GroupSyncSource) bool\n```\n\n## Types\n\n```go\ntype ADBuilder struct {\n\tClientConfig ldapclient.Config\n\tConfig       *config.ActiveDirectoryConfig\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (b *ADBuilder) GetGroupDetector() (interfaces.LDAPGroupDetector, error)\n```\n\n```go\nfunc (b *ADBuilder) GetGroupLister() (interfaces.LDAPGroupLister, error)\n```\n\n```go\nfunc (b *ADBuilder) GetGroupMemberExtractor() (interfaces.LDAPMemberExtractor, error)\n```\n\n```go\nfunc (b *ADBuilder) GetGroupNameMapper() (interfaces.LDAPGroupNameMapper, error)\n```\n\n```go\nfunc (b *ADBuilder) GetUserNameMapper() (interfaces.LDAPUserNameMapper, error)\n```\n\n```go\ntype AugmentedADBuilder struct {\n\tClientConfig ldapclient.Config\n\tConfig       *config.AugmentedActiveDirectoryConfig\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (b *AugmentedADBuilder) GetGroupDetector() (interfaces.LDAPGroupDetector, error)\n```\n\n```go\nfunc (b *AugmentedADBuilder) GetGroupLister() (interfaces.LDAPGroupLister, error)\n```\n\n```go\nfunc (b *AugmentedADBuilder) GetGroupMemberExtractor() (interfaces.LDAPMemberExtractor, error)\n```\n\n```go\nfunc (b *AugmentedADBuilder) GetGroupNameMapper() (interfaces.LDAPGroupNameMapper, error)\n```\n\n```go\nfunc (b *AugmentedADBuilder) GetUserNameMapper() (interfaces.LDAPUserNameMapper, error)\n```\n\n```go\ntype GroupNameRestrictions interface {\n\tGetWhitelist() []string\n\tGetBlacklist() []string\n}\n```\nGroupNameRestrictions desribes an object that holds blacklists and whitelists\n\n```go\ntype GroupSyncSource string\n```\nGroupSyncSource determines the source of the groups to be synced\n\n```go\nconst (\n\t// GroupSyncSourceLDAP determines that the groups to be synced are determined from an LDAP record\n\tGroupSyncSourceLDAP GroupSyncSource = \"ldap\"\n\t// GroupSyncSourceOpenShift determines that the groups to be synced are determined from OpenShift records\n\tGroupSyncSourceOpenShift GroupSyncSource = \"openshift\"\n)\n```\n\n```go\ntype MappedNameRestrictions interface {\n\tGetGroupNameMappings() map[string]string\n}\n```\nMappedNameRestrictions describes an object that holds user name mappings for a group sync job\n\n```go\ntype OpenShiftGroupNameRestrictions interface {\n\tGroupNameRestrictions\n\tGetClient() usertypedclient.GroupInterface\n}\n```\nOpenShiftGroupNameRestrictions describes an object that holds blacklists and whitelists as well as a client that can retrieve OpenShift groups to satisfy those lists\n\n```go\ntype PruneBuilder interface {\n\tGetGroupLister() (interfaces.LDAPGroupLister, error)\n\tGetGroupNameMapper() (interfaces.LDAPGroupNameMapper, error)\n\tGetGroupDetector() (interfaces.LDAPGroupDetector, error)\n}\n```\nPruneBuilder describes an object that can build all the schema-specific parts of an LDAPGroupPruner\n\n```go\ntype PruneOptions struct {\n\t// Config is the LDAP sync config read from file\n\tConfig *config.LDAPSyncConfig\n\n\t// Whitelist are the names of OpenShift group or LDAP group UIDs to use for syncing\n\tWhitelist []string\n\n\t// Blacklist are the names of OpenShift group or LDAP group UIDs to exclude\n\tBlacklist []string\n\n\t// Confirm determines whether or not to write to OpenShift\n\tConfirm bool\n\n\t// GroupInterface is the interface used to interact with OpenShift Group objects\n\tGroupInterface usertypedclient.GroupInterface\n\n\t// Stderr is the writer to write warnings and errors to\n\tStderr io.Writer\n\n\t// Out is the writer to write output to\n\tOut io.Writer\n}\n```\n\n```go\nfunc NewPruneOptions() *PruneOptions\n```\n\n```go\nfunc (o *PruneOptions) Complete(whitelistFile, blacklistFile, configFile string, args []string, f *clientcmd.Factory) error\n```\n\n```go\nfunc (o *PruneOptions) GetBlacklist() []string\n```\n\n```go\nfunc (o *PruneOptions) GetClient() usertypedclient.GroupInterface\n```\n\n```go\nfunc (o *PruneOptions) GetGroupNameMappings() map[string]string\n```\n\n```go\nfunc (o *PruneOptions) GetWhitelist() []string\n```\n\n```go\nfunc (o *PruneOptions) Run(cmd *cobra.Command, f *clientcmd.Factory) error\n```\nRun creates the GroupSyncer specified and runs it to sync groups the arguments are only here because its the only way to get the printer we need\n\n```go\nfunc (o *PruneOptions) Validate() error\n```\n\n```go\ntype RFC2307Builder struct {\n\tClientConfig ldapclient.Config\n\tConfig       *config.RFC2307Config\n\n\tErrorHandler syncerror.Handler\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (b *RFC2307Builder) GetGroupDetector() (interfaces.LDAPGroupDetector, error)\n```\n\n```go\nfunc (b *RFC2307Builder) GetGroupLister() (interfaces.LDAPGroupLister, error)\n```\n\n```go\nfunc (b *RFC2307Builder) GetGroupMemberExtractor() (interfaces.LDAPMemberExtractor, error)\n```\n\n```go\nfunc (b *RFC2307Builder) GetGroupNameMapper() (interfaces.LDAPGroupNameMapper, error)\n```\n\n```go\nfunc (b *RFC2307Builder) GetUserNameMapper() (interfaces.LDAPUserNameMapper, error)\n```\n\n```go\ntype SyncBuilder interface {\n\tGetGroupLister() (interfaces.LDAPGroupLister, error)\n\tGetGroupNameMapper() (interfaces.LDAPGroupNameMapper, error)\n\tGetUserNameMapper() (interfaces.LDAPUserNameMapper, error)\n\tGetGroupMemberExtractor() (interfaces.LDAPMemberExtractor, error)\n}\n```\nSyncBuilder describes an object that can build all the schema-specific parts of an LDAPGroupSyncer\n\n```go\ntype SyncOptions struct {\n\t// Source determines the source of the list of groups to sync\n\tSource GroupSyncSource\n\n\t// Config is the LDAP sync config read from file\n\tConfig *config.LDAPSyncConfig\n\n\t// Whitelist are the names of OpenShift group or LDAP group UIDs to use for syncing\n\tWhitelist []string\n\n\t// Blacklist are the names of OpenShift group or LDAP group UIDs to exclude\n\tBlacklist []string\n\n\t// Confirm determines whether or not to write to OpenShift\n\tConfirm bool\n\n\t// GroupInterface is the interface used to interact with OpenShift Group objects\n\tGroupInterface usertypedclient.GroupInterface\n\n\t// Stderr is the writer to write warnings and errors to\n\tStderr io.Writer\n\n\t// Out is the writer to write output to\n\tOut io.Writer\n}\n```\n\n```go\nfunc NewSyncOptions() *SyncOptions\n```\n\n```go\nfunc (o *SyncOptions) Complete(typeArg, whitelistFile, blacklistFile, configFile string, args []string, f *clientcmd.Factory) error\n```\n\n```go\nfunc (o *SyncOptions) CreateErrorHandler() syncerror.Handler\n```\nCreateErrorHandler creates an error handler for the LDAP sync job\n\n```go\nfunc (o *SyncOptions) GetBlacklist() []string\n```\n\n```go\nfunc (o *SyncOptions) GetClient() usertypedclient.GroupInterface\n```\n\n```go\nfunc (o *SyncOptions) GetGroupNameMappings() map[string]string\n```\n\n```go\nfunc (o *SyncOptions) GetWhitelist() []string\n```\n\n```go\nfunc (o *SyncOptions) Run(cmd *cobra.Command, f *clientcmd.Factory) error\n```\nRun creates the GroupSyncer specified and runs it to sync groups the arguments are only here because its the only way to get the printer we need\n\n```go\nfunc (o *SyncOptions) Validate() error\n```\n\n","path":"github.phpd.cn/openshift/origin/pkg/oc/admin/groups/sync/cli","name":"cli","synopsis":"","isRedistributable":true}
