Documentation
¶
Index ¶
- Variables
- type BackendComponents
- type CacheComponents
- type Components
- type ConfigValidator
- type DatabaseComponents
- type DevOpsComponents
- type ErrorType
- type FrontendComponents
- type GeneratorError
- type InfrastructureComponents
- type MobileComponents
- type MonitoringComponents
- type NextJSComponents
- type ProjectConfig
- type TemplateFilter
- type TemplateInfo
- type TemplateMetadata
- type TemplateValidationResult
- type TemplateValidationSummary
- type TemplateVar
- type ValidationIssue
- type ValidationResult
- type VersionConfig
- type VersionInfo
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidConfig = errors.New("invalid configuration") ErrTemplateNotFound = errors.New("template not found") ErrFileSystemError = errors.New("file system error") ErrValidationFailed = errors.New("validation failed") )
Predefined error types
Functions ¶
This section is empty.
Types ¶
type BackendComponents ¶
type BackendComponents struct {
// Go Gin backend (documented structure)
GoGin bool `yaml:"go_gin" json:"go_gin"`
}
BackendComponents defines backend application options
type CacheComponents ¶
type CacheComponents struct {
Redis bool `yaml:"redis" json:"redis"`
Memcached bool `yaml:"memcached" json:"memcached"`
}
CacheComponents defines caching options
type Components ¶
type Components struct {
Frontend FrontendComponents `yaml:"frontend" json:"frontend"`
Backend BackendComponents `yaml:"backend" json:"backend"`
Mobile MobileComponents `yaml:"mobile" json:"mobile"`
Infrastructure InfrastructureComponents `yaml:"infrastructure" json:"infrastructure"`
Database DatabaseComponents `yaml:"database" json:"database"`
Cache CacheComponents `yaml:"cache" json:"cache"`
DevOps DevOpsComponents `yaml:"devops" json:"devops"`
Monitoring MonitoringComponents `yaml:"monitoring" json:"monitoring"`
}
Components defines which components to include in the generated project
type ConfigValidator ¶
type ConfigValidator struct {
}
ConfigValidator handles basic configuration validation
func NewConfigValidator ¶
func NewConfigValidator() *ConfigValidator
NewConfigValidator creates a new configuration validator
func (*ConfigValidator) ValidateProjectConfig ¶
func (cv *ConfigValidator) ValidateProjectConfig(config *ProjectConfig) *ValidationResult
ValidateProjectConfig validates a project configuration
type DatabaseComponents ¶
type DatabaseComponents struct {
PostgreSQL bool `yaml:"postgresql" json:"postgresql"`
MySQL bool `yaml:"mysql" json:"mysql"`
MongoDB bool `yaml:"mongodb" json:"mongodb"`
SQLite bool `yaml:"sqlite" json:"sqlite"`
}
DatabaseComponents defines database options
type DevOpsComponents ¶
type DevOpsComponents struct {
CICD bool `yaml:"cicd" json:"cicd"`
GitHubActions bool `yaml:"github_actions" json:"github_actions"`
GitLabCI bool `yaml:"gitlab_ci" json:"gitlab_ci"`
Jenkins bool `yaml:"jenkins" json:"jenkins"`
}
DevOpsComponents defines DevOps and automation options
type FrontendComponents ¶
type FrontendComponents struct {
// NextJS components (documented structure)
NextJS NextJSComponents `yaml:"nextjs" json:"nextjs"`
}
FrontendComponents defines frontend application options
type GeneratorError ¶
type GeneratorError struct {
Type ErrorType `json:"type"`
Message string `json:"message"`
Cause error `json:"cause,omitempty"`
}
GeneratorError represents a custom error type for the generator
func NewGeneratorError ¶
func NewGeneratorError(errorType ErrorType, message string, cause error) *GeneratorError
NewGeneratorError creates a new GeneratorError
func (*GeneratorError) Error ¶
func (e *GeneratorError) Error() string
Error implements the error interface
func (*GeneratorError) Unwrap ¶
func (e *GeneratorError) Unwrap() error
Unwrap returns the underlying error
type InfrastructureComponents ¶
type InfrastructureComponents struct {
Docker bool `yaml:"docker" json:"docker"`
Kubernetes bool `yaml:"kubernetes" json:"kubernetes"`
Terraform bool `yaml:"terraform" json:"terraform"`
}
InfrastructureComponents defines infrastructure options
type MobileComponents ¶
type MobileComponents struct {
Android bool `yaml:"android" json:"android"`
IOS bool `yaml:"ios" json:"ios"`
}
MobileComponents defines mobile application options
type MonitoringComponents ¶
type MonitoringComponents struct {
Prometheus bool `yaml:"prometheus" json:"prometheus"`
Grafana bool `yaml:"grafana" json:"grafana"`
Jaeger bool `yaml:"jaeger" json:"jaeger"`
ELK bool `yaml:"elk" json:"elk"`
}
MonitoringComponents defines monitoring and observability options
type NextJSComponents ¶
type NextJSComponents struct {
App bool `yaml:"app" json:"app"`
Home bool `yaml:"home" json:"home"`
Admin bool `yaml:"admin" json:"admin"`
}
NextJSComponents defines Next.js specific options
type ProjectConfig ¶
type ProjectConfig struct {
// Basic project information
Name string `yaml:"name" json:"name"`
Organization string `yaml:"organization" json:"organization"`
Description string `yaml:"description" json:"description"`
License string `yaml:"license" json:"license"`
Author string `yaml:"author" json:"author"`
Email string `yaml:"email" json:"email"`
Repository string `yaml:"repository" json:"repository"`
// Component selection
Components Components `yaml:"components" json:"components"`
// Version configuration
Versions *VersionConfig `yaml:"versions" json:"versions"`
// Output configuration
OutputPath string `yaml:"output_path" json:"output_path"`
// Features list for testing
Features []string `yaml:"features" json:"features"`
// Template-specific fields (populated during processing)
AndroidPackageOrg string `yaml:"-" json:"-"` // Lowercase organization for Android packages
AndroidPackageName string `yaml:"-" json:"-"` // Lowercase name for Android packages
// Generation metadata
GeneratedAt time.Time `yaml:"generated_at" json:"generated_at"`
GeneratorVersion string `yaml:"generator_version" json:"generator_version"`
}
ProjectConfig represents the basic project configuration
type TemplateFilter ¶
type TemplateFilter struct {
Category string `json:"category,omitempty"`
Technology string `json:"technology,omitempty"`
Tags []string `json:"tags,omitempty"`
MinVersion string `json:"min_version,omitempty"`
MaxVersion string `json:"max_version,omitempty"`
Source string `json:"source,omitempty"`
Keywords []string `json:"keywords,omitempty"`
Author string `json:"author,omitempty"`
}
TemplateFilter defines filtering options for template listing
type TemplateInfo ¶
type TemplateInfo struct {
Name string `json:"name"`
DisplayName string `json:"display_name"`
Description string `json:"description"`
Category string `json:"category"`
Technology string `json:"technology"`
Version string `json:"version"`
Tags []string `json:"tags"`
Dependencies []string `json:"dependencies"`
Metadata TemplateMetadata `json:"metadata"`
Path string `json:"path"`
Source string `json:"source"` // embedded, file, git, etc.
Size int64 `json:"size"`
FileCount int `json:"file_count"`
LastModified time.Time `json:"last_modified"`
}
TemplateInfo represents complete information about a template
type TemplateMetadata ¶
type TemplateMetadata struct {
Name string `yaml:"name" json:"name"`
DisplayName string `yaml:"display_name" json:"display_name"`
Description string `yaml:"description" json:"description"`
Version string `yaml:"version" json:"version"`
Author string `yaml:"author" json:"author"`
License string `yaml:"license" json:"license"`
Category string `yaml:"category" json:"category"`
Technology string `yaml:"technology" json:"technology"`
Tags []string `yaml:"tags" json:"tags"`
Dependencies []string `yaml:"dependencies" json:"dependencies"`
Variables map[string]TemplateVar `yaml:"variables" json:"variables"`
CreatedAt time.Time `yaml:"created_at" json:"created_at"`
UpdatedAt time.Time `yaml:"updated_at" json:"updated_at"`
Homepage string `yaml:"homepage" json:"homepage"`
Repository string `yaml:"repository" json:"repository"`
Keywords []string `yaml:"keywords" json:"keywords"`
MinVersion string `yaml:"min_version" json:"min_version"`
MaxVersion string `yaml:"max_version" json:"max_version"`
}
TemplateMetadata represents comprehensive metadata for a template
type TemplateValidationResult ¶
type TemplateValidationResult struct {
TemplateName string `json:"template_name"`
Valid bool `json:"valid"`
Issues []ValidationIssue `json:"issues"`
Warnings []ValidationIssue `json:"warnings"`
Summary TemplateValidationSummary `json:"summary"`
}
TemplateValidationResult contains the result of template validation
type TemplateValidationSummary ¶
type TemplateValidationSummary struct {
TotalIssues int `json:"total_issues"`
ErrorCount int `json:"error_count"`
WarningCount int `json:"warning_count"`
InfoCount int `json:"info_count"`
FixableCount int `json:"fixable_count"`
}
TemplateValidationSummary provides a summary of template validation results
type TemplateVar ¶
type TemplateVar struct {
Name string `yaml:"name" json:"name"`
Type string `yaml:"type" json:"type"`
Default interface{} `yaml:"default" json:"default"`
Description string `yaml:"description" json:"description"`
Required bool `yaml:"required" json:"required"`
Pattern string `yaml:"pattern" json:"pattern"`
Enum []string `yaml:"enum" json:"enum"`
MinLength int `yaml:"min_length" json:"min_length"`
MaxLength int `yaml:"max_length" json:"max_length"`
}
TemplateVar represents a template variable definition with validation
type ValidationIssue ¶
type ValidationIssue struct {
Type string `json:"type"`
Severity string `json:"severity"`
Message string `json:"message"`
File string `json:"file,omitempty"`
Line int `json:"line,omitempty"`
Column int `json:"column,omitempty"`
Rule string `json:"rule"`
Fixable bool `json:"fixable"`
Metadata map[string]string `json:"metadata,omitempty"`
}
ValidationIssue represents a single validation issue
type ValidationResult ¶
type ValidationResult struct {
Valid bool `json:"valid"`
Issues []ValidationIssue `json:"issues"`
Summary string `json:"summary"`
}
ValidationResult represents the result of a validation operation
type VersionConfig ¶
type VersionConfig struct {
// Language versions
Node string `yaml:"node" json:"node"`
Go string `yaml:"go" json:"go"`
// Package versions
Packages map[string]string `yaml:"packages" json:"packages"`
}
VersionConfig represents the version configuration for a project
type VersionInfo ¶
type VersionInfo struct {
// Package identification
Name string `yaml:"name" json:"name"`
Language string `yaml:"language" json:"language"`
Type string `yaml:"type" json:"type"`
// Version tracking
LatestVersion string `yaml:"latest_version" json:"latest_version"`
// Update metadata
UpdatedAt time.Time `yaml:"updated_at" json:"updated_at"`
CheckedAt time.Time `yaml:"checked_at" json:"checked_at"`
UpdateSource string `yaml:"update_source" json:"update_source"`
// Registry information
RegistryURL string `yaml:"registry_url,omitempty" json:"registry_url,omitempty"`
Metadata map[string]string `yaml:"metadata,omitempty" json:"metadata,omitempty"`
}
VersionInfo represents basic version information for a package or language