generator

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 29, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TemplUIComponents = []string{
	"button", "card", "input", "alert", "badge",
	"textarea", "label", "checkbox", "radio", "select",
	"switch", "form", "modal", "dialog", "tabs",
	"accordion", "sheet", "toast", "progress", "spinner",
}

TemplUIComponents defines the curated starter set of UI components.

Functions

func CreateProjectDirectories

func CreateProjectDirectories(config ProjectConfig) error

func GetAbsolutePath

func GetAbsolutePath(basePath, projectName string) (string, error)

func InitializeGit

func InitializeGit(ctx context.Context, projectPath string, skipGit bool) error

func NewProjectGenerator

func NewProjectGenerator() interfaces.ProjectGenerator

func RenderSuccessOutput

func RenderSuccessOutput(output SuccessOutput) string

Types

type ProjectConfig

type ProjectConfig struct {
	ProjectName    string `json:"project_name" validate:"required,project_name"`
	ModulePath     string `json:"module_path" validate:"required,module_path"`
	DatabaseDriver string `json:"database_driver" validate:"required,oneof=go-libsql sqlite3 postgres"`
	EnvPrefix      string `json:"env_prefix" validate:"required,env_prefix"`
	InitGit        bool   `json:"init_git"`
	OutputPath     string `json:"output_path" validate:"required"`
}

ProjectConfig holds all configuration for generating a new project.

type SuccessOutput

type SuccessOutput struct {
	ProjectName    string
	ProjectPath    string
	ModulePath     string
	DatabaseDriver string
	GitInitialized bool
	NoColor        bool
}

Directories

Path Synopsis
Package interfaces defines consumer-owned interfaces for generator components.
Package interfaces defines consumer-owned interfaces for generator components.
Package template provides a template rendering engine for generating project files.
Package template provides a template rendering engine for generating project files.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL