Documentation
¶
Overview ¶
Package layout provides functionality to scaffold a new Go web application project
Index ¶
- func CalculateBinaryChecksum(binaryPath string) (string, error)
- func GetMailpitDownloadURL(version string) string
- func GetTailwindDownloadURL(version string) string
- func GetUsqlDownloadURL(version string) string
- func Scaffold(targetDir, projectName, repo, database, cssFramework string, ...) error
- func ValidateBinaryChecksum(binaryPath, expectedChecksum string) error
- type AndurelLock
- type Binary
- type Element
- type TemplateData
- type TmplTarget
- type TmplTargetPath
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculateBinaryChecksum ¶ added in v0.32.2
func GetMailpitDownloadURL ¶ added in v0.32.2
func GetTailwindDownloadURL ¶ added in v0.32.2
func GetUsqlDownloadURL ¶ added in v0.32.2
func Scaffold ¶
func Scaffold( targetDir, projectName, repo, database, cssFramework string, extensionNames []string, ) error
Scaffold TODO: figure out a way to have full repo path on init, i.e. github.com/mbvlabs/andurel breaks because go mod tidy will look up that path and not find it
func ValidateBinaryChecksum ¶ added in v0.32.2
Types ¶
type AndurelLock ¶ added in v0.32.2
type AndurelLock struct {
Version string `json:"version"`
Binaries map[string]*Binary `json:"binaries"`
}
func NewAndurelLock ¶ added in v0.32.2
func NewAndurelLock() *AndurelLock
func ReadLockFile ¶ added in v0.32.2
func ReadLockFile(targetDir string) (*AndurelLock, error)
func (*AndurelLock) AddBinary ¶ added in v0.32.2
func (l *AndurelLock) AddBinary(name, version, url, checksum string)
func (*AndurelLock) WriteLockFile ¶ added in v0.32.2
func (l *AndurelLock) WriteLockFile(targetDir string) error
type TemplateData ¶
type TemplateData struct {
AppName string
ProjectName string
ModuleName string
Database string
CSSFramework string
GoVersion string
SessionKey string
SessionEncryptionKey string
TokenSigningKey string
Pepper string
Extensions []string
// contains filtered or unexported fields
}
TemplateData carries the values available to base templates and extension contributions. It wraps a Blueprint for structured data alongside project-level metadata.
func (*TemplateData) Blueprint ¶
func (td *TemplateData) Blueprint() *blueprint.Blueprint
Blueprint returns the underlying blueprint. If not yet initialized, creates a new one.
func (*TemplateData) Builder ¶
func (td *TemplateData) Builder() *blueprint.Builder
Builder returns a builder adapter wrapping the template data's blueprint. The return type satisfies the extensions.Builder interface.
func (*TemplateData) DatabaseDialect ¶
func (td *TemplateData) DatabaseDialect() string
DatabaseDialect returns the configured database for the template or an empty string when not available.
func (*TemplateData) GetModuleName ¶
func (td *TemplateData) GetModuleName() string
GetModuleName returns the module name for the project.
func (*TemplateData) SetBlueprint ¶
func (td *TemplateData) SetBlueprint(bp *blueprint.Blueprint)
SetBlueprint sets the blueprint for this template data.
type TmplTarget ¶
type TmplTarget string
type TmplTargetPath ¶
type TmplTargetPath string
Directories
¶
| Path | Synopsis |
|---|---|
|
Package blueprint provides structured types for scaffold configuration that support additive merges from multiple extensions without conflicts.
|
Package blueprint provides structured types for scaffold configuration that support additive merges from multiple extensions without conflicts. |
|
Package cmds holds commands being used for scaffolding
|
Package cmds holds commands being used for scaffolding |
|
Package extensions provides the framework for registering and applying extensions to the scaffold generation process.
|
Package extensions provides the framework for registering and applying extensions to the scaffold generation process. |