Documentation ¶
Index ¶
- Constants
- Variables
- func CleanKey(key string) string
- type Build
- type BuildOption
- type Doc
- type Docs
- type Info
- type Migration
- type Migrations
- 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) error
- func (p *Project) NameSafe() string
- func (p *Project) Strings() []string
- func (p *Project) Title() string
- func (p *Project) ToCSV() ([]string, [][]string)
- func (p *Project) ToMap() util.ValueMap
- 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) ToCSV() ([]string, [][]string)
- func (p Projects) WithModules(modules ...string) Projects
- func (p Projects) WithTags(tags ...string) Projects
- func (p Projects) WithoutModules(modules ...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) MigrationList(ctx context.Context, prj *Project, logger util.Logger) (Migrations, error)
- 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 ValidationError
Constants ¶
View Source
const ConfigDir = "." + util.AppKey
View Source
const DebugOutputDir = "build/debug/"
View Source
const DefaultGoVersion = "1.23.0"
Variables ¶
View Source
var AllBuildOptions = []*BuildOption{
{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: "noScript", Title: "No Script", Description: "Prevents JavaScript from being emitted or utilized"},
{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: "safeMode", Title: "Safe Mode", Description: "Limits dangerous activities that can be performed on the server"},
{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 Fields = []string{"Key", "Name", "Icon", "Exec", "Version", "Package", "Args", "Port", "Modules", "Ignore", "Tags", "Theme", "Path", "Parent", "Error"}
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("ignoredFiles", "Files that are ignored by code generation") 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") add("acronyms", "Custom acronyms, intended to be displayed capitalized") return ret }()
Functions ¶
Types ¶
type Build ¶
type Build struct { Private bool `json:"private,omitempty"` Changelog bool `json:"changelog,omitempty"` TestsFail bool `json:"testsFail,omitempty"` NoScript bool `json:"noScript,omitempty"` Simple bool `json:"simple,omitempty"` Desktop bool `json:"desktop,omitempty"` Notarize bool `json:"notarize,omitempty"` Signing bool `json:"signing,omitempty"` SafeMode bool `json:"safeMode,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"` IgnoredFiles []string `json:"ignoredFiles,omitempty"` Deployments []string `json:"deployments,omitempty"` EnvVars []string `json:"envVars,omitempty"` Docs Docs `json:"docs,omitempty"` Acronyms []string `json:"acronyms,omitempty"` ModuleDefs ModuleDefs `json:"moduleDefs,omitempty"` }
func (*Info) AuthorIDSafe ¶
func (*Info) NotarizationEmail ¶ added in v0.10.35
func (*Info) SigningIdentityTrimmed ¶
type Migrations ¶ added in v1.3.8
type Migrations []*Migration
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"` Files []string `json:"files,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
type Projects ¶
type Projects []*Project
func (Projects) AllModules ¶
func (Projects) WithModules ¶ added in v1.2.22
func (Projects) WithoutModules ¶ added in v1.2.22
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) MigrationList ¶ added in v1.3.8
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 ValidationError ¶ added in v0.2.38
func Validate ¶ added in v0.2.38
func Validate(p *Project, fs filesystem.FileLoader, moduleDeps map[string][]string, dangerous []string) []*ValidationError
Source Files ¶
Click to show internal directories.
Click to hide internal directories.