templates

package
v3.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateTemplate

func GenerateTemplate(options *BaseTemplate) error

func Install

func Install(options *flags.Init) error

func ValidTemplateName

func ValidTemplateName(name string) bool

Types

type BaseTemplate

type BaseTemplate struct {
	Name        string `json:"name" description:"The name of the template"`
	ShortName   string `json:"shortname" description:"The short name of the template"`
	Author      string `json:"author" description:"The author of the template"`
	Description string `json:"description" description:"The template description"`
	HelpURL     string `json:"helpurl" description:"The help url for the template"`
	Version     string `json:"version" description:"The version of the template" default:"v0.0.1"`
	Dir         string `json:"-" description:"The directory to generate the template" default:"."`
	Frontend    string `json:"-" description:"The frontend directory to migrate"`
}

type Template

type Template struct {
	BaseTemplate
	Schema uint8 `json:"schema"`

	// Other data
	FS fs.FS `json:"-"`
	// contains filtered or unexported fields
}

Template holds data relating to a template including the metadata stored in template.yaml

type TemplateData

type TemplateData struct {
	Name        string
	Description string
	FS          fs.FS
}

func GetDefaultTemplates

func GetDefaultTemplates() []TemplateData

type TemplateOptions

type TemplateOptions struct {
	*flags.Init
	LocalModulePath string
	UseTypescript   bool
	WailsVersion    string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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