common

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// related to the --output flag
	DefaultOutputFormat = "text"
	OutputFlagName      = "output"
	OutputFlagShort     = "o"
	OutputConfigPath    = OutputFlagName

	// related to the --color flag
	ColorFlagName    = "color"
	ColorConfigPath  = ColorFlagName
	DefaultColorMode = "auto"

	// related to the --color-theme flag
	ColorThemeFlagName   = "color-theme"
	ColorThemeConfigPath = "color-theme"
	DefaultColorTheme    = "kong-light"

	// related to the --profile flag
	ProfileFlagName  = "profile"
	ProfileFlagShort = "p"

	// related to the --config-file flag
	ConfigFilePathFlagName = "config-file"

	// related to the --log-level flag
	LogLevelFlagName   = "log-level"
	DefaultLogLevel    = "info"
	LogLevelConfigPath = LogLevelFlagName

	// related to directing logs to a file
	LogFileFlagName   = "log-file"
	LogFileConfigPath = LogFileFlagName
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ColorMode added in v0.1.6

type ColorMode int
const (
	ColorModeAuto ColorMode = iota
	ColorModeAlways
	ColorModeNever
)

func ColorModeStringToIota added in v0.1.6

func ColorModeStringToIota(mode string) (ColorMode, error)

func (ColorMode) String added in v0.1.6

func (cm ColorMode) String() string

type LogLevel

type LogLevel int
const (
	TRACE LogLevel = iota
	DEBUG
	INFO
	WARN
	ERROR
)

func LogLevelStringToIota

func LogLevelStringToIota(level string) (LogLevel, error)

func (LogLevel) String

func (ll LogLevel) String() string

type OutputFormat

type OutputFormat int

Represents an enum of valid values for the format of the output for this CLI execution

const (
	JSON OutputFormat = iota
	YAML
	TEXT
)

func OutputFormatStringToIota

func OutputFormatStringToIota(format string) (OutputFormat, error)

func (OutputFormat) String

func (of OutputFormat) String() string

Jump to

Keyboard shortcuts

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