data

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppDefinition

type AppDefinition struct {
	ApplicationName   string            `json:"ApplicationName"`
	DownloadExtension string            `json:"DownloadExtension"`
	Version           string            `json:"Version"`
	VersionCheck      VersionCheck      `json:"VersionCheck"`
	Symlink           string            `json:"Symlink"` //use it instead of appname for symlink (if given)
	Shortcut          string            `json:"Shortcut"`
	ShortcutIcon      string            `json:"ShortcutIcon"`
	DownloadUrl       string            `json:"DownloadUrl"`
	ExtractRegExList  []string          `json:"ExtractRegExList"`
	CreateFolders     []string          `json:"CreateFolders"`
	CreateFiles       map[string]string `json:"CreateFiles"`
	MoveObjects       map[string]string `json:"MoveObjects"`
	RestoreFiles      []string          `json:"RestoreFiles"` //Copy/Paste (overwrite) files from previous symlinked directory (needs symlink)
	Validated         bool
	ExtractRegex      *regexp.Regexp
}

AppDefinition contains the settings for the portable application

func (*AppDefinition) ValidateAndSetDefaults added in v1.6.0

func (definition *AppDefinition) ValidateAndSetDefaults() error

type AppState added in v1.5.0

type AppState struct {
	Definition     AppDefinition
	SymlinkFound   bool
	CurrentVersion *version.Version
	TargetVersion  *version.Version
	ActionMessage  string
}

type AppStates added in v1.5.0

type AppStates struct {
	States map[string]*AppState
}

func NewAppStates added in v1.5.0

func NewAppStates() *AppStates

type Apps

type Apps struct {
	Definitions map[string]AppDefinition `json:"apps"`
}

Apps Directly used for TOML binding AND generally in the app (json is converted... as a map is more convenient)

type JsonApps

type JsonApps struct {
	Definitions []AppDefinition `json:"apps"`
}

JsonApps Used for embedded configs (added to binary during build)

type Settings

type Settings struct {
	MyApps            []string                  `json:"myapps"`
	GithubApiKey      string                    `json:"githubApiKey"`
	AppDefinitions    map[string]*AppDefinition `json:"apps"`
	ArchivesDirectory string                    `json:"archivesDirectory"`
}

func NewSettings

func NewSettings() *Settings

type VersionCheck

type VersionCheck struct {
	Url              string `json:"Url"`
	RegEx            string `json:"RegEx"`
	UseLatestVersion bool   `json:"UseLatestVersion"`
}

Jump to

Keyboard shortcuts

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