contextcmdutil

package
v0.44.0-alpha1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FlagSet

type FlagSet struct {
	*flagutil.FlagSet
	// contains filtered or unexported fields
}

func NewFlagSet

func NewFlagSet(cmd *cobra.Command, f *factory.Factory) *FlagSet

NewFlagSet returns a new flag set with common context flags

func (*FlagSet) AddContextName

func (fs *FlagSet) AddContextName(name *string) *flagutil.FlagOptions

AddContextName adds a flag for setting the name of the context

type Validator

type Validator struct {
	Localizer  localize.Localizer
	SvcContext *servicecontext.Context
}

Validator is a type for validating service context inputs

func (*Validator) ValidateName

func (v *Validator) ValidateName(val interface{}) error

ValidateName validates the name of the context

func (*Validator) ValidateNameIsAvailable

func (v *Validator) ValidateNameIsAvailable(name string) error

ValidateNameIsAvailable validates if the name provided is a unique context name

Jump to

Keyboard shortcuts

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