layout

package
v0.36.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2025 License: MIT Imports: 22 Imported by: 0

Documentation

Overview

Package layout provides functionality to scaffold a new Go web application project

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateBinaryChecksum added in v0.32.2

func CalculateBinaryChecksum(binaryPath string) (string, error)

func GetMailpitDownloadURL added in v0.32.2

func GetMailpitDownloadURL(version string) string

func GetTailwindDownloadURL added in v0.32.2

func GetTailwindDownloadURL(version string) string

func GetUsqlDownloadURL added in v0.32.2

func GetUsqlDownloadURL(version string) string

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

func ValidateBinaryChecksum(binaryPath, expectedChecksum string) error

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 Binary added in v0.32.2

type Binary struct {
	Version  string `json:"version,omitempty"`
	URL      string `json:"url,omitempty"`
	Checksum string `json:"checksum,omitempty"`
	Type     string `json:"type,omitempty"`
	Source   string `json:"source,omitempty"`
}

type Element

type Element struct {
	RootDir string
	SubDirs []Element
}

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.

Jump to

Keyboard shortcuts

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