builder

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TemplatesFS embed.FS

Functions

func GetTemplate

func GetTemplate(path string) (*template.Template, error)

GetTemplate loads a template from the embedded filesystem

func ValidateRoot

func ValidateRoot(root string) error

ValidateRoot checks if the root directory exists

Types

type AppBuilder

type AppBuilder struct{}

AppBuilder builds Wails desktop applications

func NewAppBuilder

func NewAppBuilder() *AppBuilder

NewAppBuilder creates a new app builder

func (*AppBuilder) Build

func (a *AppBuilder) Build(config Config) error

Build creates a Wails desktop application

func (*AppBuilder) Validate

func (a *AppBuilder) Validate(config Config) error

Validate validates the build configuration

type BuildError

type BuildError struct {
	Message string
	Err     error
}

BuildError represents a build error

func NewBuildError

func NewBuildError(message string, err error) BuildError

NewBuildError creates a new build error

func (BuildError) Error

func (e BuildError) Error() string

type Builder

type Builder interface {
	Build(config Config) error
	Validate(config Config) error
}

Builder interface for different build types

type CliBuilder

type CliBuilder struct{}

CliBuilder builds CLI applications based on cmd/redi

func NewCliBuilder

func NewCliBuilder() *CliBuilder

NewCliBuilder creates a new CLI builder

func (*CliBuilder) Build

func (c *CliBuilder) Build(config Config) error

Build creates a CLI application project

func (*CliBuilder) Validate

func (c *CliBuilder) Validate(config Config) error

Validate validates the build configuration

type Config

type Config struct {
	Root       string
	Output     string
	AppName    string
	Platform   string
	Extensions []string
	ConfigFile string
}

Config represents build configuration

type EmbedBuilder

type EmbedBuilder struct{}

EmbedBuilder builds embedded project source code

func NewEmbedBuilder

func NewEmbedBuilder() *EmbedBuilder

NewEmbedBuilder creates a new embed builder

func (*EmbedBuilder) Build

func (e *EmbedBuilder) Build(config Config) error

Build creates an embedded executable project

func (*EmbedBuilder) Validate

func (e *EmbedBuilder) Validate(config Config) error

Validate validates the build configuration

type TemplateData

type TemplateData struct {
	// Common fields
	ModuleName      string
	ProjectName     string
	BinaryName      string
	AppName         string
	RootDir         string
	Extensions      []string
	RediVersion     string
	IsSourceInstall bool
	ReplaceDir      string
}

TemplateData contains common data for all templates

Jump to

Keyboard shortcuts

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