project

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

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

func BuildFromMap(frm util.ValueMap) *Build

func (*Build) Empty

func (b *Build) Empty() bool

nolint

func (*Build) HasArm

func (b *Build) HasArm() bool

func (*Build) Mobile

func (b *Build) Mobile() bool

func (*Build) ToMap

func (b *Build) ToMap() map[string]bool

type BuildOption

type BuildOption struct {
	Key         string
	Title       string
	Description string
}

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

func (i *Info) SigningIdentityTrimmed() string

type ModuleDef

type ModuleDef struct {
	Key  string `json:"key"`
	Path string `json:"path"`
	URL  string `json:"url"`
}

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 NewProject(key string, path string) *Project

func (*Project) Executable

func (p *Project) Executable() string

func (*Project) SafeIcon

func (p *Project) SafeIcon() string

func (*Project) Title

func (p *Project) Title() string

func (*Project) ToTemplateContext

func (p *Project) ToTemplateContext() *TemplateContext

type Projects

type Projects []*Project

func (Projects) AllModules

func (p Projects) AllModules() []string

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(logger *zap.SugaredLogger) *Service

func (*Service) ByPath

func (s *Service) ByPath(path string) *Project

func (*Service) Get

func (s *Service) Get(key string) (*Project, error)

func (*Service) GetFilesystem

func (s *Service) GetFilesystem(prj *Project) filesystem.FileLoader

func (*Service) Init

func (s *Service) Init() error

func (*Service) Keys

func (s *Service) Keys() []string

func (*Service) Projects

func (s *Service) Projects() Projects

func (*Service) Refresh

func (s *Service) Refresh(rootFiles filesystem.FileLoader) (Projects, error)

func (*Service) Save

func (s *Service) Save(prj *Project) 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

Jump to

Keyboard shortcuts

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