config

package
v6.7.3 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var FieldsWithSensitiveDataInConfigFile = []string{
	constants.CfgUsername, constants.CfgPassword, constants.CfgToken,
}

Functions

func GetConfigFilePath

func GetConfigFilePath() string

GetConfigFilePath sanitizes the --config flag input and returns the path to the config file. If none set, it returns the default config path.

func GetServerUrl

func GetServerUrl() string

GetServerUrl returns the server URL the SDK should use, with support for layered fallbacks.

func GetServerUrlOrApiIonos

func GetServerUrlOrApiIonos() string

GetServerUrlOrApiIonos calls GetServerUrl and returns https://api.ionos.com if empty

It is a useful func for informing the user of the behaviour of the SDKs - For the SDKs if the server URL is empty, they will default to https://api.ionos.com

func Read

func Read() (map[string]string, error)

Read reads the config file and returns its data as a map

func Write

func Write(data map[string]string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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