common

package
v0.39.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAddressFlag added in v0.32.0

func AddAddressFlag(cmd *cobra.Command, v *string)

AddAddressFlag adds the address flag to the passed cobra command.

func AddComponentPathFlag added in v0.32.0

func AddComponentPathFlag(cmd *cobra.Command, v *string)

AddComponentPathFlag adds the path-to-component flag to the passed cobra command.

func AddConfigFileFlag added in v0.38.0

func AddConfigFileFlag(cmd *cobra.Command, v *string)

AddConfigFileFlag adds the config file flag to the passed cobra command.

func AddInputPathFile added in v0.38.0

func AddInputPathFile(cmd *cobra.Command, v *string)

AddInputPathFile adds the input file with object flag to the passed cobra command.

func AddOutputFileFlag added in v0.32.0

func AddOutputFileFlag(cmd *cobra.Command, v *string)

AddOutputFileFlag adds the output file flag to the passed cobra command.

func AddPayloadOnlyFlag added in v0.38.0

func AddPayloadOnlyFlag(cmd *cobra.Command, v *bool)

func Errf

func Errf(errFmt string, err error) error

Errf returns formatted error in errFmt format if err is not nil.

func ExitOnErr

func ExitOnErr(cmd *cobra.Command, err error)

ExitOnErr calls exitOnErrCode with code 1.

func PrintObjectHeader added in v0.32.0

func PrintObjectHeader(cmd *cobra.Command, h object.Object)

PrintObjectHeader prints passed object's header fields via the passed cobra command. Does nothing with the payload.

func PrintStorageObjectStatus added in v0.39.0

func PrintStorageObjectStatus(cmd *cobra.Command, status engine.ObjectStatus)

PrintStorageObjectStatus prints object status.

func WriteObjectToFile added in v0.32.0

func WriteObjectToFile(cmd *cobra.Command, path string, data []byte, payloadOnly bool)

WriteObjectToFile writes object to the provided path. Does nothing if the path is empty.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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