cmd

package
v1.7.6 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2022 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Error = logger.Error

Functions

func Execute

func Execute() error

func ReadReleasesFile

func ReadReleasesFile(path string) (releases.Releases, error)

func Sleep

func Sleep()

Types

type App

type App struct {
	Config        Config
	UserHomeDir   string
	UserConfigDir string
	GitHubClient  github.GitHubClientInterface
	Downloader    downloader.DownloaderInterface
}

func NewApp

func NewApp() (App, error)

func (*App) CmdEdit

func (a *App) CmdEdit(p *CommandLineEditParam) error

func (*App) CmdInit

func (a *App) CmdInit() error

func (*App) CmdInstall

func (a *App) CmdInstall(p *CmdInstallParam) error

CmdInstall installs commands from an url of GitHub Releases.

Decompress it if Releases file was archive file, and install executables to relma directory.Install executables from urls of `releases.json` if `p.File` (releases.json) is not empty.

func (*App) CmdList

func (a *App) CmdList() error

func (*App) CmdRoot

func (a *App) CmdRoot() error

func (*App) CmdUninstall

func (a *App) CmdUninstall(p *CmdUninstallParam) error

func (*App) CmdUpdate

func (a *App) CmdUpdate(p *CmdUpdateParam) error

func (*App) CmdUpgrade

func (a *App) CmdUpgrade(p *CmdUpgradeParam) error

func (*App) ConfigDir

func (a *App) ConfigDir() string

func (*App) ConfigFile

func (a *App) ConfigFile() string

func (*App) CreateConfigDir

func (a *App) CreateConfigDir() (string, error)

func (*App) CreateConfigFile

func (a *App) CreateConfigFile(c Config) (string, error)

func (*App) DefaultConfig

func (a *App) DefaultConfig() Config

func (*App) ReadConfigFile

func (a *App) ReadConfigFile() (Config, error)

func (*App) SaveReleases

func (a *App) SaveReleases(rels releases.Releases) error

func (*App) SetUserEnv

func (a *App) SetUserEnv() error

type CmdInstallParam

type CmdInstallParam struct {
	URL  string
	File string
}

type CmdUninstallParam

type CmdUninstallParam struct {
	OwnerRepo string
}

type CmdUpdateParam

type CmdUpdateParam struct {
	Releases []string
}

type CmdUpgradeParam

type CmdUpgradeParam struct {
	OwnerRepo string
	Yes       bool
}

type CommandLineEditParam

type CommandLineEditParam struct {
	Editor string
}

type CommandLineInstallParam

type CommandLineInstallParam struct {
	GitHubReleaseURL string
	File             string
}

type CommandLineUninstallParam

type CommandLineUninstallParam struct {
	OwnerRepo string
}

type CommandLineUpdateParam

type CommandLineUpdateParam struct {
	Releases []string
}

type CommandLineUpgradeParam

type CommandLineUpgradeParam struct {
	Upgrade   bool
	Yes       bool
	OwnerRepo string
}

type Config

type Config struct {
	RelmaRoot string
}

func (*Config) BinDir

func (c *Config) BinDir() string

func (*Config) ReadReleasesFile

func (c *Config) ReadReleasesFile() (releases.Releases, error)

func (*Config) ReleasesDir

func (c *Config) ReleasesDir() string

func (*Config) ReleasesFile

func (c *Config) ReleasesFile() string

Jump to

Keyboard shortcuts

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