Documentation ¶
Index ¶
- func Download(url, filePath string, cb DownloadCB) error
- func FetchByGit(repoRemoteAddress string, repoDir string) (err error)
- func Get(url string) (data []byte, err error)
- func GetLastReleaseTagWithGitee(repoAddress string) (lastTag string, err error)
- type DownloadCB
- type DownloadCounter
- type GiteeCommit
- type GiteeTag
- type Release
- type ReleaseAssets
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Download ¶ added in v0.0.6
func Download(url, filePath string, cb DownloadCB) error
func FetchByGit ¶
func GetLastReleaseTagWithGitee ¶ added in v0.0.7
用于检查更新
Types ¶
type DownloadCB ¶ added in v0.0.14
type DownloadCB func(total, complete int)
type DownloadCounter ¶ added in v0.0.14
type DownloadCounter struct {
Total, Completed int
// contains filtered or unexported fields
}
type GiteeCommit ¶
type GiteeTag ¶
type GiteeTag struct { Name string `json:"name"` Message string `json:"message"` Commit GiteeCommit `json:"commit"` }
type Release ¶ added in v0.0.15
type Release struct { TagName string `json:"tag_name"` IsPreRelease bool `json:"prerelease"` VersionName string `json:"name"` VersionDetails string `json:"body"` Assets []*ReleaseAssets `json:"assets"` }
func GetLastReleaseWithGitee ¶
type ReleaseAssets ¶ added in v0.0.15
type ReleaseAssets struct { // 资源名字,如果没有就别使用。 Name string `json:"name"` Url string `json:"browser_download_url"` }
func (*ReleaseAssets) GetDownloadUrl ¶ added in v0.0.15
func (asset *ReleaseAssets) GetDownloadUrl() string
Click to show internal directories.
Click to hide internal directories.