Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrintFull ¶
func PrintFull(results []Result)
PrintFull prints out a table and the raw diffs for a results slice.
func PrintSummary ¶
func PrintSummary(results []Result)
PrintSummary prints out a summary table for a results slice.
func ResultsTable ¶
ResultsTable returns a table that summarizes a slice of result diffs.
Types ¶
type DiffConfig ¶
DiffConfig configures how Kubernetes diffs should be generated.
type Operation ¶
type Operation string
Operation describes whether a diff block represents a creation, deletion, or update.
type Result ¶
type Result struct { Object *apply.TypedKubeObj `json:"object"` Name string `json:"name"` RawDiff string `json:"rawDiff"` NumAdded int `json:"numAdded"` NumRemoved int `json:"numRemoved"` Operation Operation `json:"operation"` }
Result contains the results of diffing a single object.
func DiffKube ¶
func DiffKube( oldRoot string, newRoot string, config DiffConfig, ) ([]Result, error)
DiffKube processes the results of a kubectl diff call in place of the default 'diff' command.
func (*Result) ClippedRawDiff ¶
ClippedRawDiff returns a clipped version of the raw diff for this result. Used in the Github diff comment template.
func (*Result) NumChangedLines ¶
NumChangedLines returns the rough number of lines changed (taken as the max of the num added and num removed).