Documentation
¶
Index ¶
- func CheckCommand(prefix, value string) (has bool, err error)
- func ExecuteCommand(prefix, bin string, value []string, pipe bool) (err error)
- func ExistApplications(prefix, value string) (has bool, err error)
- func ExistPath(prefix, base, value string) (has bool, err error)
- func FilterAppendEnv(prefix string, envs []*Env) (export []string)
- func GetCurrentProfile(prefix string) (profile string, err error)
- func GetHomeDir(prefix string) (homeDir string, e error)
- func InstallByBrew(prefix, cmd string) (err error)
- func LogFormatted(format string, parameters ...interface{}) (err error)
- func SettingEnv(prefix string, value []string, target string) (result bool, err error)
- type Application
- type Brew
- type Env
- type GitflowControl
- func (v *GitflowControl) After(value *Package)
- func (v *GitflowControl) Before(value *Package, overwrite bool) bool
- func (v *GitflowControl) GetPackage() *Package
- func (v *GitflowControl) Install(value *Package) bool
- func (v *GitflowControl) Key() string
- func (v *GitflowControl) Upgrade(value *Package) bool
- type Golang
- type ITerm2
- type Log
- type Ohmyzsh
- type OhmyzshPlugin
- func (v *OhmyzshPlugin) After(value *Package)
- func (v *OhmyzshPlugin) Before(value *Package, overwrite bool) bool
- func (v *OhmyzshPlugin) GetPackage() *Package
- func (o *OhmyzshPlugin) GetPlugin() (key []string)
- func (v *OhmyzshPlugin) Install(value *Package) bool
- func (v *OhmyzshPlugin) Key() string
- func (v *OhmyzshPlugin) Upgrade(value *Package) bool
- type Package
- type Plugin
- type Rust
- type Software
- type Template
- type Vim
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckCommand ¶
func ExecuteCommand ¶
func ExistApplications ¶
func GetCurrentProfile ¶
func GetHomeDir ¶
func InstallByBrew ¶
Types ¶
type Application ¶
type Application interface {
/**
* 应用的关键字
*/
Key() string
/**
* 获取安装
*/
GetPackage() *Package
/**
* 安装前事件
* false: 不会执行后续事件
*/
Before(value *Package, overwrite bool) bool
/**
* 安装应用
*/
Install(value *Package) bool
/**
* 升级应用
*/
Upgrade(value *Package) bool
/**
* 安装后事件
*/
After(value *Package)
}
*
- 定义应用
type GitflowControl ¶
type GitflowControl struct {
Log
}
func NewGitflowControl ¶
func NewGitflowControl() *GitflowControl
func (*GitflowControl) After ¶
func (v *GitflowControl) After(value *Package)
func (*GitflowControl) Before ¶
func (v *GitflowControl) Before(value *Package, overwrite bool) bool
func (*GitflowControl) GetPackage ¶
func (v *GitflowControl) GetPackage() *Package
func (*GitflowControl) Install ¶
func (v *GitflowControl) Install(value *Package) bool
func (*GitflowControl) Key ¶
func (v *GitflowControl) Key() string
func (*GitflowControl) Upgrade ¶
func (v *GitflowControl) Upgrade(value *Package) bool
type Ohmyzsh ¶
type Ohmyzsh struct {
Log
}
func NewOhmyzsh ¶
func NewOhmyzsh() *Ohmyzsh
func (*Ohmyzsh) GetPackage ¶
type OhmyzshPlugin ¶
func NewOhmyzshPlugin ¶
func NewOhmyzshPlugin() *OhmyzshPlugin
func (*OhmyzshPlugin) GetPackage ¶
func (v *OhmyzshPlugin) GetPackage() *Package
func (*OhmyzshPlugin) GetPlugin ¶
func (o *OhmyzshPlugin) GetPlugin() (key []string)
*
- 获取插件 name []string
func (*OhmyzshPlugin) Key ¶
func (v *OhmyzshPlugin) Key() string
type Package ¶
type Package struct {
Name string `json:"name,omitempty" yaml:"name,omitempty"` // 包名字
Bin string `json:"bin,omitempty" yaml:"bin,omitempty"` // 安装后的名字
Version string `json:"version,omitempty" yaml:"version,omitempty"` // 安装包版本
Env []*Env `json:"env,omitempty" yaml:"env,omitempty"` // 环境变量
Shell string `json:"shell,omitempty" yaml:"shell,omitempty"` // 安装脚本
Compress string `json:"compress,omitempty" yaml:"compress,omitempty"` // zip, tar.gz, tar, tar.bz2, rar, xz, tar.xz, git, dmg, txt
Target string `json:"target,omitempty" yaml:"target,omitempty"` // target 默认为 /Applications
Description string `json:"description,omitempty" yaml:"description,omitempty"` // 描述信息
Source []string `json:"source,omitempty" yaml:"source,omitempty"` // 源文件 文件下载地址 | git clone 地址 | 备用 git clone地址
}
type Template ¶
type Template struct {
Log
}
func NewTemplate ¶
func NewTemplate() *Template
func (*Template) GetPackage ¶
Click to show internal directories.
Click to hide internal directories.