mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2024-05-11 05:55:12 +00:00
Switch from govendor to go modules. (#587)
Thanks to @BenoitKnecht for leading the way on this.
This commit is contained in:
24
vendor/github.com/google/go-github/github/repos_releases.go
generated
vendored
24
vendor/github.com/google/go-github/github/repos_releases.go
generated
vendored
@ -19,7 +19,7 @@ import (
|
||||
|
||||
// RepositoryRelease represents a GitHub release in a repository.
|
||||
type RepositoryRelease struct {
|
||||
ID *int `json:"id,omitempty"`
|
||||
ID *int64 `json:"id,omitempty"`
|
||||
TagName *string `json:"tag_name,omitempty"`
|
||||
TargetCommitish *string `json:"target_commitish,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
@ -36,6 +36,7 @@ type RepositoryRelease struct {
|
||||
ZipballURL *string `json:"zipball_url,omitempty"`
|
||||
TarballURL *string `json:"tarball_url,omitempty"`
|
||||
Author *User `json:"author,omitempty"`
|
||||
NodeID *string `json:"node_id,omitempty"`
|
||||
}
|
||||
|
||||
func (r RepositoryRelease) String() string {
|
||||
@ -44,7 +45,7 @@ func (r RepositoryRelease) String() string {
|
||||
|
||||
// ReleaseAsset represents a GitHub release asset in a repository.
|
||||
type ReleaseAsset struct {
|
||||
ID *int `json:"id,omitempty"`
|
||||
ID *int64 `json:"id,omitempty"`
|
||||
URL *string `json:"url,omitempty"`
|
||||
Name *string `json:"name,omitempty"`
|
||||
Label *string `json:"label,omitempty"`
|
||||
@ -56,6 +57,7 @@ type ReleaseAsset struct {
|
||||
UpdatedAt *Timestamp `json:"updated_at,omitempty"`
|
||||
BrowserDownloadURL *string `json:"browser_download_url,omitempty"`
|
||||
Uploader *User `json:"uploader,omitempty"`
|
||||
NodeID *string `json:"node_id,omitempty"`
|
||||
}
|
||||
|
||||
func (r ReleaseAsset) String() string {
|
||||
@ -88,7 +90,7 @@ func (s *RepositoriesService) ListReleases(ctx context.Context, owner, repo stri
|
||||
// GetRelease fetches a single release.
|
||||
//
|
||||
// GitHub API docs: https://developer.github.com/v3/repos/releases/#get-a-single-release
|
||||
func (s *RepositoriesService) GetRelease(ctx context.Context, owner, repo string, id int) (*RepositoryRelease, *Response, error) {
|
||||
func (s *RepositoriesService) GetRelease(ctx context.Context, owner, repo string, id int64) (*RepositoryRelease, *Response, error) {
|
||||
u := fmt.Sprintf("repos/%s/%s/releases/%d", owner, repo, id)
|
||||
return s.getSingleRelease(ctx, u)
|
||||
}
|
||||
@ -145,7 +147,7 @@ func (s *RepositoriesService) CreateRelease(ctx context.Context, owner, repo str
|
||||
// EditRelease edits a repository release.
|
||||
//
|
||||
// GitHub API docs: https://developer.github.com/v3/repos/releases/#edit-a-release
|
||||
func (s *RepositoriesService) EditRelease(ctx context.Context, owner, repo string, id int, release *RepositoryRelease) (*RepositoryRelease, *Response, error) {
|
||||
func (s *RepositoriesService) EditRelease(ctx context.Context, owner, repo string, id int64, release *RepositoryRelease) (*RepositoryRelease, *Response, error) {
|
||||
u := fmt.Sprintf("repos/%s/%s/releases/%d", owner, repo, id)
|
||||
|
||||
req, err := s.client.NewRequest("PATCH", u, release)
|
||||
@ -164,7 +166,7 @@ func (s *RepositoriesService) EditRelease(ctx context.Context, owner, repo strin
|
||||
// DeleteRelease delete a single release from a repository.
|
||||
//
|
||||
// GitHub API docs: https://developer.github.com/v3/repos/releases/#delete-a-release
|
||||
func (s *RepositoriesService) DeleteRelease(ctx context.Context, owner, repo string, id int) (*Response, error) {
|
||||
func (s *RepositoriesService) DeleteRelease(ctx context.Context, owner, repo string, id int64) (*Response, error) {
|
||||
u := fmt.Sprintf("repos/%s/%s/releases/%d", owner, repo, id)
|
||||
|
||||
req, err := s.client.NewRequest("DELETE", u, nil)
|
||||
@ -177,7 +179,7 @@ func (s *RepositoriesService) DeleteRelease(ctx context.Context, owner, repo str
|
||||
// ListReleaseAssets lists the release's assets.
|
||||
//
|
||||
// GitHub API docs: https://developer.github.com/v3/repos/releases/#list-assets-for-a-release
|
||||
func (s *RepositoriesService) ListReleaseAssets(ctx context.Context, owner, repo string, id int, opt *ListOptions) ([]*ReleaseAsset, *Response, error) {
|
||||
func (s *RepositoriesService) ListReleaseAssets(ctx context.Context, owner, repo string, id int64, opt *ListOptions) ([]*ReleaseAsset, *Response, error) {
|
||||
u := fmt.Sprintf("repos/%s/%s/releases/%d/assets", owner, repo, id)
|
||||
u, err := addOptions(u, opt)
|
||||
if err != nil {
|
||||
@ -200,7 +202,7 @@ func (s *RepositoriesService) ListReleaseAssets(ctx context.Context, owner, repo
|
||||
// GetReleaseAsset fetches a single release asset.
|
||||
//
|
||||
// GitHub API docs: https://developer.github.com/v3/repos/releases/#get-a-single-release-asset
|
||||
func (s *RepositoriesService) GetReleaseAsset(ctx context.Context, owner, repo string, id int) (*ReleaseAsset, *Response, error) {
|
||||
func (s *RepositoriesService) GetReleaseAsset(ctx context.Context, owner, repo string, id int64) (*ReleaseAsset, *Response, error) {
|
||||
u := fmt.Sprintf("repos/%s/%s/releases/assets/%d", owner, repo, id)
|
||||
|
||||
req, err := s.client.NewRequest("GET", u, nil)
|
||||
@ -224,7 +226,7 @@ func (s *RepositoriesService) GetReleaseAsset(ctx context.Context, owner, repo s
|
||||
// of the io.ReadCloser. Exactly one of rc and redirectURL will be zero.
|
||||
//
|
||||
// GitHub API docs: https://developer.github.com/v3/repos/releases/#get-a-single-release-asset
|
||||
func (s *RepositoriesService) DownloadReleaseAsset(ctx context.Context, owner, repo string, id int) (rc io.ReadCloser, redirectURL string, err error) {
|
||||
func (s *RepositoriesService) DownloadReleaseAsset(ctx context.Context, owner, repo string, id int64) (rc io.ReadCloser, redirectURL string, err error) {
|
||||
u := fmt.Sprintf("repos/%s/%s/releases/assets/%d", owner, repo, id)
|
||||
|
||||
req, err := s.client.NewRequest("GET", u, nil)
|
||||
@ -264,7 +266,7 @@ func (s *RepositoriesService) DownloadReleaseAsset(ctx context.Context, owner, r
|
||||
// EditReleaseAsset edits a repository release asset.
|
||||
//
|
||||
// GitHub API docs: https://developer.github.com/v3/repos/releases/#edit-a-release-asset
|
||||
func (s *RepositoriesService) EditReleaseAsset(ctx context.Context, owner, repo string, id int, release *ReleaseAsset) (*ReleaseAsset, *Response, error) {
|
||||
func (s *RepositoriesService) EditReleaseAsset(ctx context.Context, owner, repo string, id int64, release *ReleaseAsset) (*ReleaseAsset, *Response, error) {
|
||||
u := fmt.Sprintf("repos/%s/%s/releases/assets/%d", owner, repo, id)
|
||||
|
||||
req, err := s.client.NewRequest("PATCH", u, release)
|
||||
@ -283,7 +285,7 @@ func (s *RepositoriesService) EditReleaseAsset(ctx context.Context, owner, repo
|
||||
// DeleteReleaseAsset delete a single release asset from a repository.
|
||||
//
|
||||
// GitHub API docs: https://developer.github.com/v3/repos/releases/#delete-a-release-asset
|
||||
func (s *RepositoriesService) DeleteReleaseAsset(ctx context.Context, owner, repo string, id int) (*Response, error) {
|
||||
func (s *RepositoriesService) DeleteReleaseAsset(ctx context.Context, owner, repo string, id int64) (*Response, error) {
|
||||
u := fmt.Sprintf("repos/%s/%s/releases/assets/%d", owner, repo, id)
|
||||
|
||||
req, err := s.client.NewRequest("DELETE", u, nil)
|
||||
@ -297,7 +299,7 @@ func (s *RepositoriesService) DeleteReleaseAsset(ctx context.Context, owner, rep
|
||||
// To upload assets that cannot be represented by an os.File, call NewUploadRequest directly.
|
||||
//
|
||||
// GitHub API docs: https://developer.github.com/v3/repos/releases/#upload-a-release-asset
|
||||
func (s *RepositoriesService) UploadReleaseAsset(ctx context.Context, owner, repo string, id int, opt *UploadOptions, file *os.File) (*ReleaseAsset, *Response, error) {
|
||||
func (s *RepositoriesService) UploadReleaseAsset(ctx context.Context, owner, repo string, id int64, opt *UploadOptions, file *os.File) (*ReleaseAsset, *Response, error) {
|
||||
u := fmt.Sprintf("repos/%s/%s/releases/%d/assets", owner, repo, id)
|
||||
u, err := addOptions(u, opt)
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user