Documentation ¶
Index ¶
- Constants
- Variables
- type Build
- type BuildOption
- type Doc
- type Docs
- type Info
- type ModuleDef
- type ModuleDefs
- type Project
- func (p *Project) CleanKey() string
- func (p *Project) DatabaseEngineDefault() string
- func (p *Project) DatabaseEngines() []string
- func (p *Project) DescriptionSafe() string
- func (p *Project) Executable() string
- func (p *Project) GoVersion() string
- func (p *Project) HasModule(key string) bool
- func (p *Project) IconSafe() string
- func (p *Project) ModuleArgExport(pSvc *Service, logger util.Logger) (*model.Args, error)
- func (p *Project) NameSafe() string
- func (p *Project) Title() string
- func (p *Project) ToMap() util.ValueMap
- func (p *Project) ToTemplateContext(configVars util.KeyTypeDescs, portOffsets map[string]int, linebreak string) *TemplateContext
- func (p *Project) WebPath() string
- type Projects
- func (p Projects) AllModules() []string
- func (p Projects) Get(key string) *Project
- func (p Projects) Keys() []string
- func (p Projects) Root() *Project
- func (p Projects) Tags() []string
- func (p Projects) Titles() []string
- func (p Projects) WithTags(tags ...string) Projects
- func (p Projects) WithoutTags(tags ...string) Projects
- type Service
- func (s *Service) ByPath(path string) *Project
- func (s *Service) Default() *Project
- func (s *Service) DeleteExportEnum(fs filesystem.FileLoader, e string, logger util.Logger) error
- func (s *Service) DeleteExportModel(fs filesystem.FileLoader, mdl string, logger util.Logger) error
- func (s *Service) Get(key string) (*Project, error)
- func (s *Service) GetFile(key string) json.RawMessage
- func (s *Service) GetFilesystem(prj *Project) (filesystem.FileLoader, error)
- func (s *Service) Keys() []string
- func (s *Service) Projects() Projects
- func (s *Service) Refresh(logger util.Logger) (Projects, error)
- func (s *Service) Save(prj *Project, logger util.Logger) error
- func (s *Service) SaveExportEnum(fs filesystem.FileLoader, e *enum.Enum) error
- func (s *Service) SaveExportGroups(fs filesystem.FileLoader, g model.Groups) error
- func (s *Service) SaveExportModel(fs filesystem.FileLoader, mdl *model.Model) error
- func (s *Service) Search(q string) (result.Results, error)
- type TemplateContext
- func (t *TemplateContext) BuildAndroid() bool
- func (t *TemplateContext) BuildDesktop() bool
- func (t *TemplateContext) BuildIOS() bool
- func (t *TemplateContext) BuildMobile() bool
- func (t *TemplateContext) BuildNotarize() bool
- func (t *TemplateContext) BuildWASM() bool
- func (t *TemplateContext) CIContent() string
- func (t *TemplateContext) CleanKey() string
- func (t *TemplateContext) ConfigVarsContent() string
- func (t *TemplateContext) DatabaseUIOpts() (bool, bool, bool)
- func (t *TemplateContext) DatabaseUIReadOnly() bool
- func (t *TemplateContext) DatabaseUISQLEditor() bool
- func (t *TemplateContext) DatabaseUISaveUser() bool
- func (t *TemplateContext) ExplainPrefix() string
- func (t *TemplateContext) ExtraFilesContent() string
- func (t *TemplateContext) ExtraFilesDocker() string
- func (t *TemplateContext) GoBinaryContent() string
- func (t *TemplateContext) GoBinarySafe() string
- func (t *TemplateContext) GoVersionSafe() string
- func (t *TemplateContext) HasAccount() bool
- func (t *TemplateContext) HasDatabaseModule() bool
- func (t *TemplateContext) HasModule(key string) bool
- func (t *TemplateContext) HasModules(keys ...string) bool
- func (t *TemplateContext) HasSlack() bool
- func (t *TemplateContext) HasUser() bool
- func (t *TemplateContext) IgnoredQuoted() string
- func (t *TemplateContext) IgnoredSetting() string
- func (t *TemplateContext) IsArmAndMips() bool
- func (t *TemplateContext) IsNotarized() bool
- func (t *TemplateContext) KeyProper() string
- func (t *TemplateContext) ModuleMarkdown() string
- func (t *TemplateContext) NameCompressed() string
- func (t *TemplateContext) Placeholder(idx int) string
- func (t *TemplateContext) PortIncremented(i int) int
- func (t *TemplateContext) SQLServer() bool
- func (t *TemplateContext) SourceTrimmed() string
- func (t *TemplateContext) Title() string
- func (t *TemplateContext) TypeUUID() string
- func (t *TemplateContext) UsesLib() bool
- type ValidationError
Constants ¶
View Source
const ConfigDir = "." + util.AppKey
View Source
const DefaultGoVersion = "1.21"
Variables ¶
View Source
var AllBuildOptions = []*BuildOption{
{Key: "simple", Title: "Simple", Description: "Only build Linux amd64 and a single Docker image (ignores all other build options)"},
{Key: "private", Title: "Private", Description: "This project is not public (affects publishing)"},
{Key: "changelog", Title: "Changelog", Description: "Generate changelogs from Github commits"},
{Key: "testsFail", Title: "Tests Fail", Description: "If set, Docker build will fail unless all tests pass"},
{Key: "desktop", Title: "Desktop", Description: "Webview-based applications for the three major operating systems (requires \"desktop\" module)"},
{Key: "notarize", Title: "Notarize", Description: "Sends build artifacts to Apple for notarization (requires \"notarize\" module)"},
{Key: "signing", Title: "Signing", Description: "Signs the checksums using gpg"},
{Key: "android", Title: "Android", Description: "Builds the application as an Android library and webview-based APK (requires \"android\" module)"},
{Key: "ios", Title: "iOS", Description: "Builds the application as an iOS framework and webview-based app (requires \"ios\" module)"},
{Key: "wasm", Title: "WASM", Description: "Builds the application for WebAssembly (requires the \"wasm\" module)"},
{Key: "x86", Title: "32-bit x86", Description: "Builds 32-bit versions of the products"},
{Key: "windows-arm", Title: "Windows ARM", Description: "Builds the application for Windows on ARM and ARM64 architectures"},
{Key: "linux-arm", Title: "Linux ARM", Description: "Builds the application for Linux on ARM and ARM64 architectures"},
{Key: "linux-mips", Title: "Linux MIPS", Description: "Builds the application for Linux on MIPS architectures"},
{Key: "linux-odd", Title: "Linux Odd", Description: "Builds the application for Linux using ppc64, ppc64le, riscv64, and s390x"},
{Key: "aix", Title: "AIX", Description: "Builds the application for AIX"},
{Key: "dragonfly", Title: "Dragonfly", Description: "Builds the application for Dragonfly"},
{Key: "illumos", Title: "Illumos", Description: "Builds the application for Illumos"},
{Key: "freebsd", Title: "FreeBSD", Description: "Builds the application for FreeBSD"},
{Key: "netbsd", Title: "NetBSD", Description: "Builds the application for NetBSD"},
{Key: "openbsd", Title: "OpenBSD", Description: "Builds the application for OpenBSD"},
{Key: "plan9", Title: "Plan 9", Description: "Builds the application for Plan 9"},
{Key: "solaris", Title: "Solaris", Description: "Builds the application for Solaris"},
{Key: "homebrew", Title: "Homebrew", Description: "Publishes the builds to Homebrew"},
{Key: "nfpms", Title: "NFPMS", Description: "Builds the application as RPMs, DEBs, and APKs for various Linux flavors"},
{Key: "bom", Title: "BOM", Description: "Creates a bill of materials for each binary produced by the build"},
{Key: "snapcraft", Title: "Snapcraft", Description: "Publishes the application as a Ubuntu Snap "},
}
View Source
var DefaultIcon = "code"
View Source
var Helpers = func() map[string][]string { ret := map[string][]string{} add := func(k string, v string) { ret[k] = []string{v} } add("key", "The key of your project, lowercase letters only") add("name", "The project name is displayed in many places") add("icon", "The key of the SVG image used for your project's favicon and app icon") add("exec", "Your application's executable name, defaults to key") add("version", "Semantic version of the project") add("package", "Full Golang package, like github.com/org/key") add("args", "Arguments for your project when launched") add("port", "The TCP port used by your project's HTTP server") add("modules", "Project Forge modules used by this project") add("ignore", "Files ignored by your project") add("tags", "Tags for your project, not really used anywhere yet") add("org", "The Github organization responsible for this project") add("authorID", "The GitHub handle of the author of this project") add("authorName", "The full name of the author of this project") add("authorEmail", "The email address of the author of this project") add("team", "The team that owns this project") add("license", "The software license used by this project") add("homepage", "The main web page for this project") add("sourcecode", "The URL of this project's source repository") add("summary", "A one-line summary of this project") add("description", "A full multi-line description of this project") add("ci", "When to run CI") add("homebrew", "Override the URL to download Homebrew assets from") add("bundle", "App bundle used in iOS and macOS applications") add("signingIdentity", "Keychain identity to use for signing binaries") add("notarizeEmail", "Email address used for Apple notarization, defaults to owner") add("databaseEngine", "Primary database engine, used for DDL and seed data") add("slack", "Slack webhook for notifying after successful releases") add("channels", "Various communication channels used by this project") add("javaPackage", "The Java package used by the Android application") add("goVersion", "The version used for Go, defaults to \""+DefaultGoVersion+"\"") add("goBinary", "The binary used for Go, defaults to \"go\"") add("configVars", "Configuration variables for code generation") add("extraFiles", "Additional files to include in the builds") add("deployments", "Files that track deployment of this app") add("envvars", "additional environment variables used by this project") add("docs", "documentation resources for this project") return ret }()
Functions ¶
This section is empty.
Types ¶
type Build ¶
type Build struct { Private bool `json:"private,omitempty"` Changelog bool `json:"changelog,omitempty"` TestsFail bool `json:"testsFail,omitempty"` Desktop bool `json:"desktop,omitempty"` Notarize bool `json:"notarize,omitempty"` Signing bool `json:"signing,omitempty"` Simple bool `json:"simple,omitempty"` Android bool `json:"android,omitempty"` IOS bool `json:"iOS,omitempty"` WASM bool `json:"wasm,omitempty"` X86 bool `json:"x86,omitempty"` WindowsARM bool `json:"windowsARM,omitempty"` LinuxARM bool `json:"linuxARM,omitempty"` LinuxMIPS bool `json:"linuxMIPS,omitempty"` LinuxOdd bool `json:"linuxOdd,omitempty"` AIX bool `json:"aix,omitempty"` Dragonfly bool `json:"dragonfly,omitempty"` Illumos bool `json:"illumos,omitempty"` FreeBSD bool `json:"freeBSD,omitempty"` NetBSD bool `json:"netBSD,omitempty"` OpenBSD bool `json:"openBSD,omitempty"` Plan9 bool `json:"plan9,omitempty"` Solaris bool `json:"solaris,omitempty"` Homebrew bool `json:"homebrew,omitempty"` NFPMS bool `json:"nfpms,omitempty"` BOM bool `json:"bom,omitempty"` Snapcraft bool `json:"snapcraft,omitempty"` }
func BuildFromMap ¶
type BuildOption ¶
type Info ¶
type Info struct { Org string `json:"org,omitempty"` AuthorID string `json:"authorID,omitempty"` AuthorName string `json:"authorName,omitempty"` AuthorEmail string `json:"authorEmail,omitempty"` Team string `json:"team,omitempty"` License string `json:"license,omitempty"` Homepage string `json:"homepage,omitempty"` Sourcecode string `json:"sourcecode,omitempty"` Summary string `json:"summary,omitempty"` Description string `json:"description,omitempty"` CI string `json:"ci,omitempty"` Homebrew string `json:"homebrew,omitempty"` Bundle string `json:"bundle,omitempty"` SigningIdentity string `json:"signingIdentity,omitempty"` NotarizeEmail string `json:"notarizeEmail,omitempty"` DatabaseEngine string `json:"databaseEngine,omitempty"` Slack string `json:"slack,omitempty"` Channels []string `json:"channels,omitempty"` JavaPackage string `json:"javaPackage,omitempty"` GoVersion string `json:"goVersion,omitempty"` GoBinary string `json:"goBinary,omitempty"` ConfigVars util.KeyTypeDescs `json:"configVars,omitempty"` ExtraFiles []string `json:"extraFiles,omitempty"` Deployments []string `json:"deployments,omitempty"` EnvVars []string `json:"envVars,omitempty"` Docs Docs `json:"docs,omitempty"` ModuleDefs ModuleDefs `json:"moduleDefs,omitempty"` }
func (*Info) AuthorIDSafe ¶
func (*Info) NotarizationEmail ¶ added in v0.10.35
func (*Info) SigningIdentityTrimmed ¶
type ModuleDefs ¶
type ModuleDefs []*ModuleDef
type Project ¶
type Project struct { Key string `json:"key"` Name string `json:"name,omitempty"` Icon string `json:"icon,omitempty"` Exec string `json:"exec,omitempty"` Version string `json:"version"` Package string `json:"package,omitempty"` Args string `json:"args,omitempty"` Port int `json:"port,omitempty"` Modules []string `json:"modules"` Ignore []string `json:"ignore,omitempty"` Tags []string `json:"tags"` Info *Info `json:"info,omitempty"` Theme *theme.Theme `json:"theme,omitempty"` Build *Build `json:"build,omitempty"` ExportArgs *model.Args `json:"-"` Config util.ValueMap `json:"-"` Path string `json:"-"` Parent string `json:"-"` Error string `json:"error,omitempty"` }
func NewProject ¶
func (*Project) DatabaseEngineDefault ¶ added in v0.11.28
func (*Project) DatabaseEngines ¶ added in v0.11.28
func (*Project) DescriptionSafe ¶
func (*Project) Executable ¶
func (*Project) ModuleArgExport ¶ added in v0.3.11
func (*Project) ToTemplateContext ¶
func (p *Project) ToTemplateContext(configVars util.KeyTypeDescs, portOffsets map[string]int, linebreak string) *TemplateContext
type Projects ¶
type Projects []*Project
func (Projects) AllModules ¶
func (Projects) WithoutTags ¶ added in v0.3.15
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService() *Service
func (*Service) DeleteExportEnum ¶ added in v0.6.14
func (s *Service) DeleteExportEnum(fs filesystem.FileLoader, e string, logger util.Logger) error
func (*Service) DeleteExportModel ¶ added in v0.3.12
func (s *Service) DeleteExportModel(fs filesystem.FileLoader, mdl string, logger util.Logger) error
func (*Service) GetFilesystem ¶
func (s *Service) GetFilesystem(prj *Project) (filesystem.FileLoader, error)
func (*Service) SaveExportEnum ¶ added in v0.6.14
func (s *Service) SaveExportEnum(fs filesystem.FileLoader, e *enum.Enum) error
func (*Service) SaveExportGroups ¶ added in v0.4.0
func (s *Service) SaveExportGroups(fs filesystem.FileLoader, g model.Groups) error
func (*Service) SaveExportModel ¶ added in v0.3.12
func (s *Service) SaveExportModel(fs filesystem.FileLoader, mdl *model.Model) error
type TemplateContext ¶
type TemplateContext struct { Key string `json:"key"` Name string `json:"name,omitempty"` Exec string `json:"exec,omitempty"` Version string `json:"version"` Package string `json:"package,omitempty"` Args string `json:"args,omitempty"` Port int `json:"port,omitempty"` ConfigVars util.KeyTypeDescs `json:"configVars,omitempty"` PortOffsets map[string]int `json:"portOffsets,omitempty"` Ignore []string `json:"ignore,omitempty"` IgnoreGrep string `json:"ignoreGrep,omitempty"` Modules []string `json:"modules,omitempty"` Tags []string `json:"tags,omitempty"` ExportArgs *model.Args `json:"exportArgs,omitempty"` Config util.ValueMap `json:"config,omitempty"` Info *Info `json:"info,omitempty"` Build *Build `json:"build,omitempty"` Theme *theme.Theme `json:"theme,omitempty"` DatabaseEngine string `json:"databaseEngine,omitempty"` Linebreak string `json:"-"` }
func (*TemplateContext) BuildAndroid ¶
func (t *TemplateContext) BuildAndroid() bool
func (*TemplateContext) BuildDesktop ¶ added in v0.11.11
func (t *TemplateContext) BuildDesktop() bool
func (*TemplateContext) BuildIOS ¶
func (t *TemplateContext) BuildIOS() bool
func (*TemplateContext) BuildMobile ¶ added in v0.2.25
func (t *TemplateContext) BuildMobile() bool
func (*TemplateContext) BuildNotarize ¶ added in v0.11.11
func (t *TemplateContext) BuildNotarize() bool
func (*TemplateContext) BuildWASM ¶ added in v0.11.14
func (t *TemplateContext) BuildWASM() bool
func (*TemplateContext) CIContent ¶
func (t *TemplateContext) CIContent() string
func (*TemplateContext) CleanKey ¶
func (t *TemplateContext) CleanKey() string
func (*TemplateContext) ConfigVarsContent ¶ added in v0.2.9
func (t *TemplateContext) ConfigVarsContent() string
func (*TemplateContext) DatabaseUIOpts ¶ added in v0.2.21
func (t *TemplateContext) DatabaseUIOpts() (bool, bool, bool)
func (*TemplateContext) DatabaseUIReadOnly ¶ added in v0.2.21
func (t *TemplateContext) DatabaseUIReadOnly() bool
func (*TemplateContext) DatabaseUISQLEditor ¶ added in v0.2.21
func (t *TemplateContext) DatabaseUISQLEditor() bool
func (*TemplateContext) DatabaseUISaveUser ¶ added in v0.9.13
func (t *TemplateContext) DatabaseUISaveUser() bool
func (*TemplateContext) ExplainPrefix ¶ added in v0.2.37
func (t *TemplateContext) ExplainPrefix() string
func (*TemplateContext) ExtraFilesContent ¶
func (t *TemplateContext) ExtraFilesContent() string
func (*TemplateContext) ExtraFilesDocker ¶
func (t *TemplateContext) ExtraFilesDocker() string
func (*TemplateContext) GoBinaryContent ¶
func (t *TemplateContext) GoBinaryContent() string
func (*TemplateContext) GoBinarySafe ¶
func (t *TemplateContext) GoBinarySafe() string
func (*TemplateContext) GoVersionSafe ¶
func (t *TemplateContext) GoVersionSafe() string
func (*TemplateContext) HasAccount ¶ added in v0.12.2
func (t *TemplateContext) HasAccount() bool
func (*TemplateContext) HasDatabaseModule ¶ added in v0.2.15
func (t *TemplateContext) HasDatabaseModule() bool
func (*TemplateContext) HasModule ¶
func (t *TemplateContext) HasModule(key string) bool
func (*TemplateContext) HasModules ¶ added in v0.11.28
func (t *TemplateContext) HasModules(keys ...string) bool
func (*TemplateContext) HasSlack ¶
func (t *TemplateContext) HasSlack() bool
func (*TemplateContext) HasUser ¶ added in v0.11.15
func (t *TemplateContext) HasUser() bool
func (*TemplateContext) IgnoredQuoted ¶
func (t *TemplateContext) IgnoredQuoted() string
func (*TemplateContext) IgnoredSetting ¶
func (t *TemplateContext) IgnoredSetting() string
func (*TemplateContext) IsArmAndMips ¶ added in v0.11.12
func (t *TemplateContext) IsArmAndMips() bool
func (*TemplateContext) IsNotarized ¶ added in v0.10.34
func (t *TemplateContext) IsNotarized() bool
func (*TemplateContext) KeyProper ¶
func (t *TemplateContext) KeyProper() string
func (*TemplateContext) ModuleMarkdown ¶
func (t *TemplateContext) ModuleMarkdown() string
func (*TemplateContext) NameCompressed ¶
func (t *TemplateContext) NameCompressed() string
func (*TemplateContext) Placeholder ¶ added in v0.9.6
func (t *TemplateContext) Placeholder(idx int) string
func (*TemplateContext) PortIncremented ¶
func (t *TemplateContext) PortIncremented(i int) int
func (*TemplateContext) SQLServer ¶ added in v0.9.6
func (t *TemplateContext) SQLServer() bool
func (*TemplateContext) SourceTrimmed ¶
func (t *TemplateContext) SourceTrimmed() string
func (*TemplateContext) Title ¶
func (t *TemplateContext) Title() string
func (*TemplateContext) TypeUUID ¶ added in v0.11.28
func (t *TemplateContext) TypeUUID() string
func (*TemplateContext) UsesLib ¶
func (t *TemplateContext) UsesLib() bool
type ValidationError ¶ added in v0.2.38
func Validate ¶ added in v0.2.38
func Validate(p *Project, fs filesystem.FileLoader, moduleDeps map[string][]string) []*ValidationError
Source Files ¶
Click to show internal directories.
Click to hide internal directories.