config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package config contains common configuration values that are used by the various commands and subcommands in the CLI.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitializeLogging

func InitializeLogging(cmd *cobra.Command, rootFlags *RootFlags) svc1log.Logger

InitializeLogging initializes the logging configuration for the CLI. It sets the log level based on the verbose and quiet flags provided by the user. If the quiet flag is set, the logger is set to discard all logs. If the verbose flag is set, the log level is set to debug. Otherwise, the log level is set to info. The logger is then returned for use by caller. We are using Palantir's Witchcraft logging library to structure our logging output.

func SetProxyConfig added in v0.0.283

func SetProxyConfig(ctx context.Context, httpProxy, socksProxy string) context.Context

SetProxyConfig stores proxy configuration in the context

Types

type ProxyConfig added in v0.0.283

type ProxyConfig struct {
	HttpProxy  string
	SocksProxy string
}

ProxyConfig holds proxy configuration for HTTP requests

func GetProxyConfig added in v0.0.283

func GetProxyConfig(ctx context.Context) *ProxyConfig

GetProxyConfig retrieves proxy configuration from the context

type RootFlags

type RootFlags struct {
	Quiet      bool
	Verbose    bool
	HttpProxy  string
	SocksProxy string
}

Jump to

Keyboard shortcuts

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