Documentation ¶
Index ¶
- Constants
- func BuildColorString(colors ...string) string
- func ColoredLogWrapper(l logger.LogLevel, s string) string
- func Craft(color, s any) string
- func GetProjectDirectoryPath(name string, absolute bool) string
- func GetQuickGoPath(p ...string) string
- func Logfile(output io.Writer) io.Writer
- func PrintLogo()
- type App
- func (a *App) CopyFileContent(proj *config.Project, file *os.File, f *quickfs.FSFile, raw bool) error
- func (a *App) ExecJS(targetDir string, scriptName string, args map[string]any) (err error)
- func (a *App) HttpHandler() http.Handler
- func (a *App) ListJSFiles() ([]string, error)
- func (a *App) ListProjectObjects() ([]*config.Project, error)
- func (a *App) ListProjects() ([]string, error)
- func (a *App) LoadCurrentProject(directory string) (err error)
- func (a *App) Logger(level logger.LogLevel, output io.Writer) *logger.Logger
- func (a *App) NewProject(conf SimpleProject) (proj *config.Project, err error)
- func (a *App) ReadFile(path string) ([]byte, error)
- func (a *App) ReadProjectConfig(name string) (proj *config.Project, closeFiles func(), err error)
- func (a *App) SaveJS(path string) error
- func (a *App) WriteExampleProjectConfig(directory string) (err error)
- func (a *App) WriteFile(data []byte, path string) error
- func (a *App) WriteProject(proj *config.Project, directory string, raw bool) error
- func (a *App) WriteProjectConfig(proj *config.Project) error
- type AppHook
- type AppListProjectsHook
- type AppServeHook
- type LogHandler
- type ProjectHook
- type ProjectTemplateContext
- type ProjectWithDirHook
- type SimpleProject
Constants ¶
View Source
const ( HookQuickGoLoaded = "quickgo.loaded" HookQuickGoServer = "quickgo.server" HookQuickGoListProjects = "quickgo.funcs.listProjects" HookProjectLoaded = "quickgo.project.loaded" HookProjectBeforeLoad = "quickgo.project.beforeLoad" HookProjectExample = "quickgo.project.example" HookProjectBeforeSave = "quickgo.project.beforeSave" HookProjectAfterSave = "quickgo.project.afterSave" HookProjectBeforeWrite = "quickgo.project.beforeWrite" HookProjectAfterWrite = "quickgo.project.afterWrite" )
View Source
const ( CMD_Blue = "\033[34m" CMD_Cyan = "\033[36m" CMD_Green = "\033[32m" CMD_BRIGHT_Purple = "\033[35;1m" CMD_Purple = "\033[35m" CMD_Red = "\033[31m" CMD_Yellow = "\033[33m" CMD_Bold = "\033[1m" CMD_Underline = "\033[4m" CMD_Reset = "\033[0m" )
Variables ¶
This section is empty.
Functions ¶
func BuildColorString ¶ added in v2.3.3
func GetProjectDirectoryPath ¶ added in v2.3.8
func GetQuickGoPath ¶ added in v2.3.8
Types ¶
type App ¶
type App struct { Config *config.QuickGo `yaml:"config"` // The configuration for QuickGo. ProjectConfig *config.Project `yaml:"projectConfig"` // The configuration for the project. Patterns []string `yaml:"patterns"` // The patterns for the templates. AppFS fs.FS `yaml:"-"` // The file system for the app, resides in the userprofile home directory. ProjectFS fs.FS `yaml:"-"` // The file system for the project, resides in the project (working) directory. // contains filtered or unexported fields }
func (*App) CopyFileContent ¶
func (*App) HttpHandler ¶ added in v2.3.5
func (*App) ListJSFiles ¶ added in v2.4.4
func (*App) ListProjectObjects ¶ added in v2.3.5
func (*App) ListProjects ¶
func (*App) LoadCurrentProject ¶ added in v2.4.2
Load the project configuration from the current working directory.
func (*App) NewProject ¶ added in v2.4.2
func (a *App) NewProject(conf SimpleProject) (proj *config.Project, err error)
func (*App) ReadProjectConfig ¶
func (*App) WriteExampleProjectConfig ¶
Write an example configuration for the user.
func (*App) WriteProject ¶
type AppListProjectsHook ¶
quickgo.funcs.listProjects
type AppServeHook ¶
quickgo.server
type LogHandler ¶ added in v2.3.5
func (*LogHandler) ServeHTTP ¶ added in v2.3.5
func (h *LogHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)
type ProjectHook ¶
quickgo.project.loaded quickgo.project.example quickgo.project.beforeSave quickgo.project.afterSave
type ProjectTemplateContext ¶
type ProjectTemplateContext struct { Project *config.Project File *quickfs.FSFile Dir *quickfs.FSDirectory Parent *quickfs.FSDirectory ObjectList any Content string }
type ProjectWithDirHook ¶
quickgo.project.beforeWrite quickgo.project.afterWrite quickgo.project.beforeLoad
Source Files ¶
Click to show internal directories.
Click to hide internal directories.