config

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultProcessTimeoutSec = 60 * 60 * 2 // 2時間
View Source
var DefaultQueryDriver = query.DriverJMESPath

Functions

func InitConfig

func InitConfig(flags *pflag.FlagSet)

InitConfig 指定のFlagSetにConfigへ値を設定するためのフラグを登録する

Types

type Config

type Config struct {
	profile.ConfigValue

	// Profile プロファイル名
	Profile string `json:"-"`

	// DefaultOutputType デフォルトアウトプットタイプ
	DefaultOutputType string

	// NoColor ANSIエスケープシーケンスによる色つけを無効化
	NoColor bool

	// ProcessTimeoutSec コマンド全体の実行タイムアウトまでの秒数
	ProcessTimeoutSec int

	// ArgumentMatchMode 引数でリソースを特定する際にリソース名と引数を比較する方法を指定
	// 有効な値:
	//   - `partial`(デフォルト): 部分一致
	//   - `exact`: 完全一致
	// Note: 引数はID or Name or Tagsと比較されるが、この項目はNameとの比較にのみ影響する。IDとTagsは常に完全一致となる。
	ArgumentMatchMode string

	// DefaultQueryDriver 各コマンドで--query-driverが省略された場合のデフォルト値
	// 有効な値:
	//   - `jmespath`(デフォルト): JMESPath
	//   - `jq` : gojq
	DefaultQueryDriver string
}

Config CLI全コマンドが利用するフラグ

func LoadConfigValue

func LoadConfigValue(flags *pflag.FlagSet, errW io.Writer, skipLoadingProfile bool) (*Config, error)

LoadConfigValue 指定のフラグセットからフラグを読み取り*Flagsを組み立てて返す

func (*Config) ArgumentMatchModeValue added in v1.1.0

func (o *Config) ArgumentMatchModeValue() string

func (*Config) IsEmpty

func (o *Config) IsEmpty() bool

func (*Config) ProcessTimeout

func (o *Config) ProcessTimeout() time.Duration

func (*Config) Validate

func (o *Config) Validate(skipCred bool) error

Jump to

Keyboard shortcuts

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