cli

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2015 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SyncGroupsRecommendedName = "sync-groups"
)

Variables

Functions

func NewCmdSyncGroups

func NewCmdSyncGroups(name, fullName string, f *clientcmd.Factory, out io.Writer) *cobra.Command

func ValidateSource

func ValidateSource(source GroupSyncSource) bool

Types

type ADSyncBuilder

type ADSyncBuilder struct {
	ClientConfig *ldaputil.LDAPClientConfig
	Config       *api.ActiveDirectoryConfig
	// contains filtered or unexported fields
}

func (*ADSyncBuilder) GetGroupLister

func (b *ADSyncBuilder) GetGroupLister() (interfaces.LDAPGroupLister, error)

func (*ADSyncBuilder) GetGroupMemberExtractor

func (b *ADSyncBuilder) GetGroupMemberExtractor() (interfaces.LDAPMemberExtractor, error)

func (*ADSyncBuilder) GetGroupNameMapper

func (b *ADSyncBuilder) GetGroupNameMapper() (interfaces.LDAPGroupNameMapper, error)

func (*ADSyncBuilder) GetUserNameMapper

func (b *ADSyncBuilder) GetUserNameMapper() (interfaces.LDAPUserNameMapper, error)

type AugmentedADSyncBuilder

type AugmentedADSyncBuilder struct {
	ClientConfig *ldaputil.LDAPClientConfig
	Config       *api.AugmentedActiveDirectoryConfig
	// contains filtered or unexported fields
}

func (*AugmentedADSyncBuilder) GetGroupLister

func (b *AugmentedADSyncBuilder) GetGroupLister() (interfaces.LDAPGroupLister, error)

func (*AugmentedADSyncBuilder) GetGroupMemberExtractor

func (b *AugmentedADSyncBuilder) GetGroupMemberExtractor() (interfaces.LDAPMemberExtractor, error)

func (*AugmentedADSyncBuilder) GetGroupNameMapper

func (b *AugmentedADSyncBuilder) GetGroupNameMapper() (interfaces.LDAPGroupNameMapper, error)

func (*AugmentedADSyncBuilder) GetUserNameMapper

func (b *AugmentedADSyncBuilder) GetUserNameMapper() (interfaces.LDAPUserNameMapper, error)

type GroupSyncSource

type GroupSyncSource string

GroupSyncSource determines the source of the groups to be synced

const (
	// GroupSyncSourceLDAP determines that the groups to be synced are determined from an LDAP record
	GroupSyncSourceLDAP GroupSyncSource = "ldap"
	// GroupSyncSourceOpenShift determines that the groups to be synced are determined from OpenShift records
	GroupSyncSourceOpenShift GroupSyncSource = "openshift"
)

type RFC2307SyncBuilder

type RFC2307SyncBuilder struct {
	ClientConfig *ldaputil.LDAPClientConfig
	Config       *api.RFC2307Config
	// contains filtered or unexported fields
}

func (*RFC2307SyncBuilder) GetGroupLister

func (b *RFC2307SyncBuilder) GetGroupLister() (interfaces.LDAPGroupLister, error)

func (*RFC2307SyncBuilder) GetGroupMemberExtractor

func (b *RFC2307SyncBuilder) GetGroupMemberExtractor() (interfaces.LDAPMemberExtractor, error)

func (*RFC2307SyncBuilder) GetGroupNameMapper

func (b *RFC2307SyncBuilder) GetGroupNameMapper() (interfaces.LDAPGroupNameMapper, error)

func (*RFC2307SyncBuilder) GetUserNameMapper

func (b *RFC2307SyncBuilder) GetUserNameMapper() (interfaces.LDAPUserNameMapper, error)

type SyncBuilder

type SyncBuilder interface {
	GetGroupLister() (interfaces.LDAPGroupLister, error)
	GetGroupNameMapper() (interfaces.LDAPGroupNameMapper, error)
	GetUserNameMapper() (interfaces.LDAPUserNameMapper, error)
	GetGroupMemberExtractor() (interfaces.LDAPMemberExtractor, error)
}

type SyncGroupsOptions

type SyncGroupsOptions struct {
	// Source determines the source of the list of groups to sync
	Source GroupSyncSource

	// Config is the LDAP sync config read from file
	Config api.LDAPSyncConfig

	// Whitelist are the names of OpenShift group or LDAP group UIDs to use for syncing
	Whitelist []string

	// Blacklist are the names of OpenShift group or LDAP group UIDs to exclude
	Blacklist []string

	// Confirm determines whether not to write to openshift
	Confirm bool

	// GroupsInterface is the interface used to interact with OpenShift Group objects
	GroupInterface osclient.GroupInterface

	// Stderr is the writer to write warnings and errors to
	Stderr io.Writer

	// Out is the writer to write output to
	Out io.Writer
}

func NewSyncGroupsOptions

func NewSyncGroupsOptions() *SyncGroupsOptions

func (*SyncGroupsOptions) Complete

func (o *SyncGroupsOptions) Complete(typeArg, whitelistFile, blacklistFile, configFile string, args []string, f *clientcmd.Factory) error

func (*SyncGroupsOptions) GetGroupNameMapper

func (o *SyncGroupsOptions) GetGroupNameMapper(syncBuilder SyncBuilder) (interfaces.LDAPGroupNameMapper, error)

func (*SyncGroupsOptions) GetLDAPGroupLister

func (o *SyncGroupsOptions) GetLDAPGroupLister(syncBuilder SyncBuilder) (interfaces.LDAPGroupLister, error)

func (*SyncGroupsOptions) GetOpenShiftGroupListerMapper

func (o *SyncGroupsOptions) GetOpenShiftGroupListerMapper(syncBuilder SyncBuilder, clientConfig *ldaputil.LDAPClientConfig) (interfaces.LDAPGroupListerNameMapper, error)

func (*SyncGroupsOptions) Run

Run 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

func (*SyncGroupsOptions) Validate

func (o *SyncGroupsOptions) Validate() error

Jump to

Keyboard shortcuts

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