cmd

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TimeFormatFull     = "full"
	TimeFormatRelative = "relative"
	TimeFormatNone     = "none"
)

Variables

This section is empty.

Functions

func CheckErr

func CheckErr(err error)

func MarshalMetaObject

func MarshalMetaObject(obj metav1.Object, timeFmt string) ([]byte, error)

func NewCmdBlame

func NewCmdBlame() *cobra.Command

Types

type Context

type Context struct {
	Level   int
	NewLine bool
	Node    *Node
}

func (Context) WithLevel

func (c Context) WithLevel(lvl int) Context

func (Context) WithNewLine

func (c Context) WithNewLine(newLine bool) Context

func (Context) WithNode

func (c Context) WithNode(node *Node) Context

type KeyWithNode

type KeyWithNode struct {
	Node *Node
	Key  value.FieldList
}

type ManagerInfo

type ManagerInfo struct {
	Manager   string
	Operation string
	Time      string
}

func (*ManagerInfo) String

func (i *ManagerInfo) String() string

type Marshaller

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

type Node

type Node struct {
	// field name -> child node
	Fields map[string]*Node
	// fieldList ID -> {fieldList, child node}
	Keys map[string]*KeyWithNode
	// value ID -> {value, child node}
	Values map[string]*ValueWithNode

	Parent *Node

	Managers []ManagerInfo
}

type Options

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

func (*Options) Complete

func (o *Options) Complete(f *genericclioptions.ConfigFlags, cmd *cobra.Command, args []string) error

func (*Options) Run

func (o *Options) Run() error

func (*Options) Validate

func (o *Options) Validate() error

type ValueWithNode added in v0.0.6

type ValueWithNode struct {
	Node  *Node
	Value value.Value
}

Jump to

Keyboard shortcuts

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