Documentation ¶
Index ¶
- Constants
- Variables
- func BindCommandArgs(values ...*string) func(c *cobra.Command, args []string) error
- func GetBody(o IOptions, tpl string) (buf []byte, err error)
- func HomeDir() string
- func OnConfigInitialize(cfgFile string) error
- func ValidateError(c *cobra.Command, err error)
- type CliConfig
- type ConfigContext
- type IOStreams
- type IOptions
- type Options
- type Output
- type OutputType
Constants ¶
View Source
const ( OUTPUT_JSON = "json" OUTPUT_YAML = "yaml" )
Variables ¶
View Source
var (
Config *conf
)
Functions ¶
func BindCommandArgs ¶
func OnConfigInitialize ¶
func ValidateError ¶
Types ¶
type CliConfig ¶
type CliConfig struct { ServerAddr string `yaml:"server_addr"` Timeout string `yaml:"timeout"` Tls struct { TlsCa string `yaml:"tls_ca"` } `yaml:"tls"` Interceptors struct { AuthJwt struct { JwtToken string `yaml:"jwt_token"` } `yaml:"auth_jwt"` Opentracing struct { Jaeger struct { Endpoint string `yaml:"endpoint"` ServiceName string `yaml:"service_name"` SampleRate string `yaml:"sample_rate"` } `yaml:"jaeger"` } `yaml:"opentracing"` } `yaml:"interceptors"` }
type ConfigContext ¶
type Options ¶
type Options struct { OutStream *os.File // output stream ConfigFile string // config file Output string // output format (json/yaml) Filename string // file Data string // input data Namespace string // cloud-barista namespace Name string // object name }
func (*Options) GetFilename ¶
func (*Options) PrintlnError ¶
type Output ¶
func (*Output) WriteString ¶
type OutputType ¶
type OutputType string
Click to show internal directories.
Click to hide internal directories.