Documentation ¶
Index ¶
- func DefaultVinDir() (string, error)
- func TokenFromJSON(path string) (string, error)
- type App
- type ReadCloserWrapper
- type Token
- type Vin
- func (v *Vin) AppAlreadyInstalled(app App) (bool, error)
- func (v *Vin) BinDir() string
- func (v *Vin) CacheDir() (string, error)
- func (v *Vin) FetchApps(token string) error
- func (v Vin) Filter(filter func(app App) bool) *Vin
- func (v *Vin) FilterByHost(host string) *Vin
- func (v *Vin) FilterByPriority(minPriority int) *Vin
- func (v *Vin) FilterByRepo(repos []string) *Vin
- func (v *Vin) Install(app App, url string, wrapper ReadCloserWrapper) error
- func (v *Vin) ReadTOML(path string) error
- func (v *Vin) Repos() []string
- func (v *Vin) SaveCache(app App) error
- func (v *Vin) TmpDir() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultVinDir ¶ added in v0.4.0
func TokenFromJSON ¶ added in v0.4.0
Types ¶
type App ¶
type App struct { // Repo is the GitHub repository name in "owner/repo" format. Repo string `toml:"repo,omitempty"` // Tag is the tag on GitHub. Tag string `toml:"tag,omitempty"` // Keywords is a list of keywords for selecting suitable assets from multiple assets. Keywords []string `toml:"keywords,omitempty"` // Name is the name of the executable file. Name string `toml:"name,omitempty"` // Hosts is a list of host names. Hosts []string `toml:"hosts,omitempty"` // Priority is the priority of the application. Priority int `toml:"priority,omitempty"` // Command is the command to run after installation. Command string `toml:"command,omitempty"` // contains filtered or unexported fields }
App represents an application.
func (*App) RunCommand ¶ added in v0.3.0
func (*App) SuitableAssetURLs ¶ added in v0.3.0
type ReadCloserWrapper ¶ added in v0.3.2
type ReadCloserWrapper interface {
Wrap(app App, reader io.ReadCloser, contentLength int64) io.ReadCloser
}
type Vin ¶
type Vin struct { Apps []App `toml:"app"` // contains filtered or unexported fields }
Vin represents a Vin client.
func (*Vin) AppAlreadyInstalled ¶ added in v0.3.0
func (*Vin) FilterByHost ¶ added in v0.3.0
func (*Vin) FilterByPriority ¶ added in v0.3.0
func (*Vin) FilterByRepo ¶ added in v0.3.0
Click to show internal directories.
Click to hide internal directories.