Documentation
¶
Index ¶
- Constants
- Variables
- func Confirm(message string) bool
- func GetAllCommands() []*cli.Command
- func GetEnvironment() string
- func GetProjectName() string
- func GetProjectRoot() string
- func GraphQLCommands() []*cli.Command
- func IsDevelopment() bool
- func IsProduction() bool
- func IsStaging() bool
- func IsTesting() bool
- func PrintError(message string)
- func PrintInfo(message string)
- func PrintSuccess(message string)
- func PrintTable(headers []string, rows [][]string)
- func PrintWarning(message string)
- func RegisterCommand(cmd *cli.Command)
- type App
- type AuthCommands
- func (ac *AuthCommands) AssignPermission(ctx *cli.Context) error
- func (ac *AuthCommands) AssignRole(ctx *cli.Context) error
- func (ac *AuthCommands) CreateSuperUser(ctx *cli.Context) error
- func (ac *AuthCommands) ListPermissions(ctx *cli.Context) error
- func (ac *AuthCommands) ListRoles(ctx *cli.Context) error
- func (ac *AuthCommands) ListUsers(ctx *cli.Context) error
- func (ac *AuthCommands) MakeAuth(ctx *cli.Context) error
- func (ac *AuthCommands) MakePermission(ctx *cli.Context) error
- func (ac *AuthCommands) MakeRole(ctx *cli.Context) error
- func (ac *AuthCommands) Register()
- func (ac *AuthCommands) RevokePermission(ctx *cli.Context) error
- func (ac *AuthCommands) RevokeRole(ctx *cli.Context) error
- type CLIError
- type CPUUsage
- type CommandBuilder
- func (cb *CommandBuilder) Action(action cli.ActionFunc) *CommandBuilder
- func (cb *CommandBuilder) BoolFlag(name, usage string) *CommandBuilder
- func (cb *CommandBuilder) Build() *cli.Command
- func (cb *CommandBuilder) Category(category string) *CommandBuilder
- func (cb *CommandBuilder) Description(description string) *CommandBuilder
- func (cb *CommandBuilder) Flag(flag cli.Flag) *CommandBuilder
- func (cb *CommandBuilder) IntFlag(name string, value int, usage string) *CommandBuilder
- func (cb *CommandBuilder) Register() *CommandBuilder
- func (cb *CommandBuilder) StringFlag(name, value, usage string) *CommandBuilder
- func (cb *CommandBuilder) StringSliceFlag(name, usage string) *CommandBuilder
- type CommandContext
- func (cc *CommandContext) Confirm(message string) bool
- func (cc *CommandContext) CreateDirectory(path string) error
- func (cc *CommandContext) DirectoryExists(path string) bool
- func (cc *CommandContext) FileExists(path string) bool
- func (cc *CommandContext) GetBoolFlag(name string) bool
- func (cc *CommandContext) GetIntFlag(name string) int
- func (cc *CommandContext) GetStringArg(index int) string
- func (cc *CommandContext) GetStringFlag(name string) string
- func (cc *CommandContext) PrintError(message string)
- func (cc *CommandContext) PrintInfo(message string)
- func (cc *CommandContext) PrintSuccess(message string)
- func (cc *CommandContext) PrintTable(headers []string, rows [][]string)
- func (cc *CommandContext) PrintWarning(message string)
- func (cc *CommandContext) ReadFile(path string) (string, error)
- func (cc *CommandContext) WriteFile(path string, content interface{}) error
- type CommandRegistry
- type Config
- type DatabaseCommands
- func (dc *DatabaseCommands) DatabaseBackup(ctx *cli.Context) error
- func (dc *DatabaseCommands) DatabaseRestore(ctx *cli.Context) error
- func (dc *DatabaseCommands) DatabaseSeed(ctx *cli.Context) error
- func (dc *DatabaseCommands) DatabaseTest(ctx *cli.Context) error
- func (dc *DatabaseCommands) DatabaseWipe(ctx *cli.Context) error
- func (dc *DatabaseCommands) MakeMigration(ctx *cli.Context) error
- func (dc *DatabaseCommands) MakeSeeder(ctx *cli.Context) error
- func (dc *DatabaseCommands) Migrate(ctx *cli.Context) error
- func (dc *DatabaseCommands) MigrateFresh(ctx *cli.Context) error
- func (dc *DatabaseCommands) MigrateRefresh(ctx *cli.Context) error
- func (dc *DatabaseCommands) MigrateReset(ctx *cli.Context) error
- func (dc *DatabaseCommands) MigrateRollback(ctx *cli.Context) error
- func (dc *DatabaseCommands) MigrateStatus(ctx *cli.Context) error
- func (dc *DatabaseCommands) Register()
- type DatabaseValidator
- type DevelopmentCommands
- func (dc *DevelopmentCommands) ConfigCache(ctx *cli.Context) error
- func (dc *DevelopmentCommands) ConfigClear(ctx *cli.Context) error
- func (dc *DevelopmentCommands) ConfigShow(ctx *cli.Context) error
- func (dc *DevelopmentCommands) EnvGet(ctx *cli.Context) error
- func (dc *DevelopmentCommands) EnvSet(ctx *cli.Context) error
- func (dc *DevelopmentCommands) Format(ctx *cli.Context) error
- func (dc *DevelopmentCommands) KeyGenerate(ctx *cli.Context) error
- func (dc *DevelopmentCommands) Lint(ctx *cli.Context) error
- func (dc *DevelopmentCommands) ListRoutes(ctx *cli.Context) error
- func (dc *DevelopmentCommands) QueueFailed(ctx *cli.Context) error
- func (dc *DevelopmentCommands) QueueFlush(ctx *cli.Context) error
- func (dc *DevelopmentCommands) QueueMonitor(ctx *cli.Context) error
- func (dc *DevelopmentCommands) QueueRetry(ctx *cli.Context) error
- func (dc *DevelopmentCommands) QueueRetryAll(ctx *cli.Context) error
- func (dc *DevelopmentCommands) QueueWork(ctx *cli.Context) error
- func (dc *DevelopmentCommands) Register()
- func (dc *DevelopmentCommands) ScheduleList(ctx *cli.Context) error
- func (dc *DevelopmentCommands) ScheduleRun(ctx *cli.Context) error
- func (dc *DevelopmentCommands) Serve(ctx *cli.Context) error
- func (dc *DevelopmentCommands) StorageLink(ctx *cli.Context) error
- func (dc *DevelopmentCommands) Test(ctx *cli.Context) error
- func (dc *DevelopmentCommands) Tinker(ctx *cli.Context) error
- type DiskUsage
- type ErrorContext
- type ErrorFormatter
- type ErrorHandler
- type ErrorLogger
- type ErrorRecovery
- type ErrorValidation
- type FailedJob
- type FileValidator
- type HealthStatus
- type InputHelper
- func (ih *InputHelper) ReadValidatedInt(field, prompt string, validators ...func(int) error) (int, error)
- func (ih *InputHelper) ReadValidatedIntWithDefault(field, prompt string, defaultValue int, validators ...func(int) error) (int, error)
- func (ih *InputHelper) ReadValidatedString(field, prompt string, validators ...func(string) error) (string, error)
- func (ih *InputHelper) ReadValidatedStringWithDefault(field, prompt, defaultValue string, validators ...func(string) error) (string, error)
- type InputProvider
- func (ip *InputProvider) Confirm(message string) (bool, error)
- func (ip *InputProvider) ConfirmWithDefault(message string, defaultValue bool) (bool, error)
- func (ip *InputProvider) ReadBool(prompt string) (bool, error)
- func (ip *InputProvider) ReadBoolWithDefault(prompt string, defaultValue bool) (bool, error)
- func (ip *InputProvider) ReadChoice(prompt string, choices []string) (string, error)
- func (ip *InputProvider) ReadChoiceWithDefault(prompt string, choices []string, defaultValue string) (string, error)
- func (ip *InputProvider) ReadInt(prompt string) (int, error)
- func (ip *InputProvider) ReadIntWithDefault(prompt string, defaultValue int) (int, error)
- func (ip *InputProvider) ReadMultiLine(prompt string, terminator string) (string, error)
- func (ip *InputProvider) ReadPassword(prompt string) (string, error)
- func (ip *InputProvider) ReadString(prompt string) (string, error)
- func (ip *InputProvider) ReadStringWithDefault(prompt, defaultValue string) (string, error)
- type InputValidator
- type LogLevel
- type Logger
- func (l *Logger) Close() error
- func (l *Logger) Debug(message string)
- func (l *Logger) Debugf(format string, args ...interface{})
- func (l *Logger) Error(message string)
- func (l *Logger) Errorf(format string, args ...interface{})
- func (l *Logger) Fatal(message string)
- func (l *Logger) Fatalf(format string, args ...interface{})
- func (l *Logger) Info(message string)
- func (l *Logger) Infof(format string, args ...interface{})
- func (l *Logger) SetColors(colors bool)
- func (l *Logger) SetLevel(level LogLevel)
- func (l *Logger) SetLogFile(logFile string) error
- func (l *Logger) SetVerbose(verbose bool)
- func (l *Logger) SetWriter(writer io.Writer)
- func (l *Logger) Warning(message string)
- func (l *Logger) Warningf(format string, args ...interface{})
- type MemoryUsage
- type Metrics
- type MigrateCommand
- type MigrationFile
- type ModelGenerator
- type ModuleFlags
- type MonitoringCommands
- func (mc *MonitoringCommands) MonitorCPU(ctx *cli.Context) error
- func (mc *MonitoringCommands) MonitorDisk(ctx *cli.Context) error
- func (mc *MonitoringCommands) MonitorHealth(ctx *cli.Context) error
- func (mc *MonitoringCommands) MonitorLogs(ctx *cli.Context) error
- func (mc *MonitoringCommands) MonitorMemory(ctx *cli.Context) error
- func (mc *MonitoringCommands) MonitorMetrics(ctx *cli.Context) error
- func (mc *MonitoringCommands) MonitorNetwork(ctx *cli.Context) error
- func (mc *MonitoringCommands) MonitorPerformance(ctx *cli.Context) error
- func (mc *MonitoringCommands) Register()
- type NetworkStats
- type OutputFormatter
- type OutputLogger
- type OutputManager
- func (om *OutputManager) Clear()
- func (om *OutputManager) Code(code string, language string)
- func (om *OutputManager) Debug(message string)
- func (om *OutputManager) Error(message string)
- func (om *OutputManager) Info(message string)
- func (om *OutputManager) List(items []string)
- func (om *OutputManager) Newline()
- func (om *OutputManager) NumberedList(items []string)
- func (om *OutputManager) Print(message string)
- func (om *OutputManager) Printf(format string, args ...interface{})
- func (om *OutputManager) Println(message string)
- func (om *OutputManager) Progress(current, total int, message string)
- func (om *OutputManager) Quote(quote string, author string)
- func (om *OutputManager) Section(title string)
- func (om *OutputManager) Separator()
- func (om *OutputManager) SetColors(colors bool)
- func (om *OutputManager) SetLogFile(logFile string)
- func (om *OutputManager) SetVerbose(verbose bool)
- func (om *OutputManager) Spinner(message string)
- func (om *OutputManager) Subsection(title string)
- func (om *OutputManager) Success(message string)
- func (om *OutputManager) Table(headers []string, rows [][]string)
- func (om *OutputManager) Warning(message string)
- type OutputProvider
- func (op *OutputProvider) Clear()
- func (op *OutputProvider) Code(code string, language string)
- func (op *OutputProvider) Debug(message string)
- func (op *OutputProvider) Error(message string)
- func (op *OutputProvider) Info(message string)
- func (op *OutputProvider) List(items []string)
- func (op *OutputProvider) Newline()
- func (op *OutputProvider) NumberedList(items []string)
- func (op *OutputProvider) Print(message string)
- func (op *OutputProvider) Printf(format string, args ...interface{})
- func (op *OutputProvider) Println(message string)
- func (op *OutputProvider) Progress(current, total int, message string)
- func (op *OutputProvider) Quote(quote string, author string)
- func (op *OutputProvider) Section(title string)
- func (op *OutputProvider) Separator()
- func (op *OutputProvider) SetColors(colors bool)
- func (op *OutputProvider) SetVerbose(verbose bool)
- func (op *OutputProvider) SetWriter(writer io.Writer)
- func (op *OutputProvider) Spinner(message string)
- func (op *OutputProvider) Subsection(title string)
- func (op *OutputProvider) Success(message string)
- func (op *OutputProvider) Table(headers []string, rows [][]string)
- func (op *OutputProvider) Verbose(message string)
- func (op *OutputProvider) Warning(message string)
- type PerformanceMetrics
- type Permission
- type ProjectCommands
- func (pc *ProjectCommands) MakeCommand(ctx *cli.Context) error
- func (pc *ProjectCommands) MakeController(ctx *cli.Context) error
- func (pc *ProjectCommands) MakeMiddleware(ctx *cli.Context) error
- func (pc *ProjectCommands) MakeModel(ctx *cli.Context) error
- func (pc *ProjectCommands) MakeModule(ctx *cli.Context) error
- func (pc *ProjectCommands) MakeSchema(ctx *cli.Context) error
- func (pc *ProjectCommands) Register(app *cli.App)
- type ProjectGenerator
- type ProjectValidator
- type QueueCommands
- func (qc *QueueCommands) QueueClear(ctx *cli.Context) error
- func (qc *QueueCommands) QueueFailed(ctx *cli.Context) error
- func (qc *QueueCommands) QueueFlush(ctx *cli.Context) error
- func (qc *QueueCommands) QueueMonitor(ctx *cli.Context) error
- func (qc *QueueCommands) QueueRestart(ctx *cli.Context) error
- func (qc *QueueCommands) QueueRetry(ctx *cli.Context) error
- func (qc *QueueCommands) QueueSize(ctx *cli.Context) error
- func (qc *QueueCommands) QueueWork(ctx *cli.Context) error
- func (qc *QueueCommands) Register()
- type QueueStats
- type QueueValidator
- type RBACCommands
- func (r *RBACCommands) AssignPermission(permissionSlug, roleSlug string) error
- func (r *RBACCommands) AssignRole(userEmail, roleSlug string) error
- func (r *RBACCommands) CreatePermission(name, slug, resource, action, description string) error
- func (r *RBACCommands) CreateRole(name, slug, description string) error
- func (r *RBACCommands) ListPermissions() error
- func (r *RBACCommands) ListRoles() error
- func (r *RBACCommands) SeedDefaultRBACData() error
- func (r *RBACCommands) ShowUserPermissions(userEmail string) error
- type RanMigration
- type Role
- type Route
- type ScheduledTask
- type SeedCommand
- type SeederFile
- type SimpleModuleGenerator
- type StorageCommands
- func (sc *StorageCommands) Register()
- func (sc *StorageCommands) StorageBackup(ctx *cli.Context) error
- func (sc *StorageCommands) StorageClean(ctx *cli.Context) error
- func (sc *StorageCommands) StorageDelete(ctx *cli.Context) error
- func (sc *StorageCommands) StorageDownload(ctx *cli.Context) error
- func (sc *StorageCommands) StorageLink(ctx *cli.Context) error
- func (sc *StorageCommands) StorageList(ctx *cli.Context) error
- func (sc *StorageCommands) StorageRestore(ctx *cli.Context) error
- func (sc *StorageCommands) StorageSize(ctx *cli.Context) error
- func (sc *StorageCommands) StorageSync(ctx *cli.Context) error
- func (sc *StorageCommands) StorageUpload(ctx *cli.Context) error
- type StorageFile
- type StorageValidator
- type User
- type UtilityCommands
- func (uc *UtilityCommands) CacheClear(ctx *cli.Context) error
- func (uc *UtilityCommands) CacheForget(ctx *cli.Context) error
- func (uc *UtilityCommands) Decrypt(ctx *cli.Context) error
- func (uc *UtilityCommands) Encrypt(ctx *cli.Context) error
- func (uc *UtilityCommands) EventGenerate(ctx *cli.Context) error
- func (uc *UtilityCommands) Hash(ctx *cli.Context) error
- func (uc *UtilityCommands) KeyGenerate(ctx *cli.Context) error
- func (uc *UtilityCommands) Register()
- func (uc *UtilityCommands) RouteList(ctx *cli.Context) error
- func (uc *UtilityCommands) ScheduleRun(ctx *cli.Context) error
- func (uc *UtilityCommands) ScheduleWork(ctx *cli.Context) error
- func (uc *UtilityCommands) VendorPublish(ctx *cli.Context) error
- type ValidationResult
- func (vr *ValidationResult) AddError(field, message string)
- func (vr *ValidationResult) AddWarning(field, message string)
- func (vr *ValidationResult) GetErrorMessages() []string
- func (vr *ValidationResult) GetWarningMessages() []string
- func (vr *ValidationResult) HasErrors() bool
- func (vr *ValidationResult) HasWarnings() bool
- type ValidationRule
- type Validator
Constants ¶
const ( ErrCodeSuccess = iota ErrCodeGeneral ErrCodeInvalidCommand ErrCodeInvalidArgument ErrCodeInvalidFlag ErrCodeMissingArgument ErrCodeMissingFlag ErrCodeFileNotFound ErrCodePermissionDenied ErrCodeConfiguration ErrCodeDatabase ErrCodeNetwork ErrCodeTimeout ErrCodeValidation ErrCodeAuthentication ErrCodeAuthorization ErrCodeNotFound ErrCodeAlreadyExists ErrCodeInvalidOperation ErrCodeDependency ErrCodeInternal )
Error codes
Variables ¶
var ( ErrInvalidCommand = NewCLIError(ErrCodeInvalidCommand, "invalid command", nil) ErrInvalidArgument = NewCLIError(ErrCodeInvalidArgument, "invalid argument", nil) ErrInvalidFlag = NewCLIError(ErrCodeInvalidFlag, "invalid flag", nil) ErrMissingArgument = NewCLIError(ErrCodeMissingArgument, "missing required argument", nil) ErrMissingFlag = NewCLIError(ErrCodeMissingFlag, "missing required flag", nil) ErrFileNotFound = NewCLIError(ErrCodeFileNotFound, "file not found", nil) ErrPermissionDenied = NewCLIError(ErrCodePermissionDenied, "permission denied", nil) ErrConfiguration = NewCLIError(ErrCodeConfiguration, "configuration error", nil) ErrDatabase = NewCLIError(ErrCodeDatabase, "database error", nil) ErrNetwork = NewCLIError(ErrCodeNetwork, "network error", nil) ErrTimeout = NewCLIError(ErrCodeTimeout, "operation timeout", nil) ErrValidation = NewCLIError(ErrCodeValidation, "validation error", nil) ErrAuthentication = NewCLIError(ErrCodeAuthentication, "authentication error", nil) ErrAuthorization = NewCLIError(ErrCodeAuthorization, "authorization error", nil) ErrNotFound = NewCLIError(ErrCodeNotFound, "resource not found", nil) ErrAlreadyExists = NewCLIError(ErrCodeAlreadyExists, "resource already exists", nil) ErrInvalidOperation = NewCLIError(ErrCodeInvalidOperation, "invalid operation", nil) ErrDependency = NewCLIError(ErrCodeDependency, "dependency error", nil) ErrInternal = NewCLIError(ErrCodeInternal, "internal error", nil) )
Error messages
var ( // Required validator Required = func(field string) func(string) error { return func(value string) error { if strings.TrimSpace(value) == "" { return fmt.Errorf("%s is required", field) } return nil } } // Email validator Email = func(value string) error { if value == "" { return nil } if !strings.Contains(value, "@") || !strings.Contains(value, ".") { return fmt.Errorf("invalid email format") } return nil } // URL validator URL = func(value string) error { if value == "" { return nil } if !strings.HasPrefix(value, "http://") && !strings.HasPrefix(value, "https://") { return fmt.Errorf("URL must start with http:// or https://") } return nil } // MinLength validator MinLength = func(min int) func(string) error { return func(value string) error { if len(value) < min { return fmt.Errorf("must be at least %d characters long", min) } return nil } } // MaxLength validator MaxLength = func(max int) func(string) error { return func(value string) error { if len(value) > max { return fmt.Errorf("must be at most %d characters long", max) } return nil } } // MinMaxLength validator MinMaxLength = func(min, max int) func(string) error { return func(value string) error { if len(value) < min { return fmt.Errorf("must be at least %d characters long", min) } if len(value) > max { return fmt.Errorf("must be at most %d characters long", max) } return nil } } )
Common validators
var ( // String validations RequiredString = ValidationRule{Required: true} OptionalString = ValidationRule{Required: false} MinString = func(min int) ValidationRule { return ValidationRule{Min: min} } MaxString = func(max int) ValidationRule { return ValidationRule{Max: max} } MinMaxString = func(min, max int) ValidationRule { return ValidationRule{Min: min, Max: max} } // Email validation EmailPattern = ValidationRule{ Required: true, Pattern: `^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$`, } // URL validation URLPattern = ValidationRule{ Required: true, Pattern: `^https?://[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}`, } // Numeric validations RequiredInt = ValidationRule{Required: true} OptionalInt = ValidationRule{Required: false} MinInt = func(min int) ValidationRule { return ValidationRule{Min: min} } MaxInt = func(max int) ValidationRule { return ValidationRule{Max: max} } MinMaxInt = func(min, max int) ValidationRule { return ValidationRule{Min: min, Max: max} } // Boolean validations RequiredBool = ValidationRule{Required: true} OptionalBool = ValidationRule{Required: false} )
Common validation rules
Functions ¶
func GetAllCommands ¶
GetAllCommands returns all registered commands (stub)
func GetProjectName ¶
func GetProjectName() string
GetProjectName returns the project name from go.mod
func GetProjectRoot ¶
func GetProjectRoot() string
GetProjectRoot returns the project root directory
func GraphQLCommands ¶
GraphQLCommands returns GraphQL-related CLI commands
func IsDevelopment ¶
func IsDevelopment() bool
IsDevelopment checks if the current environment is development
func IsProduction ¶
func IsProduction() bool
IsProduction checks if the current environment is production
func RegisterCommand ¶
RegisterCommand registers a command (stub)
Types ¶
type AuthCommands ¶
type AuthCommands struct{}
AuthCommands contains all authentication-related commands
func NewAuthCommands ¶
func NewAuthCommands() *AuthCommands
NewAuthCommands creates a new auth commands instance
func (*AuthCommands) AssignPermission ¶
func (ac *AuthCommands) AssignPermission(ctx *cli.Context) error
AssignPermission assigns a permission to a role
func (*AuthCommands) AssignRole ¶
func (ac *AuthCommands) AssignRole(ctx *cli.Context) error
AssignRole assigns a role to a user
func (*AuthCommands) CreateSuperUser ¶
func (ac *AuthCommands) CreateSuperUser(ctx *cli.Context) error
CreateSuperUser creates a superuser account
func (*AuthCommands) ListPermissions ¶
func (ac *AuthCommands) ListPermissions(ctx *cli.Context) error
ListPermissions lists all permissions
func (*AuthCommands) ListRoles ¶
func (ac *AuthCommands) ListRoles(ctx *cli.Context) error
ListRoles lists all roles
func (*AuthCommands) ListUsers ¶
func (ac *AuthCommands) ListUsers(ctx *cli.Context) error
ListUsers lists all users
func (*AuthCommands) MakeAuth ¶
func (ac *AuthCommands) MakeAuth(ctx *cli.Context) error
MakeAuth scaffolds authentication system
func (*AuthCommands) MakePermission ¶
func (ac *AuthCommands) MakePermission(ctx *cli.Context) error
MakePermission creates a new permission
func (*AuthCommands) MakeRole ¶
func (ac *AuthCommands) MakeRole(ctx *cli.Context) error
MakeRole creates a new role
func (*AuthCommands) Register ¶
func (ac *AuthCommands) Register()
Register registers all authentication commands
func (*AuthCommands) RevokePermission ¶
func (ac *AuthCommands) RevokePermission(ctx *cli.Context) error
RevokePermission revokes a permission from a role
func (*AuthCommands) RevokeRole ¶
func (ac *AuthCommands) RevokeRole(ctx *cli.Context) error
RevokeRole revokes a role from a user
type CLIError ¶
CLIError represents a CLI-specific error
func NewCLIError ¶
NewCLIError creates a new CLI error
type CommandBuilder ¶
type CommandBuilder struct {
// contains filtered or unexported fields
}
CommandBuilder helps build commands
func NewCommand ¶
func NewCommand(name, usage string) *CommandBuilder
NewCommand creates a new command with common options
func (*CommandBuilder) Action ¶
func (cb *CommandBuilder) Action(action cli.ActionFunc) *CommandBuilder
Action sets the command action
func (*CommandBuilder) BoolFlag ¶
func (cb *CommandBuilder) BoolFlag(name, usage string) *CommandBuilder
BoolFlag adds a bool flag
func (*CommandBuilder) Build ¶
func (cb *CommandBuilder) Build() *cli.Command
Build builds the command
func (*CommandBuilder) Category ¶
func (cb *CommandBuilder) Category(category string) *CommandBuilder
Category sets the command category
func (*CommandBuilder) Description ¶
func (cb *CommandBuilder) Description(description string) *CommandBuilder
Description sets the command description
func (*CommandBuilder) Flag ¶
func (cb *CommandBuilder) Flag(flag cli.Flag) *CommandBuilder
Flag adds a flag to the command
func (*CommandBuilder) IntFlag ¶
func (cb *CommandBuilder) IntFlag(name string, value int, usage string) *CommandBuilder
IntFlag adds an int flag
func (*CommandBuilder) Register ¶
func (cb *CommandBuilder) Register() *CommandBuilder
Register registers the command
func (*CommandBuilder) StringFlag ¶
func (cb *CommandBuilder) StringFlag(name, value, usage string) *CommandBuilder
StringFlag adds a string flag
func (*CommandBuilder) StringSliceFlag ¶
func (cb *CommandBuilder) StringSliceFlag(name, usage string) *CommandBuilder
StringSliceFlag adds a string slice flag
type CommandContext ¶
CommandContext provides context and utilities for CLI commands
func NewCommandContext ¶
func NewCommandContext(app *cli.App, ctx *cli.Context) *CommandContext
NewCommandContext creates a new command context
func (*CommandContext) Confirm ¶
func (cc *CommandContext) Confirm(message string) bool
func (*CommandContext) CreateDirectory ¶
func (cc *CommandContext) CreateDirectory(path string) error
func (*CommandContext) DirectoryExists ¶
func (cc *CommandContext) DirectoryExists(path string) bool
func (*CommandContext) FileExists ¶
func (cc *CommandContext) FileExists(path string) bool
func (*CommandContext) GetBoolFlag ¶
func (cc *CommandContext) GetBoolFlag(name string) bool
func (*CommandContext) GetIntFlag ¶
func (cc *CommandContext) GetIntFlag(name string) int
func (*CommandContext) GetStringArg ¶
func (cc *CommandContext) GetStringArg(index int) string
func (*CommandContext) GetStringFlag ¶
func (cc *CommandContext) GetStringFlag(name string) string
Helper methods for CommandContext
func (*CommandContext) PrintError ¶
func (cc *CommandContext) PrintError(message string)
func (*CommandContext) PrintInfo ¶
func (cc *CommandContext) PrintInfo(message string)
func (*CommandContext) PrintSuccess ¶
func (cc *CommandContext) PrintSuccess(message string)
func (*CommandContext) PrintTable ¶
func (cc *CommandContext) PrintTable(headers []string, rows [][]string)
func (*CommandContext) PrintWarning ¶
func (cc *CommandContext) PrintWarning(message string)
func (*CommandContext) WriteFile ¶
func (cc *CommandContext) WriteFile(path string, content interface{}) error
type Config ¶
type Config struct {
Name string
Version string
Description string
Usage string
Authors []*cli.Author
Flags []cli.Flag
Commands []*cli.Command
}
Config holds CLI configuration
type DatabaseCommands ¶
type DatabaseCommands struct{}
DatabaseCommands contains all database-related commands
func NewDatabaseCommands ¶
func NewDatabaseCommands() *DatabaseCommands
NewDatabaseCommands creates a new database commands instance
func (*DatabaseCommands) DatabaseBackup ¶
func (dc *DatabaseCommands) DatabaseBackup(ctx *cli.Context) error
DatabaseBackup creates a database backup
func (*DatabaseCommands) DatabaseRestore ¶
func (dc *DatabaseCommands) DatabaseRestore(ctx *cli.Context) error
DatabaseRestore restores database from backup
func (*DatabaseCommands) DatabaseSeed ¶
func (dc *DatabaseCommands) DatabaseSeed(ctx *cli.Context) error
DatabaseSeed runs database seeders
func (*DatabaseCommands) DatabaseTest ¶
func (dc *DatabaseCommands) DatabaseTest(ctx *cli.Context) error
DatabaseTest tests database connection
func (*DatabaseCommands) DatabaseWipe ¶
func (dc *DatabaseCommands) DatabaseWipe(ctx *cli.Context) error
DatabaseWipe wipes all database data
func (*DatabaseCommands) MakeMigration ¶
func (dc *DatabaseCommands) MakeMigration(ctx *cli.Context) error
MakeMigration creates a new migration
func (*DatabaseCommands) MakeSeeder ¶
func (dc *DatabaseCommands) MakeSeeder(ctx *cli.Context) error
MakeSeeder creates a new seeder
func (*DatabaseCommands) Migrate ¶
func (dc *DatabaseCommands) Migrate(ctx *cli.Context) error
Migrate runs pending migrations
func (*DatabaseCommands) MigrateFresh ¶
func (dc *DatabaseCommands) MigrateFresh(ctx *cli.Context) error
MigrateFresh drops all tables and re-runs migrations
func (*DatabaseCommands) MigrateRefresh ¶
func (dc *DatabaseCommands) MigrateRefresh(ctx *cli.Context) error
MigrateRefresh refreshes migrations
func (*DatabaseCommands) MigrateReset ¶
func (dc *DatabaseCommands) MigrateReset(ctx *cli.Context) error
MigrateReset rolls back all migrations
func (*DatabaseCommands) MigrateRollback ¶
func (dc *DatabaseCommands) MigrateRollback(ctx *cli.Context) error
MigrateRollback rolls back the last migration
func (*DatabaseCommands) MigrateStatus ¶
func (dc *DatabaseCommands) MigrateStatus(ctx *cli.Context) error
MigrateStatus shows migration status
func (*DatabaseCommands) Register ¶
func (dc *DatabaseCommands) Register()
Register registers all database commands
type DatabaseValidator ¶
type DatabaseValidator struct {
// contains filtered or unexported fields
}
DatabaseValidator provides database validation
func NewDatabaseValidator ¶
func NewDatabaseValidator() *DatabaseValidator
NewDatabaseValidator creates a new database validator
func (*DatabaseValidator) ValidateConnectionString ¶
func (dv *DatabaseValidator) ValidateConnectionString(driver, dsn string) error
ValidateConnectionString validates a database connection string
func (*DatabaseValidator) ValidateMigrationName ¶
func (dv *DatabaseValidator) ValidateMigrationName(name string) error
ValidateMigrationName validates a migration name
type DevelopmentCommands ¶
type DevelopmentCommands struct{}
DevelopmentCommands contains all development-related commands
func NewDevelopmentCommands ¶
func NewDevelopmentCommands() *DevelopmentCommands
NewDevelopmentCommands creates a new development commands instance
func (*DevelopmentCommands) ConfigCache ¶
func (dc *DevelopmentCommands) ConfigCache(ctx *cli.Context) error
ConfigCache caches configuration
func (*DevelopmentCommands) ConfigClear ¶
func (dc *DevelopmentCommands) ConfigClear(ctx *cli.Context) error
ConfigClear clears configuration cache
func (*DevelopmentCommands) ConfigShow ¶
func (dc *DevelopmentCommands) ConfigShow(ctx *cli.Context) error
ConfigShow shows configuration values
func (*DevelopmentCommands) EnvGet ¶
func (dc *DevelopmentCommands) EnvGet(ctx *cli.Context) error
EnvGet gets an environment variable
func (*DevelopmentCommands) EnvSet ¶
func (dc *DevelopmentCommands) EnvSet(ctx *cli.Context) error
EnvSet sets an environment variable
func (*DevelopmentCommands) Format ¶
func (dc *DevelopmentCommands) Format(ctx *cli.Context) error
Format formats the code
func (*DevelopmentCommands) KeyGenerate ¶
func (dc *DevelopmentCommands) KeyGenerate(ctx *cli.Context) error
KeyGenerate generates an application key
func (*DevelopmentCommands) Lint ¶
func (dc *DevelopmentCommands) Lint(ctx *cli.Context) error
Lint runs the code linter
func (*DevelopmentCommands) ListRoutes ¶
func (dc *DevelopmentCommands) ListRoutes(ctx *cli.Context) error
ListRoutes lists all registered routes
func (*DevelopmentCommands) QueueFailed ¶
func (dc *DevelopmentCommands) QueueFailed(ctx *cli.Context) error
QueueFailed lists failed jobs
func (*DevelopmentCommands) QueueFlush ¶
func (dc *DevelopmentCommands) QueueFlush(ctx *cli.Context) error
QueueFlush flushes all failed jobs
func (*DevelopmentCommands) QueueMonitor ¶
func (dc *DevelopmentCommands) QueueMonitor(ctx *cli.Context) error
QueueMonitor monitors queue status
func (*DevelopmentCommands) QueueRetry ¶
func (dc *DevelopmentCommands) QueueRetry(ctx *cli.Context) error
QueueRetry retries a failed job
func (*DevelopmentCommands) QueueRetryAll ¶
func (dc *DevelopmentCommands) QueueRetryAll(ctx *cli.Context) error
QueueRetryAll retries all failed jobs
func (*DevelopmentCommands) QueueWork ¶
func (dc *DevelopmentCommands) QueueWork(ctx *cli.Context) error
QueueWork starts the queue worker
func (*DevelopmentCommands) Register ¶
func (dc *DevelopmentCommands) Register()
Register registers all development commands
func (*DevelopmentCommands) ScheduleList ¶
func (dc *DevelopmentCommands) ScheduleList(ctx *cli.Context) error
ScheduleList lists scheduled tasks
func (*DevelopmentCommands) ScheduleRun ¶
func (dc *DevelopmentCommands) ScheduleRun(ctx *cli.Context) error
ScheduleRun runs scheduled tasks
func (*DevelopmentCommands) Serve ¶
func (dc *DevelopmentCommands) Serve(ctx *cli.Context) error
Serve starts the development server
func (*DevelopmentCommands) StorageLink ¶
func (dc *DevelopmentCommands) StorageLink(ctx *cli.Context) error
StorageLink creates a symbolic link for public storage
type ErrorContext ¶
ErrorContext provides context for errors
func NewErrorContext ¶
func NewErrorContext(command string, arguments []string, flags map[string]interface{}) *ErrorContext
NewErrorContext creates a new error context
func (*ErrorContext) AddErrorContext ¶
func (ec *ErrorContext) AddErrorContext(err error) error
AddErrorContext adds context to an error
type ErrorFormatter ¶
type ErrorFormatter struct {
// contains filtered or unexported fields
}
ErrorFormatter formats error messages
func NewErrorFormatter ¶
func NewErrorFormatter(colors bool) *ErrorFormatter
NewErrorFormatter creates a new error formatter
func (*ErrorFormatter) FormatError ¶
func (ef *ErrorFormatter) FormatError(err error) string
FormatError formats an error message
func (*ErrorFormatter) FormatInfo ¶
func (ef *ErrorFormatter) FormatInfo(message string) string
FormatInfo formats an info message
func (*ErrorFormatter) FormatSuccess ¶
func (ef *ErrorFormatter) FormatSuccess(message string) string
FormatSuccess formats a success message
func (*ErrorFormatter) FormatWarning ¶
func (ef *ErrorFormatter) FormatWarning(message string) string
FormatWarning formats a warning message
type ErrorHandler ¶
type ErrorHandler struct {
// contains filtered or unexported fields
}
ErrorHandler handles CLI errors
func NewErrorHandler ¶
func NewErrorHandler(verbose bool) *ErrorHandler
NewErrorHandler creates a new error handler
type ErrorLogger ¶
type ErrorLogger struct {
// contains filtered or unexported fields
}
ErrorLogger logs errors
func NewErrorLogger ¶
func NewErrorLogger(verbose bool) *ErrorLogger
NewErrorLogger creates a new error logger
func (*ErrorLogger) LogInfo ¶
func (el *ErrorLogger) LogInfo(message string)
LogInfo logs an info message
func (*ErrorLogger) LogWarning ¶
func (el *ErrorLogger) LogWarning(message string)
LogWarning logs a warning
type ErrorRecovery ¶
type ErrorRecovery struct {
// contains filtered or unexported fields
}
ErrorRecovery provides error recovery functionality
func NewErrorRecovery ¶
func NewErrorRecovery(verbose bool) *ErrorRecovery
NewErrorRecovery creates a new error recovery
func (*ErrorRecovery) HandleError ¶
func (er *ErrorRecovery) HandleError(err error)
HandleError handles an error with recovery
type ErrorValidation ¶
type ErrorValidation struct {
// contains filtered or unexported fields
}
ErrorValidation provides validation error functionality
func NewErrorValidation ¶
func NewErrorValidation() *ErrorValidation
NewErrorValidation creates a new validation error
func (*ErrorValidation) AddError ¶
func (ev *ErrorValidation) AddError(field, message string)
AddError adds a validation error
func (*ErrorValidation) Error ¶
func (ev *ErrorValidation) Error() string
Error returns the validation error message
func (*ErrorValidation) GetErrors ¶
func (ev *ErrorValidation) GetErrors() map[string][]string
GetErrors gets all validation errors
func (*ErrorValidation) HasErrors ¶
func (ev *ErrorValidation) HasErrors() bool
HasErrors checks if there are validation errors
func (*ErrorValidation) ToCLIError ¶
func (ev *ErrorValidation) ToCLIError() *CLIError
ToCLIError converts validation errors to CLI error
type FileValidator ¶
type FileValidator struct {
// contains filtered or unexported fields
}
FileValidator provides file validation
func NewFileValidator ¶
func NewFileValidator() *FileValidator
NewFileValidator creates a new file validator
func (*FileValidator) ValidateDirectory ¶
func (fv *FileValidator) ValidateDirectory(path string) error
ValidateDirectory validates a directory path
func (*FileValidator) ValidateFile ¶
func (fv *FileValidator) ValidateFile(path string) error
ValidateFile validates a file path
func (*FileValidator) ValidateFileExtension ¶
func (fv *FileValidator) ValidateFileExtension(path string, allowedExtensions []string) error
ValidateFileExtension validates file extension
func (*FileValidator) ValidateFileSize ¶
func (fv *FileValidator) ValidateFileSize(path string, maxSize int64) error
ValidateFileSize validates file size
type HealthStatus ¶
type InputHelper ¶
type InputHelper struct {
// contains filtered or unexported fields
}
InputHelper provides helper functions for input
func (*InputHelper) ReadValidatedInt ¶
func (ih *InputHelper) ReadValidatedInt(field, prompt string, validators ...func(int) error) (int, error)
ReadValidatedInt reads an integer with validation
func (*InputHelper) ReadValidatedIntWithDefault ¶
func (ih *InputHelper) ReadValidatedIntWithDefault(field, prompt string, defaultValue int, validators ...func(int) error) (int, error)
ReadValidatedIntWithDefault reads an integer with validation and default
func (*InputHelper) ReadValidatedString ¶
func (ih *InputHelper) ReadValidatedString(field, prompt string, validators ...func(string) error) (string, error)
ReadValidatedString reads a string with validation
func (*InputHelper) ReadValidatedStringWithDefault ¶
func (ih *InputHelper) ReadValidatedStringWithDefault(field, prompt, defaultValue string, validators ...func(string) error) (string, error)
ReadValidatedStringWithDefault reads a string with validation and default
type InputProvider ¶
type InputProvider struct {
// contains filtered or unexported fields
}
InputProvider provides input functionality for CLI commands
func NewInputProvider ¶
func NewInputProvider() *InputProvider
NewInputProvider creates a new input provider
func (*InputProvider) Confirm ¶
func (ip *InputProvider) Confirm(message string) (bool, error)
Confirm asks for confirmation
func (*InputProvider) ConfirmWithDefault ¶
func (ip *InputProvider) ConfirmWithDefault(message string, defaultValue bool) (bool, error)
ConfirmWithDefault asks for confirmation with a default value
func (*InputProvider) ReadBool ¶
func (ip *InputProvider) ReadBool(prompt string) (bool, error)
ReadBool reads a boolean from input
func (*InputProvider) ReadBoolWithDefault ¶
func (ip *InputProvider) ReadBoolWithDefault(prompt string, defaultValue bool) (bool, error)
ReadBoolWithDefault reads a boolean with a default value
func (*InputProvider) ReadChoice ¶
func (ip *InputProvider) ReadChoice(prompt string, choices []string) (string, error)
ReadChoice reads a choice from a list of options
func (*InputProvider) ReadChoiceWithDefault ¶
func (ip *InputProvider) ReadChoiceWithDefault(prompt string, choices []string, defaultValue string) (string, error)
ReadChoiceWithDefault reads a choice with a default value
func (*InputProvider) ReadInt ¶
func (ip *InputProvider) ReadInt(prompt string) (int, error)
ReadInt reads an integer from input
func (*InputProvider) ReadIntWithDefault ¶
func (ip *InputProvider) ReadIntWithDefault(prompt string, defaultValue int) (int, error)
ReadIntWithDefault reads an integer with a default value
func (*InputProvider) ReadMultiLine ¶
func (ip *InputProvider) ReadMultiLine(prompt string, terminator string) (string, error)
ReadMultiLine reads multiple lines from input
func (*InputProvider) ReadPassword ¶
func (ip *InputProvider) ReadPassword(prompt string) (string, error)
ReadPassword reads a password from input (hidden)
func (*InputProvider) ReadString ¶
func (ip *InputProvider) ReadString(prompt string) (string, error)
ReadString reads a string from input
func (*InputProvider) ReadStringWithDefault ¶
func (ip *InputProvider) ReadStringWithDefault(prompt, defaultValue string) (string, error)
ReadStringWithDefault reads a string with a default value
type InputValidator ¶
type InputValidator struct {
// contains filtered or unexported fields
}
InputValidator validates input
func NewInputValidator ¶
func NewInputValidator() *InputValidator
NewInputValidator creates a new input validator
func (*InputValidator) AddValidator ¶
func (iv *InputValidator) AddValidator(field string, validator func(string) error)
AddValidator adds a validator for a field
func (*InputValidator) Validate ¶
func (iv *InputValidator) Validate(field, value string) error
Validate validates input
type LogLevel ¶
type LogLevel int
LogLevel represents the log level
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger provides logging functionality for CLI commands
func (*Logger) SetLogFile ¶
SetLogFile sets the log file
func (*Logger) SetVerbose ¶
SetVerbose enables or disables verbose output
type MigrateCommand ¶
type MigrateCommand struct {
// contains filtered or unexported fields
}
MigrateCommand handles migration commands
func NewMigrateCommand ¶
func NewMigrateCommand(manager *connection.Manager) *MigrateCommand
NewMigrateCommand creates a new migrate command
func (*MigrateCommand) Run ¶
func (mc *MigrateCommand) Run(args []string) error
Run runs the migrate command
type MigrationFile ¶
type ModelGenerator ¶
type ModelGenerator struct {
ModelName string
}
ModelGenerator handles model creation
func NewModelGenerator ¶
func NewModelGenerator(modelName string) *ModelGenerator
NewModelGenerator creates a new model generator
func (*ModelGenerator) Generate ¶
func (mg *ModelGenerator) Generate() error
Generate creates a new model
type ModuleFlags ¶
type ModuleFlags struct {
Full bool // Generate full CRUD (web + API)
APIOnly bool // Generate API routes only
WebOnly bool // Generate web routes only
}
ModuleFlags represents the flags for module generation
type MonitoringCommands ¶
type MonitoringCommands struct{}
MonitoringCommands contains all monitoring-related commands
func NewMonitoringCommands ¶
func NewMonitoringCommands() *MonitoringCommands
NewMonitoringCommands creates a new monitoring commands instance
func (*MonitoringCommands) MonitorCPU ¶
func (mc *MonitoringCommands) MonitorCPU(ctx *cli.Context) error
MonitorCPU shows CPU usage
func (*MonitoringCommands) MonitorDisk ¶
func (mc *MonitoringCommands) MonitorDisk(ctx *cli.Context) error
MonitorDisk shows disk usage
func (*MonitoringCommands) MonitorHealth ¶
func (mc *MonitoringCommands) MonitorHealth(ctx *cli.Context) error
MonitorHealth checks application health
func (*MonitoringCommands) MonitorLogs ¶
func (mc *MonitoringCommands) MonitorLogs(ctx *cli.Context) error
MonitorLogs shows application logs
func (*MonitoringCommands) MonitorMemory ¶
func (mc *MonitoringCommands) MonitorMemory(ctx *cli.Context) error
MonitorMemory shows memory usage
func (*MonitoringCommands) MonitorMetrics ¶
func (mc *MonitoringCommands) MonitorMetrics(ctx *cli.Context) error
MonitorMetrics shows application metrics
func (*MonitoringCommands) MonitorNetwork ¶
func (mc *MonitoringCommands) MonitorNetwork(ctx *cli.Context) error
MonitorNetwork shows network statistics
func (*MonitoringCommands) MonitorPerformance ¶
func (mc *MonitoringCommands) MonitorPerformance(ctx *cli.Context) error
MonitorPerformance shows performance metrics
func (*MonitoringCommands) Register ¶
func (mc *MonitoringCommands) Register()
Register registers all monitoring commands
type NetworkStats ¶
type OutputFormatter ¶
type OutputFormatter struct {
// contains filtered or unexported fields
}
OutputFormatter formats output
func NewOutputFormatter ¶
func NewOutputFormatter() *OutputFormatter
NewOutputFormatter creates a new output formatter
func (*OutputFormatter) FormatCommandOutput ¶
func (of *OutputFormatter) FormatCommandOutput(command string, output string) string
FormatCommandOutput formats command output
func (*OutputFormatter) FormatErrorOutput ¶
func (of *OutputFormatter) FormatErrorOutput(error string) string
FormatErrorOutput formats error output
func (*OutputFormatter) FormatSuccessOutput ¶
func (of *OutputFormatter) FormatSuccessOutput(message string) string
FormatSuccessOutput formats success output
type OutputLogger ¶
type OutputLogger struct {
// contains filtered or unexported fields
}
OutputLogger logs output
func NewOutputLogger ¶
func NewOutputLogger(logFile string) *OutputLogger
NewOutputLogger creates a new output logger
func (*OutputLogger) LogDebug ¶
func (ol *OutputLogger) LogDebug(message string)
LogDebug logs a debug message
func (*OutputLogger) LogError ¶
func (ol *OutputLogger) LogError(message string)
LogError logs an error message
func (*OutputLogger) LogInfo ¶
func (ol *OutputLogger) LogInfo(message string)
LogInfo logs an info message
func (*OutputLogger) LogSuccess ¶
func (ol *OutputLogger) LogSuccess(message string)
LogSuccess logs a success message
func (*OutputLogger) LogWarning ¶
func (ol *OutputLogger) LogWarning(message string)
LogWarning logs a warning message
type OutputManager ¶
type OutputManager struct {
// contains filtered or unexported fields
}
OutputManager manages output
func NewOutputManager ¶
func NewOutputManager() *OutputManager
NewOutputManager creates a new output manager
func (*OutputManager) Code ¶
func (om *OutputManager) Code(code string, language string)
Code prints code
func (*OutputManager) Debug ¶
func (om *OutputManager) Debug(message string)
Debug prints a debug message
func (*OutputManager) Error ¶
func (om *OutputManager) Error(message string)
Error prints an error message
func (*OutputManager) Info ¶
func (om *OutputManager) Info(message string)
Info prints an info message
func (*OutputManager) NumberedList ¶
func (om *OutputManager) NumberedList(items []string)
NumberedList prints a numbered list
func (*OutputManager) Printf ¶
func (om *OutputManager) Printf(format string, args ...interface{})
Printf prints a formatted message
func (*OutputManager) Println ¶
func (om *OutputManager) Println(message string)
Println prints a message with newline
func (*OutputManager) Progress ¶
func (om *OutputManager) Progress(current, total int, message string)
Progress prints a progress bar
func (*OutputManager) Quote ¶
func (om *OutputManager) Quote(quote string, author string)
Quote prints a quote
func (*OutputManager) Section ¶
func (om *OutputManager) Section(title string)
Section prints a section header
func (*OutputManager) SetColors ¶
func (om *OutputManager) SetColors(colors bool)
SetColors sets color mode
func (*OutputManager) SetLogFile ¶
func (om *OutputManager) SetLogFile(logFile string)
SetLogFile sets the log file
func (*OutputManager) SetVerbose ¶
func (om *OutputManager) SetVerbose(verbose bool)
SetVerbose sets verbose mode
func (*OutputManager) Spinner ¶
func (om *OutputManager) Spinner(message string)
Spinner prints a spinner
func (*OutputManager) Subsection ¶
func (om *OutputManager) Subsection(title string)
Subsection prints a subsection header
func (*OutputManager) Success ¶
func (om *OutputManager) Success(message string)
Success prints a success message
func (*OutputManager) Table ¶
func (om *OutputManager) Table(headers []string, rows [][]string)
Table prints a table
func (*OutputManager) Warning ¶
func (om *OutputManager) Warning(message string)
Warning prints a warning message
type OutputProvider ¶
type OutputProvider struct {
// contains filtered or unexported fields
}
OutputProvider provides output functionality for CLI commands
func NewOutputProvider ¶
func NewOutputProvider() *OutputProvider
NewOutputProvider creates a new output provider
func (*OutputProvider) Code ¶
func (op *OutputProvider) Code(code string, language string)
Code prints code with syntax highlighting
func (*OutputProvider) Debug ¶
func (op *OutputProvider) Debug(message string)
Debug prints a debug message
func (*OutputProvider) Error ¶
func (op *OutputProvider) Error(message string)
Error prints an error message
func (*OutputProvider) Info ¶
func (op *OutputProvider) Info(message string)
Info prints an info message
func (*OutputProvider) NumberedList ¶
func (op *OutputProvider) NumberedList(items []string)
NumberedList prints a numbered list
func (*OutputProvider) Print ¶
func (op *OutputProvider) Print(message string)
Print prints a message
func (*OutputProvider) Printf ¶
func (op *OutputProvider) Printf(format string, args ...interface{})
Printf prints a formatted message
func (*OutputProvider) Println ¶
func (op *OutputProvider) Println(message string)
Println prints a message with a newline
func (*OutputProvider) Progress ¶
func (op *OutputProvider) Progress(current, total int, message string)
Progress prints a progress bar
func (*OutputProvider) Quote ¶
func (op *OutputProvider) Quote(quote string, author string)
Quote prints a quote
func (*OutputProvider) Section ¶
func (op *OutputProvider) Section(title string)
Section prints a section header
func (*OutputProvider) Separator ¶
func (op *OutputProvider) Separator()
Separator prints a separator line
func (*OutputProvider) SetColors ¶
func (op *OutputProvider) SetColors(colors bool)
SetColors enables or disables colors
func (*OutputProvider) SetVerbose ¶
func (op *OutputProvider) SetVerbose(verbose bool)
SetVerbose enables or disables verbose output
func (*OutputProvider) SetWriter ¶
func (op *OutputProvider) SetWriter(writer io.Writer)
SetWriter sets the output writer
func (*OutputProvider) Spinner ¶
func (op *OutputProvider) Spinner(message string)
Spinner prints a spinner
func (*OutputProvider) Subsection ¶
func (op *OutputProvider) Subsection(title string)
Subsection prints a subsection header
func (*OutputProvider) Success ¶
func (op *OutputProvider) Success(message string)
Success prints a success message
func (*OutputProvider) Table ¶
func (op *OutputProvider) Table(headers []string, rows [][]string)
Table prints a table
func (*OutputProvider) Verbose ¶
func (op *OutputProvider) Verbose(message string)
Verbose prints a verbose message
func (*OutputProvider) Warning ¶
func (op *OutputProvider) Warning(message string)
Warning prints a warning message
type PerformanceMetrics ¶
type Permission ¶
type ProjectCommands ¶
type ProjectCommands struct{}
ProjectCommands handles project-related commands
func NewProjectCommands ¶
func NewProjectCommands() *ProjectCommands
func (*ProjectCommands) MakeCommand ¶
func (pc *ProjectCommands) MakeCommand(ctx *cli.Context) error
func (*ProjectCommands) MakeController ¶
func (pc *ProjectCommands) MakeController(ctx *cli.Context) error
func (*ProjectCommands) MakeMiddleware ¶
func (pc *ProjectCommands) MakeMiddleware(ctx *cli.Context) error
func (*ProjectCommands) MakeModule ¶
func (pc *ProjectCommands) MakeModule(ctx *cli.Context) error
func (*ProjectCommands) MakeSchema ¶
func (pc *ProjectCommands) MakeSchema(ctx *cli.Context) error
func (*ProjectCommands) Register ¶
func (pc *ProjectCommands) Register(app *cli.App)
type ProjectGenerator ¶
ProjectGenerator handles project creation
func NewProjectGenerator ¶
func NewProjectGenerator(projectName, template string, includeGraphQL bool) *ProjectGenerator
NewProjectGenerator creates a new project generator
func (*ProjectGenerator) CreateBasicStructure ¶
func (pg *ProjectGenerator) CreateBasicStructure() error
CreateBasicStructure creates the basic project structure (exported for potential future use)
func (*ProjectGenerator) Generate ¶
func (pg *ProjectGenerator) Generate() error
Generate creates a new Mithril project
type ProjectValidator ¶
type ProjectValidator struct {
// contains filtered or unexported fields
}
ProjectValidator provides project validation
func NewProjectValidator ¶
func NewProjectValidator() *ProjectValidator
NewProjectValidator creates a new project validator
func (*ProjectValidator) ValidateModuleName ¶
func (pv *ProjectValidator) ValidateModuleName(name string) error
ValidateModuleName validates a module name
func (*ProjectValidator) ValidateProjectName ¶
func (pv *ProjectValidator) ValidateProjectName(name string) error
ValidateProjectName validates a project name
type QueueCommands ¶
type QueueCommands struct{}
QueueCommands contains all queue-related commands
func NewQueueCommands ¶
func NewQueueCommands() *QueueCommands
NewQueueCommands creates a new queue commands instance
func (*QueueCommands) QueueClear ¶
func (qc *QueueCommands) QueueClear(ctx *cli.Context) error
QueueClear clears all jobs from the queue
func (*QueueCommands) QueueFailed ¶
func (qc *QueueCommands) QueueFailed(ctx *cli.Context) error
QueueFailed lists failed jobs
func (*QueueCommands) QueueFlush ¶
func (qc *QueueCommands) QueueFlush(ctx *cli.Context) error
QueueFlush flushes failed jobs
func (*QueueCommands) QueueMonitor ¶
func (qc *QueueCommands) QueueMonitor(ctx *cli.Context) error
QueueMonitor monitors queue status
func (*QueueCommands) QueueRestart ¶
func (qc *QueueCommands) QueueRestart(ctx *cli.Context) error
QueueRestart restarts queue workers
func (*QueueCommands) QueueRetry ¶
func (qc *QueueCommands) QueueRetry(ctx *cli.Context) error
QueueRetry retries failed jobs
func (*QueueCommands) QueueSize ¶
func (qc *QueueCommands) QueueSize(ctx *cli.Context) error
QueueSize gets queue size
func (*QueueCommands) QueueWork ¶
func (qc *QueueCommands) QueueWork(ctx *cli.Context) error
QueueWork starts queue worker
func (*QueueCommands) Register ¶
func (qc *QueueCommands) Register()
Register registers all queue commands
type QueueValidator ¶
type QueueValidator struct {
// contains filtered or unexported fields
}
QueueValidator provides queue validation
func NewQueueValidator ¶
func NewQueueValidator() *QueueValidator
NewQueueValidator creates a new queue validator
func (*QueueValidator) ValidateConnectionName ¶
func (qv *QueueValidator) ValidateConnectionName(name string) error
ValidateConnectionName validates a connection name
func (*QueueValidator) ValidateQueueName ¶
func (qv *QueueValidator) ValidateQueueName(name string) error
ValidateQueueName validates a queue name
type RBACCommands ¶
type RBACCommands struct {
// contains filtered or unexported fields
}
RBACCommands provides commands for RBAC management
func NewRBACCommands ¶
func NewRBACCommands(db *gorm.DB) *RBACCommands
NewRBACCommands creates a new RBACCommands instance
func (*RBACCommands) AssignPermission ¶
func (r *RBACCommands) AssignPermission(permissionSlug, roleSlug string) error
AssignPermission assigns a permission to a role
func (*RBACCommands) AssignRole ¶
func (r *RBACCommands) AssignRole(userEmail, roleSlug string) error
AssignRole assigns a role to a user
func (*RBACCommands) CreatePermission ¶
func (r *RBACCommands) CreatePermission(name, slug, resource, action, description string) error
CreatePermission creates a new permission
func (*RBACCommands) CreateRole ¶
func (r *RBACCommands) CreateRole(name, slug, description string) error
CreateRole creates a new role
func (*RBACCommands) ListPermissions ¶
func (r *RBACCommands) ListPermissions() error
ListPermissions lists all permissions
func (*RBACCommands) SeedDefaultRBACData ¶
func (r *RBACCommands) SeedDefaultRBACData() error
SeedDefaultRBACData seeds default roles and permissions
func (*RBACCommands) ShowUserPermissions ¶
func (r *RBACCommands) ShowUserPermissions(userEmail string) error
ShowUserPermissions shows all permissions for a user
type ScheduledTask ¶
type SeedCommand ¶
type SeedCommand struct {
// contains filtered or unexported fields
}
SeedCommand handles seeder commands
func NewSeedCommand ¶
func NewSeedCommand(manager *connection.Manager) *SeedCommand
NewSeedCommand creates a new seed command
type SeederFile ¶
type SimpleModuleGenerator ¶
type SimpleModuleGenerator struct {
ModuleName string
Flags ModuleFlags
}
SimpleModuleGenerator handles the creation of new modules (simplified version)
func NewSimpleModuleGenerator ¶
func NewSimpleModuleGenerator(moduleName string, flags ModuleFlags) *SimpleModuleGenerator
NewSimpleModuleGenerator creates a new SimpleModuleGenerator instance
func (*SimpleModuleGenerator) Generate ¶
func (mg *SimpleModuleGenerator) Generate() error
Generate creates a new module
type StorageCommands ¶
type StorageCommands struct{}
StorageCommands contains all storage-related commands
func NewStorageCommands ¶
func NewStorageCommands() *StorageCommands
NewStorageCommands creates a new storage commands instance
func (*StorageCommands) Register ¶
func (sc *StorageCommands) Register()
Register registers all storage commands
func (*StorageCommands) StorageBackup ¶
func (sc *StorageCommands) StorageBackup(ctx *cli.Context) error
StorageBackup backs up storage files
func (*StorageCommands) StorageClean ¶
func (sc *StorageCommands) StorageClean(ctx *cli.Context) error
StorageClean cleans storage files
func (*StorageCommands) StorageDelete ¶
func (sc *StorageCommands) StorageDelete(ctx *cli.Context) error
StorageDelete deletes file from storage
func (*StorageCommands) StorageDownload ¶
func (sc *StorageCommands) StorageDownload(ctx *cli.Context) error
StorageDownload downloads file from storage
func (*StorageCommands) StorageLink ¶
func (sc *StorageCommands) StorageLink(ctx *cli.Context) error
StorageLink creates symbolic link to storage
func (*StorageCommands) StorageList ¶
func (sc *StorageCommands) StorageList(ctx *cli.Context) error
StorageList lists storage files
func (*StorageCommands) StorageRestore ¶
func (sc *StorageCommands) StorageRestore(ctx *cli.Context) error
StorageRestore restores storage files
func (*StorageCommands) StorageSize ¶
func (sc *StorageCommands) StorageSize(ctx *cli.Context) error
StorageSize gets storage size
func (*StorageCommands) StorageSync ¶
func (sc *StorageCommands) StorageSync(ctx *cli.Context) error
StorageSync syncs storage with remote
func (*StorageCommands) StorageUpload ¶
func (sc *StorageCommands) StorageUpload(ctx *cli.Context) error
StorageUpload uploads file to storage
type StorageFile ¶
type StorageValidator ¶
type StorageValidator struct {
// contains filtered or unexported fields
}
StorageValidator provides storage validation
func NewStorageValidator ¶
func NewStorageValidator() *StorageValidator
NewStorageValidator creates a new storage validator
func (*StorageValidator) ValidateBucketName ¶
func (sv *StorageValidator) ValidateBucketName(name string) error
ValidateBucketName validates a bucket name
func (*StorageValidator) ValidateStoragePath ¶
func (sv *StorageValidator) ValidateStoragePath(path string) error
ValidateStoragePath validates a storage path
type UtilityCommands ¶
type UtilityCommands struct{}
UtilityCommands contains all utility-related commands
func NewUtilityCommands ¶
func NewUtilityCommands() *UtilityCommands
NewUtilityCommands creates a new utility commands instance
func (*UtilityCommands) CacheClear ¶
func (uc *UtilityCommands) CacheClear(ctx *cli.Context) error
CacheClear clears application cache
func (*UtilityCommands) CacheForget ¶
func (uc *UtilityCommands) CacheForget(ctx *cli.Context) error
CacheForget removes specific cache key
func (*UtilityCommands) Decrypt ¶
func (uc *UtilityCommands) Decrypt(ctx *cli.Context) error
Decrypt decrypts a value
func (*UtilityCommands) Encrypt ¶
func (uc *UtilityCommands) Encrypt(ctx *cli.Context) error
Encrypt encrypts a value
func (*UtilityCommands) EventGenerate ¶
func (uc *UtilityCommands) EventGenerate(ctx *cli.Context) error
EventGenerate generates event and listener
func (*UtilityCommands) Hash ¶
func (uc *UtilityCommands) Hash(ctx *cli.Context) error
Hash hashes a value
func (*UtilityCommands) KeyGenerate ¶
func (uc *UtilityCommands) KeyGenerate(ctx *cli.Context) error
KeyGenerate generates application key
func (*UtilityCommands) Register ¶
func (uc *UtilityCommands) Register()
Register registers all utility commands
func (*UtilityCommands) RouteList ¶
func (uc *UtilityCommands) RouteList(ctx *cli.Context) error
RouteList lists all routes
func (*UtilityCommands) ScheduleRun ¶
func (uc *UtilityCommands) ScheduleRun(ctx *cli.Context) error
ScheduleRun runs scheduled tasks
func (*UtilityCommands) ScheduleWork ¶
func (uc *UtilityCommands) ScheduleWork(ctx *cli.Context) error
ScheduleWork starts schedule worker
func (*UtilityCommands) VendorPublish ¶
func (uc *UtilityCommands) VendorPublish(ctx *cli.Context) error
VendorPublish publishes vendor assets
type ValidationResult ¶
ValidationResult represents the result of validation
func NewValidationResult ¶
func NewValidationResult() *ValidationResult
NewValidationResult creates a new validation result
func (*ValidationResult) AddError ¶
func (vr *ValidationResult) AddError(field, message string)
AddError adds an error to the result
func (*ValidationResult) AddWarning ¶
func (vr *ValidationResult) AddWarning(field, message string)
AddWarning adds a warning to the result
func (*ValidationResult) GetErrorMessages ¶
func (vr *ValidationResult) GetErrorMessages() []string
GetErrorMessages gets all error messages
func (*ValidationResult) GetWarningMessages ¶
func (vr *ValidationResult) GetWarningMessages() []string
GetWarningMessages gets all warning messages
func (*ValidationResult) HasErrors ¶
func (vr *ValidationResult) HasErrors() bool
HasErrors checks if there are errors
func (*ValidationResult) HasWarnings ¶
func (vr *ValidationResult) HasWarnings() bool
HasWarnings checks if there are warnings
type ValidationRule ¶
type ValidationRule struct {
Required bool
Min int
Max int
Pattern string
Custom func(interface{}) error
}
ValidationRule defines a validation rule
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator provides validation functionality for CLI commands
func (*Validator) AddRule ¶
func (v *Validator) AddRule(field string, rule ValidationRule)
AddRule adds a validation rule
func (*Validator) ValidateAll ¶
ValidateAll validates all fields