Documentation ¶
Index ¶
- Constants
- Variables
- func CheckForUpdate(noskip bool, silent bool) string
- func ConfigDir() string
- func ConfigFileExistsAtPath(p string) (bool, error)
- func GetAPIToken() string
- func InitConfig()
- func ResolveConfigFileFromPath(p string) (string, error)
- func SaveConfig() error
- type AppConfig
- func (ac *AppConfig) GetInternalPort() (int, error)
- func (ac *AppConfig) HasBuilder() bool
- func (ac *AppConfig) HasBuiltin() bool
- func (ac *AppConfig) HasDefinition() bool
- func (ac *AppConfig) HasServices() bool
- func (ac *AppConfig) SetInternalPort(port int) bool
- func (ac *AppConfig) WriteTo(w io.Writer, format ConfigFormat) error
- func (ac *AppConfig) WriteToFile(filename string) error
- type Build
- type Config
- type ConfigFormat
Constants ¶
View Source
const ( ConfigAPIToken = "access_token" ConfigAPIBaseURL = "api_base_url" ConfigAppName = "app" ConfigVerboseOutput = "verbose" ConfigJSONOutput = "json" ConfigBuiltinsfile = "builtins_file" ConfigGQLErrorLogging = "gqlerrorlogging" ConfigInstaller = "installer" ConfigRegistryHost = "registry_host" ConfigUpdateCheck = "update_check" ConfigUpdateCheckLatestVersion = ConfigUpdateCheck + ".latest_version" ConfigUpdateCheckTimestamp = ConfigUpdateCheck + ".timestamp" ConfigUpdateCheckOptOut = ConfigUpdateCheck + ".opt_out" )
View Source
const NSRoot = "flyctl"
Variables ¶
View Source
var BackgroundTaskWG = &sync.WaitGroup{}
View Source
var BuildDate = time.Now().String()
View Source
var Commit = "<commit>"
View Source
var Environment = "development"
View Source
var Version = "<version>"
Functions ¶
func CheckForUpdate ¶
CheckForUpdate - Test for available updates and emit a message if one is available
func ConfigFileExistsAtPath ¶
func GetAPIToken ¶ added in v0.0.144
func GetAPIToken() string
GetAPIToken - returns the current API Token, env vars take precedence. Avoids pulling in env vars into the config.
func SaveConfig ¶
func SaveConfig() error
Types ¶
type AppConfig ¶
func LoadAppConfig ¶
func NewAppConfig ¶
func NewAppConfig() *AppConfig
func (*AppConfig) GetInternalPort ¶ added in v0.0.138
func (*AppConfig) HasBuilder ¶ added in v0.0.93
func (*AppConfig) HasBuiltin ¶ added in v0.0.138
func (*AppConfig) HasDefinition ¶
func (*AppConfig) HasServices ¶ added in v0.0.156
HasServices - Does this config have a services section
func (*AppConfig) SetInternalPort ¶ added in v0.0.94
func (*AppConfig) WriteToFile ¶
type Config ¶
type ConfigFormat ¶
type ConfigFormat string
const ( TOMLFormat ConfigFormat = ".toml" UnsupportedFormat = "" )
func ConfigFormatFromPath ¶
func ConfigFormatFromPath(p string) ConfigFormat
Click to show internal directories.
Click to hide internal directories.