infrastructure

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateInstalledAppListFile

func CreateInstalledAppListFile()

CreateInstalledAppListFile - creates empty apps.json file if not found

func EnsureIsAdmin

func EnsureIsAdmin() bool

EnsureIsAdmin will panic the app-get if it is not runned with root priviliges

func GetInstallationFile

func GetInstallationFile(app *domain.App, source GithubVersion) (string, bool)

GetInstallationFile will download amd64 deb file to disk. Returns path and succes

func InstallApp

func InstallApp(path string)

InstallApp runs dpkg using sudo

Types

type AppRepository

type AppRepository struct{}

AppRepository implementation

func (AppRepository) Get

func (appRepo AppRepository) Get() []domain.InstalledApp

Get returns all installed applications

func (AppRepository) Save

func (appRepo AppRepository) Save(apps []domain.InstalledApp)

Save overwrites list of apps

type GithubVersion

type GithubVersion struct {
	Name   string        `json:"tag_name"`
	Assets []gitHubAsset `json:"assets"`
}

GithubVersion contains latest version with list of assets

func GetLatestVersion

func GetLatestVersion(app domain.App) GithubVersion

GetLatestVersion loads latest stable version of an app from github

Jump to

Keyboard shortcuts

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