common

package
v0.0.0-...-0ba0ddf Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAddressFlag

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

AddAddressFlag adds the address flag to the passed cobra command.

func AddComponentPathFlag

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

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

func AddConfigFileFlag

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

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

func AddInputPathFile

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

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

func AddOutputFileFlag

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

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

func AddPayloadOnlyFlag

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

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

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

PrintStorageObjectStatus prints object status.

func WriteObjectToFile

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