Documentation
      ¶
    
    
  
    
  
    Index ¶
- Variables
 - func BoolToStar(obj any) (string, error)
 - func FormatCreated(obj any) string
 - func FormatID(obj kclient.Object) (string, error)
 - func FormatJSON(data any) (string, error)
 - func FormatJSONCompact(data any) (string, error)
 - func FormatUntil(data metav1.Time) string
 - func FormatYAML(data any) (string, error)
 - func Graph(value int) (string, error)
 - func Noop(any) string
 - func OwnerReferenceName(obj metav1.Object) string
 - func Pointer(data any) string
 - func SimpleFormat(values [][]string) (string, string)
 - func ToArray(s []string) (string, error)
 - func ToArrayFirst(s []string) (string, error)
 - func ToArrayNoSpace(s []string) (string, error)
 - type FormatFunc
 - type Writer
 
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  
var ( FuncMap = map[string]any{ "ago": FormatCreated, "until": FormatUntil, "json": FormatJSON, "jsoncompact": FormatJSONCompact, "yaml": FormatYAML, "boolToStar": BoolToStar, "array": ToArray, "arrayFirst": ToArrayFirst, "arrayNoSpace": ToArrayNoSpace, "graph": Graph, "pointer": Pointer, "fullID": FormatID, "alias": Noop, "ownerName": OwnerReferenceName, } )
Functions ¶
func BoolToStar ¶
func FormatCreated ¶
func FormatJSON ¶
func FormatJSONCompact ¶
func FormatUntil ¶
func FormatYAML ¶
func OwnerReferenceName ¶
func SimpleFormat ¶
func ToArrayFirst ¶
func ToArrayNoSpace ¶
Types ¶
type FormatFunc ¶
type FormatFunc any
type Writer ¶
type Writer interface {
	Write(obj kclient.Object)
	// WriteFormatted will write a newly formatted object that follows the default
	// pattern passed to the NewWriter function.  If the format has been overwritten
	// by the use the formatted object will not be passed to the custom format, but
	// instead the kclient.Object if not nil.  This gives consistency in that users custom
	// formatting always applies to the source kclient.Object, not the intermediate formatted
	// object that was created.
	//
	// sourceObj may be nil
	WriteFormatted(formattedObj any, sourceObj kclient.Object)
	Close() error
	Err() error
	Flush() error
	AddFormatFunc(name string, f FormatFunc)
}
     Click to show internal directories. 
   Click to hide internal directories.