Documentation
¶
Index ¶
- Constants
- func FirstNonEmpty(values ...string) string
- func GenerateSampleConfig() error
- func GetSampleConfigTemplate() string
- func HandleConfigSetup(cmd *cobra.Command, reader *bufio.Reader) error
- func PromptAppConfig(reader *bufio.Reader, cfg *NextDeployConfig) error
- func PromptRepositoryConfig(reader *bufio.Reader, cfg *NextDeployConfig) error
- func PromptYesNo(reader *bufio.Reader, question string) bool
- func ReadRequiredInput(reader *bufio.Reader) (string, error)
- func Save(cfg *NextDeployConfig, path string) error
- func SaveConfig(path string, cfg *NextDeployConfig) error
- func WriteConfig(filename string, cfg *NextDeployConfig) error
- type Alert
- type AppConfig
- type Backup
- type CloudProviderStruct
- type Database
- type DockerBuild
- type DockerConfig
- type DopplerConfig
- type EnvVariable
- type Logging
- type Monitoring
- type NextDeployConfig
- type Repository
- type SSL
- type SSLConfig
- type SafeConfig
- type SecretFile
- type SecretsConfig
- type ServerConfig
- type ServerlessConfig
- type Storage
- type VaultConfig
- type WebServer
- type WebhookConfig
Constants ¶
View Source
const ( EmojiSuccess = "✅" EmojiWarning = "⚠️" EmojiInfo = "ℹ️" EmojiInput = "🖊️" EmojiQuestion = "❓" EmojiImportant = "🔑" EmojiNetwork = "🌐" EmojiContainer = "🐳" EmojiDatabase = "💾" EmojiServer = "🖥️" EmojiDeployment = "🚀" EmojiError = "❌" EmojiSummary = "📋" EmojiConfig = "📂" EmojiApp = "📱" EmojiEnvironment = "🌍" EmojiSecrets = "🔐" EmojiDomain = "🌐" EmojiPort = "🔌" EmojiVersion = "📅" EmojiBuild = "🔨" EmojiLogs = "📜" EmojiFeedback = "💬" EmojiHelp = "❗" EmojiWelcome = "👋" EmojiNextDeploy = "🚀 NextDeploy" EmojiSummaryLine = "═" EmojiSummaryHeader = "🎉 Configuration Summary" EmojiPrompt = "👉" EmojiPromptYes = "👍" EmojiPromptNo = "👎" EmojiPromptInput = "✏️" EmojiPromptSelect = "🔘" EmojiPromptMultiSelect = "📋" EmojiPromptPassword = "🔑" EmojiPromptConfirm = "✔️" )
View Source
const ( ConfigPath = "nextdeploy.yml" ConfigFile = "nextdeploy.yml" SampleConfigFile = "sample.nextdeploy.yml" )
Variables ¶
This section is empty.
Functions ¶
func FirstNonEmpty ¶
func GenerateSampleConfig ¶
func GenerateSampleConfig() error
func GetSampleConfigTemplate ¶ added in v0.1.36
func GetSampleConfigTemplate() string
func PromptAppConfig ¶
func PromptAppConfig(reader *bufio.Reader, cfg *NextDeployConfig) error
func PromptRepositoryConfig ¶
func PromptRepositoryConfig(reader *bufio.Reader, cfg *NextDeployConfig) error
func Save ¶
func Save(cfg *NextDeployConfig, path string) error
func SaveConfig ¶
func SaveConfig(path string, cfg *NextDeployConfig) error
func WriteConfig ¶
func WriteConfig(filename string, cfg *NextDeployConfig) error
Types ¶
type CloudProviderStruct ¶
type Database ¶
type DockerBuild ¶
type DockerConfig ¶
type DockerConfig struct {
Image string `yaml:"image"`
Registry string `yaml:"registry,omitempty"`
RegistryRegion string `yaml:"registryregion,omitempty"`
Build DockerBuild `yaml:"build"`
Push bool `yaml:"push"`
Username string `yaml:"username,omitempty"`
// #nosec G117
Password string `yaml:"password,omitempty"`
AlwaysPull bool `yaml:"alwaysPull,omitempty"`
Strategy string `yaml:"strategy,omitempty"`
AutoPush bool `yaml:"autoPush,omitempty"`
Platform string `yaml:"platform,omitempty"`
NoCache bool `yaml:"noCache,omitempty"`
BuildContext string `yaml:"buildContext,omitempty"`
Target string `yaml:"target,omitempty"`
}
type DopplerConfig ¶
type EnvVariable ¶
type Monitoring ¶
type Monitoring struct {
Enabled bool `yaml:"enabled"`
Type string `yaml:"type"`
Endpoint string `yaml:"endpoint"`
CPUThreshold int `yaml:"cpu_threshold,omitempty"`
MemoryThreshold int `yaml:"memory_threshold,omitempty"`
DiskThreshold int `yaml:"disk_threshold,omitempty"`
Alert *Alert `yaml:"alert,omitempty"`
}
func PromptMonitoringConfig ¶
func PromptMonitoringConfig(reader *bufio.Reader) (Monitoring, error)
type NextDeployConfig ¶
type NextDeployConfig struct {
Version string `yaml:"version"`
TargetType string `yaml:"target_type"` // e.g., "vps", "serverless"
App AppConfig `yaml:"app"`
Repository Repository `yaml:"repository"`
Docker *DockerConfig `yaml:"docker,omitempty"`
Serverless *ServerlessConfig `yaml:"serverless,omitempty"`
Database *Database `yaml:"database,omitempty"`
Monitoring *Monitoring `yaml:"monitoring,omitempty"`
Secrets SecretsConfig `yaml:"secrets"`
Logging Logging `yaml:"logging,omitempty"`
Backup *Backup `yaml:"backup,omitempty"`
SSL *SSL `yaml:"ssl,omitempty"`
Webhook *WebhookConfig `yaml:"webhook,omitempty"`
Environment []EnvVariable `yaml:"environment,omitempty"`
Servers []ServerConfig `yaml:"servers,omitempty"`
SSLConfig *SSLConfig `yaml:"ssl_config,omitempty"`
CloudProvider *CloudProviderStruct `yaml:"CloudProvider,omitempty"`
}
func Load ¶
func Load() (*NextDeployConfig, error)
func LoadConfig ¶
func LoadConfig() (*NextDeployConfig, error)
func PromptForConfig ¶
func PromptForConfig(reader *bufio.Reader) (*NextDeployConfig, error)
func PromptForConfigs ¶
func PromptForConfigs(reader *bufio.Reader) (*NextDeployConfig, error)
type Repository ¶
type SSL ¶
type SSL struct {
Enabled bool `yaml:"enabled"`
Provider string `yaml:"provider"`
Domains []string `yaml:"domains"`
Email string `yaml:"email"`
Wildcard bool `yaml:"wildcard"`
DNSProvider string `yaml:"dns_provider"`
Staging bool `yaml:"staging"`
Force bool `yaml:"force"`
AutoRenew bool `yaml:"auto_renew"`
Domain string `yaml:"domain,omitempty"`
}
type SSLConfig ¶
type SSLConfig struct {
Domain string `yaml:"domain"`
Email string `yaml:"email"`
Staging bool `yaml:"staging"`
Wildcard bool `yaml:"wildcard"`
DNSProvider string `yaml:"dns_provider"`
Force bool `yaml:"force"`
SSL struct {
Enabled bool `yaml:"enabled"`
Provider string `yaml:"provider"`
Email string `yaml:"email"`
AutoRenew bool `yaml:"auto_renew"`
} `yaml:"ssl"`
}
type SafeConfig ¶
type SecretFile ¶
type SecretsConfig ¶
type SecretsConfig struct {
Provider string `yaml:"provider"`
Doppler *DopplerConfig `yaml:"doppler,omitempty"`
Vault *VaultConfig `yaml:"vault,omitempty"`
Files []SecretFile `yaml:"files,omitempty"`
Project string `yaml:"project,omitempty"`
Config string `yaml:"config,omitempty"`
// contains filtered or unexported fields
}
type ServerConfig ¶
type ServerConfig struct {
WebServer *WebServer `yaml:"web_server,omitempty"`
Name string `yaml:"name"`
Host string `yaml:"host"`
Port int `yaml:"port"`
Username string `yaml:"username"`
// #nosec G117
Password string `yaml:"password"`
KeyPath string `yaml:"key_path"`
SSHKey string `yaml:"ssh_key,omitempty"`
KeyPassphrase string `yaml:"key_passphrase,omitempty"`
}
type ServerlessConfig ¶
type VaultConfig ¶
type WebhookConfig ¶ added in v0.1.36
Click to show internal directories.
Click to hide internal directories.