gitee

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2022 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

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 FetchByGit(repoRemoteAddress string, repoDir string) (err error)

func Get

func Get(url string) (data []byte, err error)

func GetLastReleaseTagWithGitee added in v0.0.7

func GetLastReleaseTagWithGitee(repoAddress string) (lastTag string, err error)

用于检查更新

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
}

func (*DownloadCounter) Write added in v0.0.14

func (dc *DownloadCounter) Write(p []byte) (int, error)

type GiteeCommit

type GiteeCommit struct {
	Sha  string `json:"sha"`
	Date string `json:"date"`
}

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

func GetLastReleaseWithGitee(repoAddress, mirror string) (release *Release, err error)

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

Jump to

Keyboard shortcuts

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