printer

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2019 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Copyright The Pharmer Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright The Pharmer Authors.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetNewTabWriter

func GetNewTabWriter(output io.Writer) *tabwriter.Writer

func NewEditPrinter

func NewEditPrinter(format string) (*editPrinterOptions, error)

func NewPrinter

func NewPrinter(format string) (printers.ResourcePrinter, error)

func PrintNewline

func PrintNewline(w io.Writer) error

func ShortHumanDuration

func ShortHumanDuration(d time.Duration) string

func TranslateTimestamp

func TranslateTimestamp(timestamp metav1.Time) string

Types

type HumanReadablePrinter

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

func NewHumanReadablePrinter

func NewHumanReadablePrinter(options PrintOptions) *HumanReadablePrinter

func (*HumanReadablePrinter) AfterPrint

func (h *HumanReadablePrinter) AfterPrint(io.Writer, string) error

func (*HumanReadablePrinter) HandledResources

func (h *HumanReadablePrinter) HandledResources() []string

func (*HumanReadablePrinter) Handler

func (h *HumanReadablePrinter) Handler(printFunc interface{}) error

func (*HumanReadablePrinter) IsGeneric

func (h *HumanReadablePrinter) IsGeneric() bool

func (*HumanReadablePrinter) PrintHeader

func (h *HumanReadablePrinter) PrintHeader(enable bool)

func (*HumanReadablePrinter) PrintObj

func (h *HumanReadablePrinter) PrintObj(obj runtime.Object, output io.Writer) error

type PrintOptions

type PrintOptions struct {
	Wide bool
}

Jump to

Keyboard shortcuts

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