Documentation
¶
Index ¶
- type Download
- type DownloadMeta
- type DownloadOption
- type Manager
- func (m *Manager) GetMeta(name string) *DownloadMeta
- func (m *Manager) Install(name, version, url string, options ...DownloadOption) (*Download, error)
- func (m *Manager) InstallGithubRelease(owner, repo, tag string) (*Download, error)
- func (m *Manager) List() (result []*DownloadMeta)
- func (m *Manager) Remove(name, version string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DownloadMeta ¶
type DownloadMeta struct {
Name string
LatestVersion string
LatestCheckTime time.Time
Installed []*Download
Dir string
}
func (*DownloadMeta) FindVersion ¶
func (meta *DownloadMeta) FindVersion(version string) *Download
type DownloadOption ¶ added in v0.4.20
func WithBearerToken ¶ added in v0.4.20
func WithBearerToken(token string) DownloadOption
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager() *Manager
func (*Manager) GetMeta ¶
func (m *Manager) GetMeta(name string) *DownloadMeta
func (*Manager) Install ¶
func (m *Manager) Install(name, version, url string, options ...DownloadOption) (*Download, error)
func (*Manager) InstallGithubRelease ¶
func (*Manager) List ¶
func (m *Manager) List() (result []*DownloadMeta)
Click to show internal directories.
Click to hide internal directories.