Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetQuickStartGuide ¶
GetQuickStartGuide returns a quick start guide for a template
func GetTemplateNames ¶
func GetTemplateNames() []string
GetTemplateNames returns a list of all template names
func GetTemplatePreview ¶
GetTemplatePreview returns a formatted preview of a template configuration
func GetTemplatesByCategory ¶
func GetTemplatesByCategory() map[string][]SiteTemplate
GetTemplatesByCategory returns templates grouped by category
func ValidateTemplateConfig ¶
func ValidateTemplateConfig(config *SiteConfig) []string
ValidateTemplateConfig validates a template configuration
Types ¶
type SiteConfig ¶
type SiteConfig struct {
// Template Selection
SelectedTemplate string
// Basic Configuration
ServerName string
Port string
RootPath string
IndexFiles string
// SSL Configuration
EnableSSL bool
SSLCertPath string
SSLKeyPath string
ForceHTTPS bool
// Proxy Configuration
IsProxy bool
ProxyPass string
ProxyHeaders bool
// Advanced Options
EnableGzip bool
ClientMaxBodySize string
AccessLog string
ErrorLog string
// PHP Configuration
EnablePHP bool
PHPSocket string
// Custom Directives
CustomConfig string
// Confirmation
Confirmed bool
}
SiteConfig holds all configuration for a new NGINX site
func NewAddSiteForm ¶
func NewAddSiteForm() (*huh.Form, *SiteConfig)
NewAddSiteForm creates a new form for adding an NGINX site
func (*SiteConfig) GenerateNginxConfig ¶
func (c *SiteConfig) GenerateNginxConfig() string
GenerateNginxConfig generates NGINX configuration from SiteConfig
func (*SiteConfig) GetFileName ¶
func (c *SiteConfig) GetFileName() string
GetFileName returns the suggested filename for the site configuration
type SiteTemplate ¶
type SiteTemplate struct {
Name string
Description string
UseCase string
Config SiteConfig
}
SiteTemplate represents a predefined site configuration template
func GetSiteTemplates ¶
func GetSiteTemplates() []SiteTemplate
GetSiteTemplates returns all available site templates
func GetTemplateByName ¶
func GetTemplateByName(name string) *SiteTemplate
GetTemplateByName returns a template by its name
func GetTemplateRecommendation ¶
func GetTemplateRecommendation(keywords ...string) *SiteTemplate
GetTemplateRecommendation returns a recommended template based on keywords