Documentation
¶
Index ¶
- Variables
- func GetProjectIdByName(name string) (string, error)
- func GetProjectIdByNameInConfig(config *Config, name string) (string, error)
- func GetProjectIdFromFlag(cmd *cobra.Command) (string, error)
- func GetProjectIdFromFlagAndConfig(cmd *cobra.Command) (string, error)
- func GetProjectNameById(partner, organization, id string) (string, error)
- func GetProjectNameFromFlagAndConfig(cmd *cobra.Command) (string, error)
- func GetV3Context(cmd *cobra.Command) context.Context
- func InitConfig(ctx *context.CliContext) error
- type Config
- func (c *Config) DLog(title string)
- func (c *Config) GetAppAuthProfile() *authprofile.Profile
- func (c *Config) GetOpsAuthProfile() *authprofile.Profile
- func (c *Config) Load(filename string) error
- func (c *Config) Log(title string)
- func (c *Config) MiniCheck() error
- func (c *Config) OpenAPIAuthInfo() oruntime.ClientAuthInfoWriter
- func (c *Config) Output()
- func (c *Config) Save(filename string) error
- func (c *Config) Write(w io.Writer)
- func (c *Config) WriteReadable(w io.Writer)
- type ConfigTracker
Constants ¶
This section is empty.
Variables ¶
View Source
var AUTHENTICATION_FAILURE = 401
View Source
var AUTH_FAILURE_ERROR_MESSAGE = "" /* 141-byte string literal not displayed */
View Source
var CLI_ARCH = "NA"
View Source
var CLI_BUILD_NUMBER = "NA"
View Source
var CLI_BUILD_TIME = "NA"
View Source
var CLI_DIR_DEFAULT_LOCATION = filepath.Join(PARALUS_DIR_DEFAULT_LOCATION, "cli")
View Source
var CLI_MISMATCH_ERROR_MESSAGE = "" /* 126-byte string literal not displayed */
View Source
var CLI_VERSION = "1.0"
View Source
var CONFIG_API_VERSION = "1.0"
View Source
var CONFIG_FILE_DEFAULT_LOCATION = filepath.Join(CLI_DIR_DEFAULT_LOCATION, CONFIG_FILE_DEFAULT_NAME)
View Source
var CONFIG_FILE_DEFAULT_NAME = "config"
View Source
var CONFIG_FLAG_NAME = "config"
View Source
var GENERIC_ERROR_MESSAGE = "CLI faced an issue while running the command %s. Please use -v flag to see debug logs."
View Source
var LOG_FILE_DEFAULT_LOCATION = filepath.Join(CLI_DIR_DEFAULT_LOCATION, LOG_FILE_DEFAULT_NAME)
View Source
var LOG_FILE_DEFAULT_NAME = "cli.log"
View Source
var PARALUS_DIR_DEFAULT_LOCATION = filepath.Join(utils.GetUserHome(), ".paralus")
View Source
var PROFILE_FLAG_NAME = "profile"
View Source
var REQUEST_SUCCESSFUL = 200
View Source
var VERBOSE_FLAG_NAME = "verbose"
View Source
var WORKLOAD_CREATED = 201
View Source
var WP_API_VERSION = "1.0"
Functions ¶
func GetProjectIdByName ¶
func GetProjectNameById ¶
func InitConfig ¶
func InitConfig(ctx *context.CliContext) error
Types ¶
type Config ¶
type Config struct { Profile string `json:"profile,omitempty"` SkipServerCertValid string `json:"skip_server_cert_check,omitempty"` RESTEndpoint string `json:"rest_endpoint,omitempty"` OPSEndpoint string `json:"ops_endpoint,omitempty"` APIKey string `json:"api_key,omitempty"` APISecret string `json:"api_secret,omitempty"` Partner string `json:"partner,omitempty"` Organization string `json:"organization,omitempty"` Project string `json:"project,omitempty"` }
func NewDefaultConfig ¶
func NewOpDevConfig ¶
func NewOpDevConfig() *Config
func NewProductionConfig ¶
func NewProductionConfig() *Config
func NewStageConfig ¶
func NewStageConfig() *Config
func (*Config) GetAppAuthProfile ¶
func (c *Config) GetAppAuthProfile() *authprofile.Profile
func (*Config) GetOpsAuthProfile ¶
func (c *Config) GetOpsAuthProfile() *authprofile.Profile
func (*Config) OpenAPIAuthInfo ¶
func (c *Config) OpenAPIAuthInfo() oruntime.ClientAuthInfoWriter
func (*Config) WriteReadable ¶
type ConfigTracker ¶
func GetConfigTracker ¶
func GetConfigTracker() *ConfigTracker
func (*ConfigTracker) Merge ¶
func (c *ConfigTracker) Merge(b *Config, source string, override bool)
Return the merged context *b into the *c. When a field in *c is not defined, it is merged in from *b.
func (*ConfigTracker) Output ¶
func (t *ConfigTracker) Output()
Click to show internal directories.
Click to hide internal directories.