flyctl

package
v0.0.136-beta-3 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigAPIToken        = "access_token"
	ConfigAPIBaseURL      = "api_base_url"
	ConfigAppName         = "app"
	ConfigVerboseOutput   = "verbose"
	ConfigJSONOutput      = "json"
	ConfigGQLErrorLogging = "gqlerrorlogging"

	ConfigRegistryHost             = "registry_host"
	ConfigUpdateCheckLatestVersion = "update_check.latest_version"
	ConfigUpdateCheckTimestamp     = "update_check.timestamp"
	ConfigUpdateCheckOptOut        = "update_check.out_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

func CheckForUpdate()

CheckForUpdate - Test for available updates and emit a message if one is available

func ConfigDir

func ConfigDir() string

ConfigDir - Returns Directory holding the Config file

func ConfigFileExistsAtPath

func ConfigFileExistsAtPath(p string) (bool, error)

func InitConfig

func InitConfig()

InitConfig - Initialises config file for Viper

func ResolveConfigFileFromPath

func ResolveConfigFileFromPath(p string) (string, error)

func SaveConfig

func SaveConfig() error

Types

type AppConfig

type AppConfig struct {
	AppName string
	Build   *Build

	Definition map[string]interface{}
}

func LoadAppConfig

func LoadAppConfig(configFile string) (*AppConfig, error)

func NewAppConfig

func NewAppConfig() *AppConfig

func (*AppConfig) HasBuilder added in v0.0.93

func (ac *AppConfig) HasBuilder() bool

func (*AppConfig) HasDefinition

func (ac *AppConfig) HasDefinition() bool

func (*AppConfig) SetInternalPort added in v0.0.94

func (ac *AppConfig) SetInternalPort(port int) bool

func (*AppConfig) WriteTo

func (ac *AppConfig) WriteTo(w io.Writer, format ConfigFormat) error

func (*AppConfig) WriteToFile

func (ac *AppConfig) WriteToFile(filename string) error

type Build

type Build struct {
	Builder    string
	Args       map[string]string
	Buildpacks []string
}

type Config

type Config interface {
	GetString(key string) (string, error)
	GetBool(key string) bool
	GetStringSlice(key string) []string
	GetInt(key string) int
	IsSet(key string) bool
}
var FlyConfig Config = ConfigNS(NSRoot)

func ConfigNS

func ConfigNS(ns string) Config

type ConfigFormat

type ConfigFormat string
const (
	TOMLFormat        ConfigFormat = ".toml"
	UnsupportedFormat              = ""
)

func ConfigFormatFromPath

func ConfigFormatFromPath(p string) ConfigFormat

Jump to

Keyboard shortcuts

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