auth

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 41 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCmdAuth

func NewCmdAuth(f cmdutil.Factory, streams genericiooptions.IOStreams) *cobra.Command

NewCmdAuth returns an initialized Command instance for 'auth' sub command

func NewCmdCanI

func NewCmdCanI(f cmdutil.Factory, streams genericiooptions.IOStreams) *cobra.Command

NewCmdCanI returns an initialized Command for 'auth can-i' sub command

func NewCmdReconcile

func NewCmdReconcile(f cmdutil.Factory, streams genericiooptions.IOStreams) *cobra.Command

NewCmdReconcile holds the options for 'auth reconcile' sub command

func NewCmdWhoAmI added in v0.26.0

func NewCmdWhoAmI(restClientGetter genericclioptions.RESTClientGetter, streams genericiooptions.IOStreams) *cobra.Command

NewCmdWhoAmI returns an initialized Command for 'auth whoami' sub command. Experimental.

Types

type CanIOptions

type CanIOptions struct {
	AllNamespaces   bool
	Quiet           bool
	NoHeaders       bool
	Namespace       string
	AuthClient      authorizationv1client.AuthorizationV1Interface
	DiscoveryClient discovery.DiscoveryInterface

	Verb           string
	Resource       schema.GroupVersionResource
	NonResourceURL string
	Subresource    string
	ResourceName   string
	List           bool

	genericiooptions.IOStreams
	WarningPrinter *printers.WarningPrinter
}

CanIOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()

func (*CanIOptions) Complete

func (o *CanIOptions) Complete(f cmdutil.Factory, args []string) error

Complete completes all the required options

func (*CanIOptions) RunAccessCheck

func (o *CanIOptions) RunAccessCheck() (bool, error)

RunAccessCheck checks if user has access to a certain resource or non resource URL

func (*CanIOptions) RunAccessList

func (o *CanIOptions) RunAccessList() error

RunAccessList lists all the access current user has

func (*CanIOptions) Validate

func (o *CanIOptions) Validate() error

Validate makes sure provided values for CanIOptions are valid

type ReconcileOptions

type ReconcileOptions struct {
	PrintFlags             *genericclioptions.PrintFlags
	FilenameOptions        *resource.FilenameOptions
	DryRun                 bool
	RemoveExtraPermissions bool
	RemoveExtraSubjects    bool

	Visitor         resource.Visitor
	RBACClient      rbacv1client.RbacV1Interface
	NamespaceClient corev1client.CoreV1Interface

	PrintObject printers.ResourcePrinterFunc

	genericiooptions.IOStreams
}

ReconcileOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()

func NewReconcileOptions

func NewReconcileOptions(ioStreams genericiooptions.IOStreams) *ReconcileOptions

NewReconcileOptions returns a new ReconcileOptions instance

func (*ReconcileOptions) Complete

func (o *ReconcileOptions) Complete(cmd *cobra.Command, f cmdutil.Factory, args []string) error

Complete completes all the required options

func (*ReconcileOptions) RunReconcile

func (o *ReconcileOptions) RunReconcile() error

RunReconcile performs the execution

func (*ReconcileOptions) Validate

func (o *ReconcileOptions) Validate() error

Validate makes sure provided values for ReconcileOptions are valid

type WhoAmIFlags added in v0.26.0

type WhoAmIFlags struct {
	RESTClientGetter genericclioptions.RESTClientGetter
	PrintFlags       *genericclioptions.PrintFlags

	genericiooptions.IOStreams
}

WhoAmIFlags directly reflect the information that CLI is gathering via flags. They will be converted to Options, which reflect the runtime requirements for the command. This structure reduces the transformation to wiring and makes the logic itself easy to unit test.

func NewWhoAmIFlags added in v0.26.0

func NewWhoAmIFlags(restClientGetter genericclioptions.RESTClientGetter, streams genericiooptions.IOStreams) *WhoAmIFlags

NewWhoAmIFlags returns a default WhoAmIFlags.

func (*WhoAmIFlags) AddFlags added in v0.26.0

func (flags *WhoAmIFlags) AddFlags(cmd *cobra.Command)

AddFlags registers flags for a cli.

func (*WhoAmIFlags) ToOptions added in v0.26.0

func (flags *WhoAmIFlags) ToOptions(ctx context.Context, args []string) (*WhoAmIOptions, error)

ToOptions converts from CLI inputs to runtime inputs.

type WhoAmIOptions added in v0.26.0

type WhoAmIOptions struct {
	genericiooptions.IOStreams
	// contains filtered or unexported fields
}

WhoAmIOptions is the start of the data required to perform the operation. As new fields are added, add them here instead of referencing the cmd.Flags()

func (WhoAmIOptions) Run added in v0.26.0

func (o WhoAmIOptions) Run() error

Run prints all user attributes.

Jump to

Keyboard shortcuts

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