Documentation
¶
Overview ¶
Package program provides the main functionality of ForgeX
Index ¶
- type AdvancedTemplates
- type DBDriverTemplater
- type Docker
- type DockerTemplater
- type Driver
- type Framework
- type Project
- func (p *Project) CheckOS()
- func (p *Project) CreateFileWithInjection(pathToCreate string, projectPath string, fileName string, methodName string) error
- func (p *Project) CreateHtmxTemplates()
- func (p *Project) CreateMainFile() error
- func (p *Project) CreatePath(pathToCreate string, projectPath string) error
- func (p *Project) CreateWebsocketImports(appDir string)
- func (p *Project) ExitCLI(tprogram *tea.Program)
- type Templater
- type WorkflowTemplater
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdvancedTemplates ¶
type DBDriverTemplater ¶
type DockerTemplater ¶
type DockerTemplater interface {
Docker() []byte
}
type Framework ¶
type Framework struct {
// contains filtered or unexported fields
}
A Framework contains the name and templater for a given Framework
type Project ¶
type Project struct { ProjectName string Exit bool AbsolutePath string ProjectType flags.Framework DBDriver flags.Database Docker flags.Database FrameworkMap map[flags.Framework]Framework DBDriverMap map[flags.Database]Driver DockerMap map[flags.Database]Docker AdvancedOptions map[string]bool AdvancedTemplates AdvancedTemplates GitOptions flags.Git OSCheck map[string]bool }
A Project contains the data for the project folder being created, and methods that help with that process
func (*Project) CheckOS ¶
func (p *Project) CheckOS()
CheckOs checks Operation system and generates MakeFile and `go build` command Based on Project.Unixbase
func (*Project) CreateFileWithInjection ¶
func (p *Project) CreateFileWithInjection(pathToCreate string, projectPath string, fileName string, methodName string) error
CreateFileWithInjection creates the given file at the project path, and injects the appropriate template
func (*Project) CreateHtmxTemplates ¶
func (p *Project) CreateHtmxTemplates()
func (*Project) CreateMainFile ¶
CreateMainFile creates the project folders and files, and writes to them depending on the selected options
func (*Project) CreatePath ¶
CreatePath creates the given directory in the projectPath
func (*Project) CreateWebsocketImports ¶
type Templater ¶
type Templater interface { Main() []byte Server() []byte Routes() []byte TestHandler() []byte HtmxTemplRoutes() []byte HtmxTemplImports() []byte WebsocketImports() []byte }
A Templater has the methods that help build the files in the Project folder, and is specific to a Framework