Help us shape the future of Go! Take the 2026 Go Developer Survey

flyctl

package
v0.0.511 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigAPIToken        = "access_token"
	ConfigAPIBaseURL      = "api_base_url"
	ConfigFlapsBaseUrl    = "flaps_base_url"
	ConfigAppName         = "app"
	ConfigVerboseOutput   = "verbose"
	ConfigJSONOutput      = "json"
	ConfigBuiltinsfile    = "builtins_file"
	ConfigGQLErrorLogging = "gqlerrorlogging"
	ConfigInstaller       = "installer"
	BuildKitNodeID        = "buildkit_node_id"

	ConfigWireGuardState      = "wire_guard_state"
	ConfigWireGuardWebsockets = "wire_guard_websockets"

	ConfigRegistryHost = "registry_host"
)
View Source
const NSRoot = "flyctl"

Variables

This section is empty.

Functions

func ConfigDir

func ConfigDir() string

ConfigDir - Returns Directory holding the Config file

func ConfigFileExistsAtPath

func ConfigFileExistsAtPath(p string) (bool, error)

func ConfigFilePath added in v0.0.233

func ConfigFilePath() string

ConfigFilePath - returns the path to the config file

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 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) DockerBuildTarget added in v0.0.253

func (ac *AppConfig) DockerBuildTarget() string

func (*AppConfig) Dockerfile added in v0.0.249

func (ac *AppConfig) Dockerfile() string

func (*AppConfig) GetEnvVariables added in v0.0.335

func (ac *AppConfig) GetEnvVariables() map[string]string

func (*AppConfig) GetInternalPort added in v0.0.138

func (ac *AppConfig) GetInternalPort() (int, error)

func (*AppConfig) HasBuilder added in v0.0.93

func (ac *AppConfig) HasBuilder() bool

func (*AppConfig) HasBuiltin added in v0.0.138

func (ac *AppConfig) HasBuiltin() bool

func (*AppConfig) HasDefinition

func (ac *AppConfig) HasDefinition() bool

func (*AppConfig) HasServices added in v0.0.156

func (ac *AppConfig) HasServices() bool

HasServices - Does this config have a services section

func (*AppConfig) Ignorefile added in v0.0.433

func (ac *AppConfig) Ignorefile() string

func (*AppConfig) Image added in v0.0.201

func (ac *AppConfig) Image() string

func (*AppConfig) SetBuildSecrets added in v0.0.333

func (ac *AppConfig) SetBuildSecrets(vals map[string]string)

func (*AppConfig) SetDockerCommand added in v0.0.254

func (ac *AppConfig) SetDockerCommand(cmd string)

func (*AppConfig) SetDockerEntrypoint added in v0.0.254

func (ac *AppConfig) SetDockerEntrypoint(entrypoint string)

func (*AppConfig) SetEnvVariable added in v0.0.178

func (ac *AppConfig) SetEnvVariable(name, value string)

func (*AppConfig) SetEnvVariables added in v0.0.191

func (ac *AppConfig) SetEnvVariables(vals map[string]string)

func (*AppConfig) SetInternalPort added in v0.0.94

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

func (*AppConfig) SetKillSignal added in v0.0.269

func (ac *AppConfig) SetKillSignal(signal string)

func (*AppConfig) SetProcess added in v0.0.243

func (ac *AppConfig) SetProcess(name, value string)

func (*AppConfig) SetReleaseCommand added in v0.0.254

func (ac *AppConfig) SetReleaseCommand(cmd string)

func (*AppConfig) SetStatics added in v0.0.241

func (ac *AppConfig) SetStatics(statics []scanner.Static)

func (*AppConfig) SetVolumes added in v0.0.254

func (ac *AppConfig) SetVolumes(volumes []scanner.Volume)

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
	// Or...
	Builtin  string
	Settings map[string]interface{}
	// Or...
	Image string
	// Or...
	Dockerfile        string
	Ignorefile        string
	DockerBuildTarget string
}

type Config

type Config interface {
	GetString(key string) string
	GetBool(key string) bool
	GetStringSlice(key string) []string
	GetInt(key string) int
	IsSet(key string) bool
	Set(key string, value interface{})
}
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