info

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Copyright © 2022 Flagship Team flagship@abtasty.com

Index

Constants

This section is empty.

Variables

View Source
var InfoCmd = &cobra.Command{
	Use:   "info",
	Short: "Show informations related to your Flagship CLI",
	Long:  `Show informations like account environment id, account id and client id your Flagship CLI runs on`,
	Run: func(cmd *cobra.Command, args []string) {

		yellow := color.New(color.FgYellow).SprintFunc()

		fmt.Fprintf(cmd.OutOrStdout(), "%s: %s\n", yellow("Account ID"), viper.GetString("account_id"))
		fmt.Fprintf(cmd.OutOrStdout(), "%s: %s\n", yellow("Account environment ID"), viper.GetString("account_environment_id"))
		fmt.Fprintf(cmd.OutOrStdout(), "%s: %s\n", yellow("Client ID"), viper.GetString("client_id"))
		fmt.Fprintf(cmd.OutOrStdout(), "%s: %d (in second)\n", yellow("Token expiration"), viper.GetInt("expiration"))
		fmt.Fprintf(cmd.OutOrStdout(), "%s: %s\n", yellow("Token scope"), viper.GetString("scope"))
	},
}

InfoCmd represents the info command

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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