Documentation ¶
Index ¶
- Variables
- func AppGeneration(app apiv1.App, msg string) string
- func BoolToStar(obj any) (string, error)
- func DefaultMemory(obj any) (string, error)
- func DisplayRange(minVal, maxVal any) (string, error)
- func FormatCreated(data metav1.Time) string
- func FormatFirst(data, data2 any) (string, error)
- func FormatID(obj kclient.Object) (string, error)
- func FormatJSON(data any) (string, error)
- func FormatJSONCompact(data any) (string, error)
- func FormatYAML(data any) (string, error)
- func Graph(value int) (string, error)
- func ImageCommit(obj metav1.Object) string
- func ImageName(obj metav1.Object) string
- func MemoryToRange(obj any) (string, error)
- func Name(obj any) (string, error)
- func Noop(obj 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)
- func ToJSON(data any) (map[string]any, error)
- func Trunc(s string) string
- type FormatFunc
- type Writer
Constants ¶
This section is empty.
Variables ¶
View Source
var ( FuncMap = map[string]any{ "ago": FormatCreated, "json": FormatJSON, "jsoncompact": FormatJSONCompact, "yaml": FormatYAML, "first": FormatFirst, "toJson": ToJSON, "boolToStar": BoolToStar, "array": ToArray, "arrayFirst": ToArrayFirst, "arrayNoSpace": ToArrayNoSpace, "graph": Graph, "pointer": Pointer, "fullID": FormatID, "name": Name, "trunc": Trunc, "alias": Noop, "appGeneration": AppGeneration, "displayRange": DisplayRange, "memoryToRange": MemoryToRange, "defaultMemory": DefaultMemory, "ownerName": OwnerReferenceName, "imageName": ImageName, "imageCommit": ImageCommit, } )
Functions ¶
func BoolToStar ¶
func DefaultMemory ¶
func DisplayRange ¶
func FormatCreated ¶
func FormatFirst ¶
func FormatJSON ¶
func FormatJSONCompact ¶
func FormatYAML ¶
func ImageCommit ¶
func MemoryToRange ¶
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.