config

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: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OutputFormat         = "table"
	GrantType            = "client_credentials"
	Expiration           = 86400
	Scope                = "*"
	ClientID             = "clientID"
	ClientSecret         = "clientSecret"
	Token                = "token"
	AccountID            = "accountID"
	AccountEnvironmentID = "accountEnvironmentID"
)

Variables

View Source
var DefaultUserAgent = "flagship-cli/" + version.Version

Functions

func CheckFlagshipHomeDirectory added in v1.0.2

func CheckFlagshipHomeDirectory() string

func CreateConfigurationFile added in v1.0.1

func CreateConfigurationFile(configurationName, clientId, clientSecret, accountId, accountEnvId string)

func EditConfigurationFile added in v1.0.1

func EditConfigurationFile(configurationName, newName, clientId, clientSecret, accountId, accountEnvId string)

func GetConfigurationsName added in v1.0.1

func GetConfigurationsName() ([]string, error)

func ReadConfiguration added in v1.0.2

func ReadConfiguration(configurationName string)

func ReadCredentialsFromFile added in v1.0.1

func ReadCredentialsFromFile(configurationFile string)

func SelectConfiguration added in v1.0.1

func SelectConfiguration(configurationName string)

func SetOptionalsDefault

func SetOptionalsDefault(grantType, scope string, expiration int)

func SetPathForConfigName added in v1.0.1

func SetPathForConfigName(fileName string) string

func SetViperMock added in v0.7.1

func SetViperMock()

func Unset added in v1.0.1

func Unset(key string) error

func WriteToken

func WriteToken(configurationName, token string)

Types

type Config

type Config struct {
	*viper.Viper
}

Jump to

Keyboard shortcuts

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