Documentation
¶
Index ¶
- func NewLogger(logLevel string, verbose bool, stderr io.Writer) *slog.Logger
- type AwsHelper
- func (helper *AwsHelper) AddCloudFrontAssets(originBucketName string, region string, awsProfile string) error
- func (helper *AwsHelper) CleanCloudFrontCache(stackName string, stage string, region string, awsProfile string) error
- func (helper *AwsHelper) RemoveCloudFrontAssets(originBucketName string, region string, awsProfile string) error
- type AwsSamHelper
- type EnvValueInfo
- type InitCmdTemplateInfo
- type RouteTemplateInfo
- type SamTomlTemplateInfo
- type SamYamlTemplateInfo
- type StageTemplateInfo
- type TailwindHelper
- type TemplHelper
- type TemplateHelper
- func (helper *TemplateHelper) CopyFile(filePath string, destinationPath string) error
- func (helper *TemplateHelper) CopyFromFs(fileTemplate embed.FS, templateFilePath string, outputFilePath string) error
- func (helper *TemplateHelper) CreateFromTemplate(fileTemplate embed.FS, templateFilePath string, outputFilePath string, ...) error
- func (helper *TemplateHelper) DeleteFile(filePath string) error
- func (helper *TemplateHelper) RenderToString(fileTemplate embed.FS, templateFilePath string, templateStruct interface{}) (string, error)
- func (helper *TemplateHelper) UpdateFromTemplate(templateFilePath string, outputFilePath string, templateStruct interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AwsHelper ¶
type AwsHelper struct{}
func NewAwsHelper ¶
func NewAwsHelper() AwsHelper
func (*AwsHelper) AddCloudFrontAssets ¶
func (*AwsHelper) CleanCloudFrontCache ¶
type AwsSamHelper ¶
type AwsSamHelper struct {
}
func NewAwsSamHelper ¶
func NewAwsSamHelper() AwsSamHelper
func (*AwsSamHelper) Build ¶
func (helper *AwsSamHelper) Build() error
func (*AwsSamHelper) DeleteStack ¶
func (helper *AwsSamHelper) DeleteStack(stage string, stackName string, awsProfile string) error
type EnvValueInfo ¶
type InitCmdTemplateInfo ¶
type RouteTemplateInfo ¶
type SamTomlTemplateInfo ¶
type SamYamlTemplateInfo ¶
type SamYamlTemplateInfo struct {
Timeout int
MemorySize int
UsedTemplateName string
ProjectName string
StageTemplateInfo StageTemplateInfo
}
type StageTemplateInfo ¶
type TailwindHelper ¶
type TailwindHelper struct {
Runtime string // runtime.GOOS
Arch string // runtime.GOARCH
Version string // default "v3.4.14"
ConfigOverride string // from gothic-config.json tailwindBinary field
}
func DefaultTailwindHelper ¶
func DefaultTailwindHelper() TailwindHelper
DefaultTailwindHelper creates a TailwindHelper using the current runtime's OS and architecture.
func NewTailwindHelper ¶
func NewTailwindHelper(goos, goarch string) TailwindHelper
func (*TailwindHelper) Build ¶
func (h *TailwindHelper) Build() error
Build runs the Tailwind CSS build (one-shot, minified).
func (*TailwindHelper) EnsureBinary ¶
func (h *TailwindHelper) EnsureBinary() (string, error)
EnsureBinary resolves the Tailwind binary path. Resolution order: 1. ConfigOverride if set (returns error if file doesn't exist) 2. Cached binary in OS cache directory 3. Download from GitHub releases
func (*TailwindHelper) WatchStart ¶
func (h *TailwindHelper) WatchStart() (*exec.Cmd, error)
WatchStart starts the Tailwind CSS watcher (non-blocking).
type TemplHelper ¶
type TemplHelper struct {
}
func NewTemplHelper ¶
func NewTemplHelper() TemplHelper
func (*TemplHelper) Render ¶
func (t *TemplHelper) Render() error
Render runs `templ generate`, but skips files whose contents are unchanged since the last successful run (tracked via .gothicCli/templ-cache.json).
Behavior:
- Scans the working directory for .templ files.
- If every file is cache-hit (and the matching _templ.go exists), it returns without invoking templ at all.
- Otherwise it runs templ per dirty file using the -f flag. If any per-file run fails (e.g. unsupported by the installed templ version), it falls back to a full-project generation.
- On success, updates and persists the cache.
type TemplateHelper ¶
type TemplateHelper struct {
InitCmdTemplateInfo InitCmdTemplateInfo
RouteTemplateInfo RouteTemplateInfo
}
func NewTemplateHelper ¶
func NewTemplateHelper() TemplateHelper
func (*TemplateHelper) CopyFile ¶
func (helper *TemplateHelper) CopyFile(filePath string, destinationPath string) error
func (*TemplateHelper) CopyFromFs ¶
func (*TemplateHelper) CreateFromTemplate ¶
func (*TemplateHelper) DeleteFile ¶
func (helper *TemplateHelper) DeleteFile(filePath string) error
func (*TemplateHelper) RenderToString ¶
func (*TemplateHelper) UpdateFromTemplate ¶
func (helper *TemplateHelper) UpdateFromTemplate(templateFilePath string, outputFilePath string, templateStruct interface{}) error
Directories
¶
| Path | Synopsis |
|---|---|
|
Package templ provides a content-hash cache for .templ files so that `templ generate` is only invoked for files whose contents (or generated counterparts) have changed since the last run.
|
Package templ provides a content-hash cache for .templ files so that `templ generate` is only invoked for files whose contents (or generated counterparts) have changed since the last run. |
Click to show internal directories.
Click to hide internal directories.