Documentation
¶
Index ¶
- Constants
- Variables
- type Build
- type BuildOption
- type Info
- type ModuleDef
- type Project
- type Projects
- type Service
- func (s *Service) ByPath(path string) *Project
- func (s *Service) Get(key string) (*Project, error)
- func (s *Service) GetFilesystem(prj *Project) filesystem.FileLoader
- func (s *Service) Init() error
- func (s *Service) Keys() []string
- func (s *Service) Projects() Projects
- func (s *Service) Refresh(rootFiles filesystem.FileLoader) (Projects, error)
- func (s *Service) Save(prj *Project) error
- type TemplateContext
Constants ¶
View Source
const ConfigFilename = ".projectforge.json"
Variables ¶
View Source
var AllBuildOptions = []*BuildOption{
{Key: "publish", Title: "Publish", Description: "The release process will publish a full release"},
{Key: "desktop", Title: "Desktop", Description: "Webview-based applications for the three major operating systems"},
{Key: "notarize", Title: "Notarize", Description: "Sends build artifacts to Apple for notarization"},
{Key: "signing", Title: "Signing", Description: "Signs the checksums using gpg"},
{Key: "android", Title: "Android", Description: "Builds the application as an Android library"},
{Key: "ios", Title: "iOS", Description: "Builds the application as an iOS framework "},
{Key: "wasm", Title: "WASM", Description: "Builds the application for WebAssembly"},
{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: "snapcraft", Title: "Snapcraft", Description: "Publishes the application as a Ubuntu Snap "},
}
View Source
var DefaultIcon = "code"
Functions ¶
This section is empty.
Types ¶
type Build ¶
type Build struct {
Publish bool `json:"publish,omitempty"`
Desktop bool `json:"desktop,omitempty"`
Notarize bool `json:"notarize,omitempty"`
Signing bool `json:"signing,omitempty"`
Android bool `json:"android,omitempty"`
IOS bool `json:"iOS,omitempty"`
WASM bool `json:"wasm,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"`
Snapcraft bool `json:"snapcraft,omitempty"`
}
func BuildFromMap ¶
type BuildOption ¶
type Info ¶
type Info struct {
Org string `json:"org,omitempty"`
AuthorName string `json:"authorName,omitempty"`
AuthorEmail string `json:"authorEmail,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"`
Bundle string `json:"bundle,omitempty"`
SigningIdentity string `json:"signingIdentity,omitempty"`
JavaPackage string `json:"javaPackage,omitempty"`
ModuleDefs []*ModuleDef `json:"moduleDefs,omitempty"`
}
func (*Info) SigningIdentityTrimmed ¶
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"`
Children []string `json:"children,omitempty"`
Info *Info `json:"info,omitempty"`
Theme *theme.Theme `json:"theme,omitempty"`
Build *Build `json:"build,omitempty"`
Path string `json:"-"`
Parent string `json:"-"`
}
func NewProject ¶
func (*Project) Executable ¶
func (*Project) ToTemplateContext ¶
func (p *Project) ToTemplateContext() *TemplateContext
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(logger *zap.SugaredLogger) *Service
func (*Service) GetFilesystem ¶
func (s *Service) GetFilesystem(prj *Project) filesystem.FileLoader
func (*Service) Refresh ¶
func (s *Service) Refresh(rootFiles filesystem.FileLoader) (Projects, 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"`
Modules []string `json:"modules,omitempty"`
Info *Info `json:"info,omitempty"`
Build *Build `json:"build,omitempty"`
Theme *theme.Theme `json:"theme,omitempty"`
Ignore string `json:"ignore,omitempty"`
IgnoreGrep string `json:"ignoreGrep,omitempty"`
}
func (*TemplateContext) BuildAndroid ¶
func (t *TemplateContext) BuildAndroid() bool
func (*TemplateContext) BuildIOS ¶
func (t *TemplateContext) BuildIOS() bool
func (*TemplateContext) HasModule ¶
func (t *TemplateContext) HasModule(m string) bool
func (*TemplateContext) KeyProper ¶
func (t *TemplateContext) KeyProper() string
func (*TemplateContext) NameCompressed ¶
func (t *TemplateContext) NameCompressed() string
Click to show internal directories.
Click to hide internal directories.