Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCmdDiff ¶
func NewCmdDiff(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
Types ¶
type DiffOptions ¶
type DiffOptions struct {
FilenameOptions resource.FilenameOptions
}
type DiffProgram ¶
type DiffProgram struct {
Exec exec.Interface
genericclioptions.IOStreams
}
DiffProgram finds and run the diff program. The value of KUBECTL_EXTERNAL_DIFF environment variable will be used a diff program. By default, `diff(1)` will be used.
type DiffVersion ¶
type DiffVersion struct {
Dir *Directory
Name string
}
DiffVersion gets the proper version of objects, and aggregate them into a directory.
func NewDiffVersion ¶
func NewDiffVersion(name string) (*DiffVersion, error)
NewDiffVersion creates a new DiffVersion with the named version.
type Differ ¶
type Differ struct {
From *DiffVersion
To *DiffVersion
}
Differ creates two DiffVersion and diffs them.
func (*Differ) Diff ¶
func (d *Differ) Diff(obj Object, printer Printer) error
Diff diffs to versions of a specific object, and print both versions to directories.
type Directory ¶
type Directory struct {
Name string
}
Directory creates a new temp directory, and allows to easily create new files.
func CreateDirectory ¶
func CreateDirectory(prefix string) (*Directory, error)
CreateDirectory does create the actual disk directory, and return a new representation of it.
type InfoObject ¶
type InfoObject struct {
LocalObj runtime.Object
Info *resource.Info
Encoder runtime.Encoder
OpenAPI openapi.Resources
Force bool
}
InfoObject is an implementation of the Object interface. It gets all the information from the Info object.
func (InfoObject) Live ¶
func (obj InfoObject) Live() runtime.Object
Returns the live version of the object