pkg

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GrepResources

func GrepResources(opts Opts, in io.Reader, out io.Writer) error

Types

type DiffType added in v0.10.0

type DiffType int
const (
	DiffLine   DiffType = iota
	DiffInline DiffType = iota
)

type Differ added in v0.10.0

type Differ struct {
	// contains filtered or unexported fields
}

func (*Differ) Add added in v0.10.0

func (d *Differ) Add(obj KubernetesObject, now string) string

type DisplayMode

type DisplayMode int
const (
	Full DisplayMode = iota
	Summary
	Clean
	CleanStatus
)

type KubernetesListMeta

type KubernetesListMeta struct {
	Items []KubernetesObject `json:"items"`
}

type KubernetesListRaw

type KubernetesListRaw struct {
	Items []genericMap `json:"items"`
}

type KubernetesObject

type KubernetesObject struct {
	Kind     string `json:"kind"`
	Metadata struct {
		Name      string `json:"name"`
		Namespace string `json:"namespace"`
	} `json:"metadata"`
}

func (KubernetesObject) Empty added in v0.2.0

func (o KubernetesObject) Empty() bool

func (KubernetesObject) Matches

func (o KubernetesObject) Matches(r Resource) bool

func (KubernetesObject) MatchesAny

func (o KubernetesObject) MatchesAny(sel Selector, text []byte) bool

func (KubernetesObject) String

func (o KubernetesObject) String() string

type LineReader added in v0.3.0

type LineReader struct {
	// contains filtered or unexported fields
}

func (*LineReader) Peak added in v0.4.0

func (r *LineReader) Peak(n int) ([]byte, error)

func (*LineReader) Read added in v0.3.0

func (r *LineReader) Read() ([]byte, error)

func (*LineReader) StartsList added in v0.9.0

func (r *LineReader) StartsList() bool

StartsList checks if the next line starts a list

type Opts added in v0.10.0

type Opts struct {
	Sel      Selector
	Mode     DisplayMode
	Diff     bool
	DiffType DiffType
	Decode   bool
}

type Resource

type Resource struct {
	Name      string
	Namespace string
	Kind      string
}

type Selector added in v0.2.0

type Selector struct {
	Resources   []Resource
	Regex       *regexp.Regexp
	InvertRegex bool
}

func (Selector) MatchesAll added in v0.4.0

func (s Selector) MatchesAll() bool

type YAMLReader added in v0.3.0

type YAMLReader struct {
	// contains filtered or unexported fields
}

func NewYAMLReader added in v0.3.0

func NewYAMLReader(r *bufio.Reader) *YAMLReader

func (*YAMLReader) Read added in v0.3.0

func (r *YAMLReader) Read() ([]byte, error)

Jump to

Keyboard shortcuts

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