cliutil

package
v0.0.0-...-1cedefa Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2025 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FlagLogOutput = &cli.StringFlag{
		Name:    flags.LogFormatOutput,
		Usage:   "Output format for the logs (default, json)",
		Value:   flags.LogFormatOutputValueDefault,
		EnvVars: []string{"TUNNEL_MANAGEMENT_OUTPUT", "TUNNEL_LOG_OUTPUT"},
	}
)

Functions

func Action

func Action(actionFunc cli.ActionFunc) cli.ActionFunc

func ConfigureLoggingFlags

func ConfigureLoggingFlags(shouldHide bool) []cli.Flag

func ConfiguredAction

func ConfiguredAction(actionFunc cli.ActionFunc) cli.ActionFunc

func ConfiguredActionWithWarnings

func ConfiguredActionWithWarnings(actionFunc func(*cli.Context, string) error) cli.ActionFunc

Just like ConfiguredAction, but accepts a second parameter with configuration warnings.

func FileChecksum

func FileChecksum(filePath string) (string, error)

FileChecksum opens a file and returns the SHA256 checksum.

func RemovedCommand

func RemovedCommand(name string) *cli.Command

func UsageError

func UsageError(format string, args ...interface{}) error

func WithErrorHandler

func WithErrorHandler(actionFunc cli.ActionFunc) cli.ActionFunc

Ensures exit with error code if actionFunc returns an error

Types

type BuildInfo

type BuildInfo struct {
	GoOS               string `json:"go_os"`
	GoVersion          string `json:"go_version"`
	GoArch             string `json:"go_arch"`
	BuildType          string `json:"build_type"`
	CloudflaredVersion string `json:"cloudflared_version"`
	Checksum           string `json:"checksum"`
}

func GetBuildInfo

func GetBuildInfo(buildType, version string) *BuildInfo

func (*BuildInfo) GetBuildTypeMsg

func (bi *BuildInfo) GetBuildTypeMsg() string

func (*BuildInfo) Log

func (bi *BuildInfo) Log(log *zerolog.Logger)

func (*BuildInfo) OSArch

func (bi *BuildInfo) OSArch() string

func (*BuildInfo) UserAgent

func (bi *BuildInfo) UserAgent() string

func (*BuildInfo) Version

func (bi *BuildInfo) Version() string

Jump to

Keyboard shortcuts

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