Documentation ¶
Index ¶
- Constants
- func CreateRelease(token string, repo string, tag string, name string) error
- func DoAuthRequest(method, url, bodyType, token string, headers map[string]string, body io.Reader) (*http.Response, error)
- func Download(token string, url string, name string) error
- func DownloadAsset(token string, repo string, tag string, name string) error
- func DownloadSource(token string, repo string, tag string) error
- func Get(uri string, v interface{}) error
- func GetFileSize(f *os.File) (int64, error)
- func NewAuthRequest(method, url, bodyType, token string, headers map[string]string, body io.Reader) (*http.Request, error)
- func Upload(token string, repo string, tag string, name string, file string) error
- type Asset
- type ErrNotFound
- type Release
- type ReleaseCreate
Constants ¶
View Source
const (
APIURL = "https://api.github.com"
)
View Source
const (
AssetDownloadURI = "/repos/%s/%s/releases/assets/%d"
)
View Source
const (
ReleaseListURI = "/repos/%s/%s/releases%s"
)
Variables ¶
This section is empty.
Functions ¶
func DoAuthRequest ¶
Types ¶
type Asset ¶
type Asset struct { URL string `json:"url"` ID int `json:"id"` Name string `json:"name"` ContentType string `json:"content_type"` State string `json:"state"` Size uint64 `json:"size"` Downloads uint64 `json:"download_count"` Created time.Time `json:"created_at"` Published time.Time `json:"published_at"` }
type ErrNotFound ¶
func (ErrNotFound) Error ¶
func (e ErrNotFound) Error() string
type Release ¶
type Release struct { URL string `json:"url"` PageURL string `json:"html_url"` UploadURL string `json:"upload_url"` ID int `json:"id"` Name string `json:"name"` Description string `json:"body"` TagName string `json:"tag_name"` Draft bool `json:"draft"` Prerelease bool `json:"prerelease"` Created *time.Time `json:"created_at"` Published *time.Time `json:"published_at"` Assets []Asset `json:"assets"` }
func ReleaseOfTag ¶
func (*Release) CleanUploadURL ¶
Click to show internal directories.
Click to hide internal directories.