config

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Project string `json:"project" pflag:",Specifies the project to work on."`
	Domain  string `json:"domain" pflag:",Specified the domain to work on."`
	Output  string `json:"output" pflag:",Specified the output type."`
}

Config hold configration for flytectl flag

func GetConfig

func GetConfig() *Config

GetConfig will return the config

func (Config) GetPFlagSet

func (cfg Config) GetPFlagSet(prefix string) *pflag.FlagSet

GetPFlagSet will return strongly types pflags for all fields in Config and its nested types. The format of the flags is json-name.json-sub-name... etc.

func (Config) MustOutputFormat

func (cfg Config) MustOutputFormat() printer.OutputFormat

MustOutputFormat will validate the supported output formate and return output formate

func (Config) OutputFormat

func (cfg Config) OutputFormat() (printer.OutputFormat, error)

OutputFormat will return output formate

Jump to

Keyboard shortcuts

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