Documentation
¶
Index ¶
- func EnsureDirectoryExists(dir string) error
- func SuggestAvailablePort(startPort int) (int, error)
- func SuggestServiceName(name string) string
- func ValidateOutputDir(dir string) error
- func ValidatePath(path string) error
- func ValidatePort(port int) error
- func ValidateServiceName(name string) error
- type ConfigError
- type ConfigValidationResult
- type ConfigWarning
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureDirectoryExists ¶
EnsureDirectoryExists ensures a directory exists, creating it if necessary
func SuggestAvailablePort ¶
SuggestAvailablePort suggests an available port starting from the given port
func SuggestServiceName ¶
SuggestServiceName suggests a valid service name from an invalid one
func ValidateOutputDir ¶
ValidateOutputDir validates an output directory Creates it if it doesn't exist
func ValidatePath ¶
ValidatePath validates a file/directory path Checks if path is absolute and writable
func ValidatePort ¶
ValidatePort validates a port number Must be between 1024-65535 and not currently in use
func ValidateServiceName ¶
ValidateServiceName validates service name against go-zero requirements Service names must be valid Go identifiers: start with letter, no hyphens
Types ¶
type ConfigError ¶
ConfigError represents a configuration error
type ConfigValidationResult ¶
type ConfigValidationResult struct {
Valid bool
Errors []ConfigError
Warnings []ConfigWarning
}
ConfigValidationResult contains validation results for a config file
func ValidateAPIConfig ¶
func ValidateAPIConfig(config map[string]interface{}) *ConfigValidationResult
ValidateAPIConfig validates go-zero API service configuration
func ValidateRPCConfig ¶
func ValidateRPCConfig(config map[string]interface{}) *ConfigValidationResult
ValidateRPCConfig validates go-zero RPC service configuration
type ConfigWarning ¶
ConfigWarning represents a configuration warning