data

package
v1.27.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const GITHUB_BASE_URL = "https://github.com/"
View Source
const GITHUB_GRAPHQL_URL = "https://api.github.com/graphql"
View Source
const GITHUB_PREFIX = "github"

Variables

This section is empty.

Functions

This section is empty.

Types

type AppDefinition

type AppDefinition struct {
	//MANDATORY FIELDS
	Version          string `json:"Version"`
	DownloadUrl      string `json:"DownloadUrl"` //without /, auto add tag_name for repo based app (see wsl2-ssh-pageant.toml)
	SslIgnoreBadCert bool   //ability to disable ssl checks if needed

	//Optional fields
	RepositoryUrl string `json:"RepositoryUrl"` //for easy config with github repos

	ApplicationName   string `json:"ApplicationName"`   //extracted from filename if missing
	DownloadExtension string `json:"DownloadExtension"` //extracted from download url if missing

	VersionCheck VersionCheck `json:"VersionCheck"` //optional
	Symlink      string       `json:"Symlink"`      //use it instead of appname for symlink (if given)
	Shortcut     string       `json:"Shortcut"`     //Optional
	ShortcutIcon string       `json:"ShortcutIcon"` //Optional

	ExtractRegExList []string          `json:"ExtractRegExList"` //Optional
	CreateFolders    []string          `json:"CreateFolders"`    //Optio
	CreateFiles      map[string]string `json:"CreateFiles"`
	NoAddVersionFile bool              //to avoid VERSION-{{VERSION}}.nomad file adding
	MoveObjects      map[string]string `json:"MoveObjects"`
	RestoreFiles     []string          `json:"RestoreFiles"` //Copy/Paste (overwrite) files from previous symlinked directory (needs symlink)
	// contains filtered or unexported fields
}

AppDefinition contains the settings for the portable application

func (*AppDefinition) ComputeDownloadExtension added in v1.9.0

func (definition *AppDefinition) ComputeDownloadExtension()

func (*AppDefinition) GetExtractRegex added in v1.12.0

func (definition *AppDefinition) GetExtractRegex() *regexp.Regexp

func (*AppDefinition) IsValid added in v1.12.0

func (definition *AppDefinition) IsValid() (bool, error)

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"`
}

func (*VersionCheck) BuildRequest added in v1.12.0

func (vc *VersionCheck) BuildRequest() (url string, response string)

Jump to

Keyboard shortcuts

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