kubernetes/staging/src/k8s.io/kubectl/pkg/cmd/util/editor/editoptions.go

var SupportedSubresources

type EditOptions

// NewEditOptions returns an initialized EditOptions instance
func NewEditOptions(editMode EditMode, ioStreams genericiooptions.IOStreams) *EditOptions {}

type editPrinterOptions

func (e *editPrinterOptions) Complete(fromPrintFlags *genericclioptions.PrintFlags) error {}

func (e *editPrinterOptions) PrintObj(obj runtime.Object, out io.Writer) error {}

// Complete completes all the required options
func (o *EditOptions) Complete(f cmdutil.Factory, args []string, cmd *cobra.Command) error {}

// Validate checks the EditOptions to see if there is sufficient information to run the command.
func (o *EditOptions) Validate() error {}

// Run performs the execution
func (o *EditOptions) Run() error {}

func (o *EditOptions) extractManagedFields(obj runtime.Object) error {}

func clearManagedFields(obj runtime.Object) (types.UID, []metav1.ManagedFieldsEntry, error) {}

func (o *EditOptions) restoreManagedFields(infos []*resource.Info) error {}

func (o *EditOptions) visitToApplyEditPatch(originalInfos []*resource.Info, patchVisitor resource.Visitor) error {}

func (o *EditOptions) annotationPatch(update *resource.Info) error {}

// GetApplyPatch is used to get and apply patches
func GetApplyPatch(obj runtime.Unstructured) ([]byte, []byte, types.PatchType, error) {}

func encodeToJSON(obj runtime.Unstructured) ([]byte, error) {}

func (o *EditOptions) visitToPatch(originalInfos []*resource.Info, patchVisitor resource.Visitor, results *editResults) error {}

func (o *EditOptions) visitToCreate(createVisitor resource.Visitor) error {}

func (o *EditOptions) visitAnnotation(annotationVisitor resource.Visitor) error {}

type EditMode

const NormalEditMode

const EditBeforeCreateMode

const ApplyEditMode

type editReason

type editHeader

// writeTo outputs the current header information into a stream
func (h *editHeader) writeTo(w io.Writer, editMode EditMode) error {}

type editResults

func (r *editResults) addError(err error, info *resource.Info) string {}

// preservedFile writes out a message about the provided file if it exists to the
// provided output stream when an error happens. Used to notify the user where
// their updates were preserved.
func preservedFile(err error, path string, out io.Writer) error {}

// hasLines returns true if any line in the provided stream is non empty - has non-whitespace
// characters, or the first non-whitespace character is a '#' indicating a comment. Returns
// any errors encountered reading the stream.
func hasLines(r io.Reader) (bool, error) {}

// hashOnLineBreak returns a string built from the provided string by inserting any necessary '#'
// characters after '\n' characters, indicating a comment.
func hashOnLineBreak(s string) string {}

// editorEnvs returns an ordered list of env vars to check for editor preferences.
func editorEnvs() []string {}