manifest

package
v11.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2018 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Path

func Path(folder string) string

Types

type Action

type Action struct {
	// human-readable or standard name
	Name string `json:"name"`

	// file path (relative to manifest or absolute), URL, etc.
	Path string `json:"path"`

	// icon name (see static/fonts/icomoon/demo.html, don't include `icon-` prefix)
	Icon string `json:"icon"`

	// command-line arguments
	Args []string `json:"args"`

	// sandbox opt-in
	Sandbox bool `json:"sandbox"`

	// requested API scope
	Scope string `json:"scope"`

	// don't redirect stdout/stderr, open in new console window
	Console bool `json:"console"`

	// platform to restrict this action too
	Platform manager.ItchPlatform `json:"platform"`

	// localized action name
	Locales map[string]*ActionLocale `json:"locales"`
}

see https://itch.io/docs/itch/integrating/manifest.html

func (*Action) ExpandPath

func (a *Action) ExpandPath(runtime *manager.Runtime, baseFolder string) string

type ActionLocale

type ActionLocale struct {
	Name string `json:"name"`
}

type Manifest

type Manifest struct {
	Actions []*Action `json:"actions"`
	Prereqs []*Prereq `json:"prereqs"`
}

func Read

func Read(folder string) (*Manifest, error)

Read an itch app manifest from a folder Returns a nil manifest if there isn't an `.itch.toml` file in the folder. Returns an error if there is a file, but it can't be read, for example because of permissions errors, invalid TOML markup, or invalid manifest structure

func (*Manifest) ListActions

func (m *Manifest) ListActions(runtime *manager.Runtime) []*Action

type Prereq

type Prereq struct {
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

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