aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNiall Sheridan <nsheridan@gmail.com>2017-02-19 01:49:51 +0000
committerNiall Sheridan <nsheridan@gmail.com>2017-02-19 01:49:51 +0000
commiteb57eaf30965ba24ff669d6f9c8d11cd24951777 (patch)
treed04d1e425f0fce5c0f696b8cab7e660630cbd362
parente8ff7ffe8e8c25195c64950b61c6c5754bbcd3ba (diff)
update dependencies
-rw-r--r--vendor/cloud.google.com/go/storage/acl.go1
-rw-r--r--vendor/cloud.google.com/go/storage/storage.go47
-rw-r--r--vendor/github.com/aws/aws-sdk-go/aws/version.go2
-rw-r--r--vendor/github.com/google/go-github/LICENSE4
-rw-r--r--vendor/github.com/google/go-github/github/activity.go2
-rw-r--r--vendor/github.com/google/go-github/github/activity_events.go18
-rw-r--r--vendor/github.com/google/go-github/github/activity_notifications.go10
-rw-r--r--vendor/github.com/google/go-github/github/activity_star.go10
-rw-r--r--vendor/github.com/google/go-github/github/activity_watching.go10
-rw-r--r--vendor/github.com/google/go-github/github/admin.go4
-rw-r--r--vendor/github.com/google/go-github/github/authorizations.go20
-rw-r--r--vendor/github.com/google/go-github/github/doc.go4
-rw-r--r--vendor/github.com/google/go-github/github/event_types.go15
-rw-r--r--vendor/github.com/google/go-github/github/gists.go34
-rw-r--r--vendor/github.com/google/go-github/github/gists_comments.go16
-rw-r--r--vendor/github.com/google/go-github/github/git.go2
-rw-r--r--vendor/github.com/google/go-github/github/git_blobs.go2
-rw-r--r--vendor/github.com/google/go-github/github/git_commits.go12
-rw-r--r--vendor/github.com/google/go-github/github/git_refs.go18
-rw-r--r--vendor/github.com/google/go-github/github/git_tags.go6
-rw-r--r--vendor/github.com/google/go-github/github/git_trees.go12
-rw-r--r--vendor/github.com/google/go-github/github/github.go84
-rw-r--r--vendor/github.com/google/go-github/github/gitignore.go8
-rw-r--r--vendor/github.com/google/go-github/github/integration_installation.go2
-rw-r--r--vendor/github.com/google/go-github/github/issues.go44
-rw-r--r--vendor/github.com/google/go-github/github/issues_assignees.go4
-rw-r--r--vendor/github.com/google/go-github/github/issues_comments.go16
-rw-r--r--vendor/github.com/google/go-github/github/issues_events.go8
-rw-r--r--vendor/github.com/google/go-github/github/issues_labels.go18
-rw-r--r--vendor/github.com/google/go-github/github/licenses.go2
-rw-r--r--vendor/github.com/google/go-github/github/migrations_source_import.go16
-rw-r--r--vendor/github.com/google/go-github/github/misc.go6
-rw-r--r--vendor/github.com/google/go-github/github/orgs.go18
-rw-r--r--vendor/github.com/google/go-github/github/orgs_hooks.go2
-rw-r--r--vendor/github.com/google/go-github/github/orgs_members.go26
-rw-r--r--vendor/github.com/google/go-github/github/orgs_teams.go50
-rw-r--r--vendor/github.com/google/go-github/github/projects.go20
-rw-r--r--vendor/github.com/google/go-github/github/pulls.go8
-rw-r--r--vendor/github.com/google/go-github/github/pulls_comments.go6
-rw-r--r--vendor/github.com/google/go-github/github/repos.go30
-rw-r--r--vendor/github.com/google/go-github/github/repos_collaborators.go8
-rw-r--r--vendor/github.com/google/go-github/github/repos_comments.go18
-rw-r--r--vendor/github.com/google/go-github/github/repos_commits.go16
-rw-r--r--vendor/github.com/google/go-github/github/repos_contents.go37
-rw-r--r--vendor/github.com/google/go-github/github/repos_deployments.go9
-rw-r--r--vendor/github.com/google/go-github/github/repos_forks.go8
-rw-r--r--vendor/github.com/google/go-github/github/repos_hooks.go25
-rw-r--r--vendor/github.com/google/go-github/github/repos_invitations.go2
-rw-r--r--vendor/github.com/google/go-github/github/repos_keys.go16
-rw-r--r--vendor/github.com/google/go-github/github/repos_merging.go2
-rw-r--r--vendor/github.com/google/go-github/github/repos_pages.go10
-rw-r--r--vendor/github.com/google/go-github/github/repos_projects.go4
-rw-r--r--vendor/github.com/google/go-github/github/repos_releases.go34
-rw-r--r--vendor/github.com/google/go-github/github/repos_stats.go8
-rw-r--r--vendor/github.com/google/go-github/github/repos_statuses.go20
-rw-r--r--vendor/github.com/google/go-github/github/repos_traffic.go4
-rw-r--r--vendor/github.com/google/go-github/github/search.go12
-rw-r--r--vendor/github.com/google/go-github/github/strings.go2
-rw-r--r--vendor/github.com/google/go-github/github/users.go18
-rw-r--r--vendor/github.com/google/go-github/github/users_emails.go6
-rw-r--r--vendor/github.com/google/go-github/github/users_followers.go16
-rw-r--r--vendor/github.com/google/go-github/github/users_gpg_keys.go6
-rw-r--r--vendor/github.com/google/go-github/github/users_keys.go14
-rw-r--r--vendor/github.com/hashicorp/vault/api/sys_audit.go24
-rw-r--r--vendor/github.com/hashicorp/vault/api/sys_auth.go21
-rw-r--r--vendor/github.com/hashicorp/vault/api/sys_mounts.go2
-rw-r--r--vendor/github.com/mattn/go-sqlite3/sqlite3.go2
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/doc.go60
-rw-r--r--vendor/github.com/prometheus/client_golang/prometheus/go_collector.go27
-rw-r--r--vendor/github.com/prometheus/common/model/value.go5
-rw-r--r--vendor/github.com/prometheus/procfs/AUTHORS.md21
-rw-r--r--vendor/github.com/prometheus/procfs/CONTRIBUTING.md6
-rw-r--r--vendor/github.com/prometheus/procfs/MAINTAINERS.md1
-rw-r--r--vendor/github.com/prometheus/procfs/README.md1
-rw-r--r--vendor/github.com/prometheus/procfs/buddyinfo.go95
-rw-r--r--vendor/github.com/prometheus/procfs/fs.go13
-rw-r--r--vendor/github.com/prometheus/procfs/mountstats.go4
-rw-r--r--vendor/github.com/prometheus/procfs/xfs/parse.go361
-rw-r--r--vendor/github.com/prometheus/procfs/xfs/xfs.go158
-rw-r--r--vendor/github.com/spf13/viper/viper.go10
-rw-r--r--vendor/github.com/xanzy/go-gitlab/CHANGELOG.md8
-rw-r--r--vendor/github.com/xanzy/go-gitlab/branches.go28
-rw-r--r--vendor/github.com/xanzy/go-gitlab/build_variables.go20
-rw-r--r--vendor/github.com/xanzy/go-gitlab/builds.go44
-rw-r--r--vendor/github.com/xanzy/go-gitlab/commits.go45
-rw-r--r--vendor/github.com/xanzy/go-gitlab/deploy_keys.go20
-rw-r--r--vendor/github.com/xanzy/go-gitlab/gitlab.go258
-rw-r--r--vendor/github.com/xanzy/go-gitlab/groups.go58
-rw-r--r--vendor/github.com/xanzy/go-gitlab/issues.go31
-rw-r--r--vendor/github.com/xanzy/go-gitlab/labels.go20
-rw-r--r--vendor/github.com/xanzy/go-gitlab/merge_requests.go165
-rw-r--r--vendor/github.com/xanzy/go-gitlab/milestones.go32
-rw-r--r--vendor/github.com/xanzy/go-gitlab/namespaces.go8
-rw-r--r--vendor/github.com/xanzy/go-gitlab/notes.go84
-rw-r--r--vendor/github.com/xanzy/go-gitlab/notifications.go214
-rw-r--r--vendor/github.com/xanzy/go-gitlab/pipelines.go23
-rw-r--r--vendor/github.com/xanzy/go-gitlab/project_snippets.go35
-rw-r--r--vendor/github.com/xanzy/go-gitlab/projects.go135
-rw-r--r--vendor/github.com/xanzy/go-gitlab/repositories.go35
-rw-r--r--vendor/github.com/xanzy/go-gitlab/repository_files.go24
-rw-r--r--vendor/github.com/xanzy/go-gitlab/services.go44
-rw-r--r--vendor/github.com/xanzy/go-gitlab/session.go4
-rw-r--r--vendor/github.com/xanzy/go-gitlab/settings.go8
-rw-r--r--vendor/github.com/xanzy/go-gitlab/system_hooks.go16
-rw-r--r--vendor/github.com/xanzy/go-gitlab/tags.go16
-rw-r--r--vendor/github.com/xanzy/go-gitlab/time_stats.go32
-rw-r--r--vendor/github.com/xanzy/go-gitlab/users.go92
-rw-r--r--vendor/golang.org/x/oauth2/internal/oauth2.go2
-rw-r--r--vendor/golang.org/x/sys/unix/asm.s10
-rwxr-xr-xvendor/golang.org/x/sys/unix/mkerrors.sh7
-rw-r--r--vendor/golang.org/x/sys/unix/syscall_linux.go119
-rw-r--r--vendor/golang.org/x/sys/unix/types_linux.go4
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_386.go17
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go17
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_arm.go17
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go17
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_mips.go17
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go17
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go17
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go17
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go17
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go17
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go17
-rw-r--r--vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go17
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_386.go9
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go9
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_arm.go9
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go9
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_mips.go9
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go9
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go9
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go9
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go9
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go9
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go9
-rw-r--r--vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go9
-rw-r--r--vendor/google.golang.org/api/oauth2/v2/oauth2-gen.go15
-rw-r--r--vendor/google.golang.org/grpc/clientconn.go11
-rw-r--r--vendor/google.golang.org/grpc/metadata/metadata.go3
-rw-r--r--vendor/google.golang.org/grpc/rpc_util.go2
-rw-r--r--vendor/google.golang.org/grpc/transport/transport.go3
-rw-r--r--vendor/vendor.json418
142 files changed, 2628 insertions, 1500 deletions
diff --git a/vendor/cloud.google.com/go/storage/acl.go b/vendor/cloud.google.com/go/storage/acl.go
index 714d280..6c24394 100644
--- a/vendor/cloud.google.com/go/storage/acl.go
+++ b/vendor/cloud.google.com/go/storage/acl.go
@@ -27,6 +27,7 @@ type ACLRole string
const (
RoleOwner ACLRole = "OWNER"
RoleReader ACLRole = "READER"
+ RoleWriter ACLRole = "WRITER"
)
// ACLEntity refers to a user or group.
diff --git a/vendor/cloud.google.com/go/storage/storage.go b/vendor/cloud.google.com/go/storage/storage.go
index bafb136..53fc029 100644
--- a/vendor/cloud.google.com/go/storage/storage.go
+++ b/vendor/cloud.google.com/go/storage/storage.go
@@ -82,7 +82,7 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error
option.WithUserAgent(userAgent),
}
opts = append(o, opts...)
- hc, _, err := transport.NewHTTPClient(ctx, opts...)
+ hc, ep, err := transport.NewHTTPClient(ctx, opts...)
if err != nil {
return nil, fmt.Errorf("dialing: %v", err)
}
@@ -90,6 +90,9 @@ func NewClient(ctx context.Context, opts ...option.ClientOption) (*Client, error
if err != nil {
return nil, fmt.Errorf("storage client: %v", err)
}
+ if ep != "" {
+ rawService.BasePath = ep
+ }
return &Client{
hc: hc,
raw: rawService,
@@ -508,27 +511,33 @@ func (o *ObjectHandle) NewRangeReader(ctx context.Context, offset, length int64)
return nil, err
}
var res *http.Response
- err = runWithRetry(ctx, func() error { res, err = o.c.hc.Do(req); return err })
+ err = runWithRetry(ctx, func() error {
+ res, err = o.c.hc.Do(req)
+ if err != nil {
+ return err
+ }
+ if res.StatusCode == http.StatusNotFound {
+ res.Body.Close()
+ return ErrObjectNotExist
+ }
+ if res.StatusCode < 200 || res.StatusCode > 299 {
+ body, _ := ioutil.ReadAll(res.Body)
+ res.Body.Close()
+ return &googleapi.Error{
+ Code: res.StatusCode,
+ Header: res.Header,
+ Body: string(body),
+ }
+ }
+ if offset > 0 && length != 0 && res.StatusCode != http.StatusPartialContent {
+ res.Body.Close()
+ return errors.New("storage: partial request not satisfied")
+ }
+ return nil
+ })
if err != nil {
return nil, err
}
- if res.StatusCode == http.StatusNotFound {
- res.Body.Close()
- return nil, ErrObjectNotExist
- }
- if res.StatusCode < 200 || res.StatusCode > 299 {
- body, _ := ioutil.ReadAll(res.Body)
- res.Body.Close()
- return nil, &googleapi.Error{
- Code: res.StatusCode,
- Header: res.Header,
- Body: string(body),
- }
- }
- if offset > 0 && length != 0 && res.StatusCode != http.StatusPartialContent {
- res.Body.Close()
- return nil, errors.New("storage: partial request not satisfied")
- }
var size int64 // total size of object, even if a range was requested.
if res.StatusCode == http.StatusPartialContent {
diff --git a/vendor/github.com/aws/aws-sdk-go/aws/version.go b/vendor/github.com/aws/aws-sdk-go/aws/version.go
index 466b820..be7ac14 100644
--- a/vendor/github.com/aws/aws-sdk-go/aws/version.go
+++ b/vendor/github.com/aws/aws-sdk-go/aws/version.go
@@ -5,4 +5,4 @@ package aws
const SDKName = "aws-sdk-go"
// SDKVersion is the version of this SDK
-const SDKVersion = "1.6.21"
+const SDKVersion = "1.6.25"
diff --git a/vendor/github.com/google/go-github/LICENSE b/vendor/github.com/google/go-github/LICENSE
index 5582e4a..53d5374 100644
--- a/vendor/github.com/google/go-github/LICENSE
+++ b/vendor/github.com/google/go-github/LICENSE
@@ -29,8 +29,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
----------
Some documentation is taken from the GitHub Developer site
-<http://developer.github.com/>, which is available under the following Creative
-Commons Attribution 3.0 License. This applies only to the go-github source
+<https://developer.github.com/>, which is available under the following Creative
+Commons Attribution 3.0 License. This applies only to the go-github source
code and would not apply to any compiled binaries.
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE
diff --git a/vendor/github.com/google/go-github/github/activity.go b/vendor/github.com/google/go-github/github/activity.go
index d719ebb..ad6da2b 100644
--- a/vendor/github.com/google/go-github/github/activity.go
+++ b/vendor/github.com/google/go-github/github/activity.go
@@ -8,7 +8,7 @@ package github
// ActivityService handles communication with the activity related
// methods of the GitHub API.
//
-// GitHub API docs: http://developer.github.com/v3/activity/
+// GitHub API docs: https://developer.github.com/v3/activity/
type ActivityService service
// FeedLink represents a link to a related resource.
diff --git a/vendor/github.com/google/go-github/github/activity_events.go b/vendor/github.com/google/go-github/github/activity_events.go
index 5cdcabe..f749f6d 100644
--- a/vendor/github.com/google/go-github/github/activity_events.go
+++ b/vendor/github.com/google/go-github/github/activity_events.go
@@ -49,8 +49,6 @@ func (e *Event) Payload() (payload interface{}) {
payload = &IntegrationInstallationEvent{}
case "IntegrationInstallationRepositoriesEvent":
payload = &IntegrationInstallationRepositoriesEvent{}
- case "IssueActivityEvent":
- payload = &IssueActivityEvent{}
case "IssueCommentEvent":
payload = &IssueCommentEvent{}
case "IssuesEvent":
@@ -98,7 +96,7 @@ func (e *Event) Payload() (payload interface{}) {
// ListEvents drinks from the firehose of all public events across GitHub.
//
-// GitHub API docs: http://developer.github.com/v3/activity/events/#list-public-events
+// GitHub API docs: https://developer.github.com/v3/activity/events/#list-public-events
func (s *ActivityService) ListEvents(opt *ListOptions) ([]*Event, *Response, error) {
u, err := addOptions("events", opt)
if err != nil {
@@ -121,7 +119,7 @@ func (s *ActivityService) ListEvents(opt *ListOptions) ([]*Event, *Response, err
// ListRepositoryEvents lists events for a repository.
//
-// GitHub API docs: http://developer.github.com/v3/activity/events/#list-repository-events
+// GitHub API docs: https://developer.github.com/v3/activity/events/#list-repository-events
func (s *ActivityService) ListRepositoryEvents(owner, repo string, opt *ListOptions) ([]*Event, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/events", owner, repo)
u, err := addOptions(u, opt)
@@ -145,7 +143,7 @@ func (s *ActivityService) ListRepositoryEvents(owner, repo string, opt *ListOpti
// ListIssueEventsForRepository lists issue events for a repository.
//
-// GitHub API docs: http://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository
+// GitHub API docs: https://developer.github.com/v3/activity/events/#list-issue-events-for-a-repository
func (s *ActivityService) ListIssueEventsForRepository(owner, repo string, opt *ListOptions) ([]*IssueEvent, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/issues/events", owner, repo)
u, err := addOptions(u, opt)
@@ -169,7 +167,7 @@ func (s *ActivityService) ListIssueEventsForRepository(owner, repo string, opt *
// ListEventsForRepoNetwork lists public events for a network of repositories.
//
-// GitHub API docs: http://developer.github.com/v3/activity/events/#list-public-events-for-a-network-of-repositories
+// GitHub API docs: https://developer.github.com/v3/activity/events/#list-public-events-for-a-network-of-repositories
func (s *ActivityService) ListEventsForRepoNetwork(owner, repo string, opt *ListOptions) ([]*Event, *Response, error) {
u := fmt.Sprintf("networks/%v/%v/events", owner, repo)
u, err := addOptions(u, opt)
@@ -193,7 +191,7 @@ func (s *ActivityService) ListEventsForRepoNetwork(owner, repo string, opt *List
// ListEventsForOrganization lists public events for an organization.
//
-// GitHub API docs: http://developer.github.com/v3/activity/events/#list-public-events-for-an-organization
+// GitHub API docs: https://developer.github.com/v3/activity/events/#list-public-events-for-an-organization
func (s *ActivityService) ListEventsForOrganization(org string, opt *ListOptions) ([]*Event, *Response, error) {
u := fmt.Sprintf("orgs/%v/events", org)
u, err := addOptions(u, opt)
@@ -218,7 +216,7 @@ func (s *ActivityService) ListEventsForOrganization(org string, opt *ListOptions
// ListEventsPerformedByUser lists the events performed by a user. If publicOnly is
// true, only public events will be returned.
//
-// GitHub API docs: http://developer.github.com/v3/activity/events/#list-events-performed-by-a-user
+// GitHub API docs: https://developer.github.com/v3/activity/events/#list-events-performed-by-a-user
func (s *ActivityService) ListEventsPerformedByUser(user string, publicOnly bool, opt *ListOptions) ([]*Event, *Response, error) {
var u string
if publicOnly {
@@ -248,7 +246,7 @@ func (s *ActivityService) ListEventsPerformedByUser(user string, publicOnly bool
// ListEventsReceivedByUser lists the events received by a user. If publicOnly is
// true, only public events will be returned.
//
-// GitHub API docs: http://developer.github.com/v3/activity/events/#list-events-that-a-user-has-received
+// GitHub API docs: https://developer.github.com/v3/activity/events/#list-events-that-a-user-has-received
func (s *ActivityService) ListEventsReceivedByUser(user string, publicOnly bool, opt *ListOptions) ([]*Event, *Response, error) {
var u string
if publicOnly {
@@ -278,7 +276,7 @@ func (s *ActivityService) ListEventsReceivedByUser(user string, publicOnly bool,
// ListUserEventsForOrganization provides the user’s organization dashboard. You
// must be authenticated as the user to view this.
//
-// GitHub API docs: http://developer.github.com/v3/activity/events/#list-events-for-an-organization
+// GitHub API docs: https://developer.github.com/v3/activity/events/#list-events-for-an-organization
func (s *ActivityService) ListUserEventsForOrganization(org, user string, opt *ListOptions) ([]*Event, *Response, error) {
u := fmt.Sprintf("users/%v/events/orgs/%v", user, org)
u, err := addOptions(u, opt)
diff --git a/vendor/github.com/google/go-github/github/activity_notifications.go b/vendor/github.com/google/go-github/github/activity_notifications.go
index b538a7b..5ae80ad 100644
--- a/vendor/github.com/google/go-github/github/activity_notifications.go
+++ b/vendor/github.com/google/go-github/github/activity_notifications.go
@@ -67,7 +67,7 @@ func (s *ActivityService) ListNotifications(opt *NotificationListOptions) ([]*No
return nil, resp, err
}
- return notifications, resp, err
+ return notifications, resp, nil
}
// ListRepositoryNotifications lists all notifications in a given repository
@@ -92,7 +92,7 @@ func (s *ActivityService) ListRepositoryNotifications(owner, repo string, opt *N
return nil, resp, err
}
- return notifications, resp, err
+ return notifications, resp, nil
}
type markReadOptions struct {
@@ -148,7 +148,7 @@ func (s *ActivityService) GetThread(id string) (*Notification, *Response, error)
return nil, resp, err
}
- return notification, resp, err
+ return notification, resp, nil
}
// MarkThreadRead marks the specified thread as read.
@@ -183,7 +183,7 @@ func (s *ActivityService) GetThreadSubscription(id string) (*Subscription, *Resp
return nil, resp, err
}
- return sub, resp, err
+ return sub, resp, nil
}
// SetThreadSubscription sets the subscription for the specified thread for the
@@ -204,7 +204,7 @@ func (s *ActivityService) SetThreadSubscription(id string, subscription *Subscri
return nil, resp, err
}
- return sub, resp, err
+ return sub, resp, nil
}
// DeleteThreadSubscription deletes the subscription for the specified thread
diff --git a/vendor/github.com/google/go-github/github/activity_star.go b/vendor/github.com/google/go-github/github/activity_star.go
index edf20e8..db9a309 100644
--- a/vendor/github.com/google/go-github/github/activity_star.go
+++ b/vendor/github.com/google/go-github/github/activity_star.go
@@ -49,21 +49,21 @@ func (s *ActivityService) ListStargazers(owner, repo string, opt *ListOptions) (
// ActivityListStarredOptions specifies the optional parameters to the
// ActivityService.ListStarred method.
type ActivityListStarredOptions struct {
- // How to sort the repository list. Possible values are: created, updated,
- // pushed, full_name. Default is "full_name".
+ // How to sort the repository list. Possible values are: created, updated,
+ // pushed, full_name. Default is "full_name".
Sort string `url:"sort,omitempty"`
- // Direction in which to sort repositories. Possible values are: asc, desc.
+ // Direction in which to sort repositories. Possible values are: asc, desc.
// Default is "asc" when sort is "full_name", otherwise default is "desc".
Direction string `url:"direction,omitempty"`
ListOptions
}
-// ListStarred lists all the repos starred by a user. Passing the empty string
+// ListStarred lists all the repos starred by a user. Passing the empty string
// will list the starred repositories for the authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/activity/starring/#list-repositories-being-starred
+// GitHub API docs: https://developer.github.com/v3/activity/starring/#list-repositories-being-starred
func (s *ActivityService) ListStarred(user string, opt *ActivityListStarredOptions) ([]*StarredRepository, *Response, error) {
var u string
if user != "" {
diff --git a/vendor/github.com/google/go-github/github/activity_watching.go b/vendor/github.com/google/go-github/github/activity_watching.go
index ac77657..d8ee72d 100644
--- a/vendor/github.com/google/go-github/github/activity_watching.go
+++ b/vendor/github.com/google/go-github/github/activity_watching.go
@@ -24,7 +24,7 @@ type Subscription struct {
// ListWatchers lists watchers of a particular repo.
//
-// GitHub API Docs: http://developer.github.com/v3/activity/watching/#list-watchers
+// GitHub API Docs: https://developer.github.com/v3/activity/watching/#list-watchers
func (s *ActivityService) ListWatchers(owner, repo string, opt *ListOptions) ([]*User, *Response, error) {
u := fmt.Sprintf("repos/%s/%s/subscribers", owner, repo)
u, err := addOptions(u, opt)
@@ -46,7 +46,7 @@ func (s *ActivityService) ListWatchers(owner, repo string, opt *ListOptions) ([]
return watchers, resp, nil
}
-// ListWatched lists the repositories the specified user is watching. Passing
+// ListWatched lists the repositories the specified user is watching. Passing
// the empty string will fetch watched repos for the authenticated user.
//
// GitHub API Docs: https://developer.github.com/v3/activity/watching/#list-repositories-being-watched
@@ -77,7 +77,7 @@ func (s *ActivityService) ListWatched(user string, opt *ListOptions) ([]*Reposit
}
// GetRepositorySubscription returns the subscription for the specified
-// repository for the authenticated user. If the authenticated user is not
+// repository for the authenticated user. If the authenticated user is not
// watching the repository, a nil Subscription is returned.
//
// GitHub API Docs: https://developer.github.com/v3/activity/watching/#get-a-repository-subscription
@@ -97,7 +97,7 @@ func (s *ActivityService) GetRepositorySubscription(owner, repo string) (*Subscr
return nil, resp, err
}
- return sub, resp, err
+ return sub, resp, nil
}
// SetRepositorySubscription sets the subscription for the specified repository
@@ -122,7 +122,7 @@ func (s *ActivityService) SetRepositorySubscription(owner, repo string, subscrip
return nil, resp, err
}
- return sub, resp, err
+ return sub, resp, nil
}
// DeleteRepositorySubscription deletes the subscription for the specified
diff --git a/vendor/github.com/google/go-github/github/admin.go b/vendor/github.com/google/go-github/github/admin.go
index 44d7a9f..f77b2a2 100644
--- a/vendor/github.com/google/go-github/github/admin.go
+++ b/vendor/github.com/google/go-github/github/admin.go
@@ -75,7 +75,7 @@ func (s *AdminService) UpdateUserLDAPMapping(user string, mapping *UserLDAPMappi
return nil, resp, err
}
- return m, resp, err
+ return m, resp, nil
}
// UpdateTeamLDAPMapping updates the mapping between a GitHub team and an LDAP group.
@@ -94,5 +94,5 @@ func (s *AdminService) UpdateTeamLDAPMapping(team int, mapping *TeamLDAPMapping)
return nil, resp, err
}
- return m, resp, err
+ return m, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/authorizations.go b/vendor/github.com/google/go-github/github/authorizations.go
index 9f2a1ec..b50de5e 100644
--- a/vendor/github.com/google/go-github/github/authorizations.go
+++ b/vendor/github.com/google/go-github/github/authorizations.go
@@ -114,7 +114,7 @@ func (a AuthorizationRequest) String() string {
// AuthorizationUpdateRequest represents a request to update an authorization.
//
// Note that for any one update, you must only provide one of the "scopes"
-// fields. That is, you may provide only one of "Scopes", or "AddScopes", or
+// fields. That is, you may provide only one of "Scopes", or "AddScopes", or
// "RemoveScopes".
//
// GitHub API docs: https://developer.github.com/v3/oauth_authorizations/#update-an-existing-authorization
@@ -170,7 +170,7 @@ func (s *AuthorizationsService) Get(id int) (*Authorization, *Response, error) {
if err != nil {
return nil, resp, err
}
- return a, resp, err
+ return a, resp, nil
}
// Create a new authorization for the specified OAuth application.
@@ -189,7 +189,7 @@ func (s *AuthorizationsService) Create(auth *AuthorizationRequest) (*Authorizati
if err != nil {
return nil, resp, err
}
- return a, resp, err
+ return a, resp, nil
}
// GetOrCreateForApp creates a new authorization for the specified OAuth
@@ -225,7 +225,7 @@ func (s *AuthorizationsService) GetOrCreateForApp(clientID string, auth *Authori
return nil, resp, err
}
- return a, resp, err
+ return a, resp, nil
}
// Edit a single authorization.
@@ -245,7 +245,7 @@ func (s *AuthorizationsService) Edit(id int, auth *AuthorizationUpdateRequest) (
return nil, resp, err
}
- return a, resp, err
+ return a, resp, nil
}
// Delete a single authorization.
@@ -285,7 +285,7 @@ func (s *AuthorizationsService) Check(clientID string, token string) (*Authoriza
return nil, resp, err
}
- return a, resp, err
+ return a, resp, nil
}
// Reset is used to reset a valid OAuth token without end user involvement.
@@ -313,7 +313,7 @@ func (s *AuthorizationsService) Reset(clientID string, token string) (*Authoriza
return nil, resp, err
}
- return a, resp, err
+ return a, resp, nil
}
// Revoke an authorization for an application.
@@ -352,7 +352,7 @@ func (s *AuthorizationsService) ListGrants() ([]*Grant, *Response, error) {
return nil, resp, err
}
- return grants, resp, err
+ return grants, resp, nil
}
// GetGrant gets a single OAuth application grant.
@@ -371,7 +371,7 @@ func (s *AuthorizationsService) GetGrant(id int) (*Grant, *Response, error) {
return nil, resp, err
}
- return grant, resp, err
+ return grant, resp, nil
}
// DeleteGrant deletes an OAuth application grant. Deleting an application's
@@ -408,7 +408,7 @@ func (s *AuthorizationsService) CreateImpersonation(username string, authReq *Au
if err != nil {
return nil, resp, err
}
- return a, resp, err
+ return a, resp, nil
}
// DeleteImpersonation deletes an impersonation OAuth token.
diff --git a/vendor/github.com/google/go-github/github/doc.go b/vendor/github.com/google/go-github/github/doc.go
index 659dd82..28ef1df 100644
--- a/vendor/github.com/google/go-github/github/doc.go
+++ b/vendor/github.com/google/go-github/github/doc.go
@@ -28,7 +28,7 @@ Some API methods have optional parameters that can be passed. For example:
The services of a client divide the API into logical chunks and correspond to
the structure of the GitHub API documentation at
-http://developer.github.com/v3/.
+https://developer.github.com/v3/.
Authentication
@@ -84,7 +84,7 @@ To detect an API rate limit error, you can check if its type is *github.RateLimi
}
Learn more about GitHub rate limiting at
-http://developer.github.com/v3/#rate-limiting.
+https://developer.github.com/v3/#rate-limiting.
Accepted Status
diff --git a/vendor/github.com/google/go-github/github/event_types.go b/vendor/github.com/google/go-github/github/event_types.go
index 6dd7fe3..b98492e 100644
--- a/vendor/github.com/google/go-github/github/event_types.go
+++ b/vendor/github.com/google/go-github/github/event_types.go
@@ -130,19 +130,6 @@ type GollumEvent struct {
Installation *Installation `json:"installation,omitempty"`
}
-// IssueActivityEvent represents the payload delivered by Issue webhook.
-//
-// Deprecated: Use IssuesEvent instead.
-type IssueActivityEvent struct {
- Action *string `json:"action,omitempty"`
- Issue *Issue `json:"issue,omitempty"`
-
- // The following fields are only populated by Webhook events.
- Repo *Repository `json:"repository,omitempty"`
- Sender *User `json:"sender,omitempty"`
- Installation *Installation `json:"installation,omitempty"`
-}
-
// EditChange represents the changes when an issue, pull request, or comment has
// been edited.
type EditChange struct {
@@ -421,7 +408,7 @@ type PullRequestReviewCommentEvent struct {
// PushEvent represents a git push to a GitHub repository.
//
-// GitHub API docs: http://developer.github.com/v3/activity/events/types/#pushevent
+// GitHub API docs: https://developer.github.com/v3/activity/events/types/#pushevent
type PushEvent struct {
PushID *int `json:"push_id,omitempty"`
Head *string `json:"head,omitempty"`
diff --git a/vendor/github.com/google/go-github/github/gists.go b/vendor/github.com/google/go-github/github/gists.go
index 81f55b1..f727f54 100644
--- a/vendor/github.com/google/go-github/github/gists.go
+++ b/vendor/github.com/google/go-github/github/gists.go
@@ -13,7 +13,7 @@ import (
// GistsService handles communication with the Gist related
// methods of the GitHub API.
//
-// GitHub API docs: http://developer.github.com/v3/gists/
+// GitHub API docs: https://developer.github.com/v3/gists/
type GistsService service
// Gist represents a GitHub's gist.
@@ -92,7 +92,7 @@ type GistListOptions struct {
// is authenticated, it will returns all gists for the authenticated
// user.
//
-// GitHub API docs: http://developer.github.com/v3/gists/#list-gists
+// GitHub API docs: https://developer.github.com/v3/gists/#list-gists
func (s *GistsService) List(user string, opt *GistListOptions) ([]*Gist, *Response, error) {
var u string
if user != "" {
@@ -121,7 +121,7 @@ func (s *GistsService) List(user string, opt *GistListOptions) ([]*Gist, *Respon
// ListAll lists all public gists.
//
-// GitHub API docs: http://developer.github.com/v3/gists/#list-gists
+// GitHub API docs: https://developer.github.com/v3/gists/#list-gists
func (s *GistsService) ListAll(opt *GistListOptions) ([]*Gist, *Response, error) {
u, err := addOptions("gists/public", opt)
if err != nil {
@@ -144,7 +144,7 @@ func (s *GistsService) ListAll(opt *GistListOptions) ([]*Gist, *Response, error)
// ListStarred lists starred gists of authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/gists/#list-gists
+// GitHub API docs: https://developer.github.com/v3/gists/#list-gists
func (s *GistsService) ListStarred(opt *GistListOptions) ([]*Gist, *Response, error) {
u, err := addOptions("gists/starred", opt)
if err != nil {
@@ -167,7 +167,7 @@ func (s *GistsService) ListStarred(opt *GistListOptions) ([]*Gist, *Response, er
// Get a single gist.
//
-// GitHub API docs: http://developer.github.com/v3/gists/#get-a-single-gist
+// GitHub API docs: https://developer.github.com/v3/gists/#get-a-single-gist
func (s *GistsService) Get(id string) (*Gist, *Response, error) {
u := fmt.Sprintf("gists/%v", id)
req, err := s.client.NewRequest("GET", u, nil)
@@ -180,7 +180,7 @@ func (s *GistsService) Get(id string) (*Gist, *Response, error) {
return nil, resp, err
}
- return gist, resp, err
+ return gist, resp, nil
}
// GetRevision gets a specific revision of a gist.
@@ -198,12 +198,12 @@ func (s *GistsService) GetRevision(id, sha string) (*Gist, *Response, error) {
return nil, resp, err
}
- return gist, resp, err
+ return gist, resp, nil
}
// Create a gist for authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/gists/#create-a-gist
+// GitHub API docs: https://developer.github.com/v3/gists/#create-a-gist
func (s *GistsService) Create(gist *Gist) (*Gist, *Response, error) {
u := "gists"
req, err := s.client.NewRequest("POST", u, gist)
@@ -216,12 +216,12 @@ func (s *GistsService) Create(gist *Gist) (*Gist, *Response, error) {
return nil, resp, err
}
- return g, resp, err
+ return g, resp, nil
}
// Edit a gist.
//
-// GitHub API docs: http://developer.github.com/v3/gists/#edit-a-gist
+// GitHub API docs: https://developer.github.com/v3/gists/#edit-a-gist
func (s *GistsService) Edit(id string, gist *Gist) (*Gist, *Response, error) {
u := fmt.Sprintf("gists/%v", id)
req, err := s.client.NewRequest("PATCH", u, gist)
@@ -234,7 +234,7 @@ func (s *GistsService) Edit(id string, gist *Gist) (*Gist, *Response, error) {
return nil, resp, err
}
- return g, resp, err
+ return g, resp, nil
}
// ListCommits lists commits of a gist.
@@ -258,7 +258,7 @@ func (s *GistsService) ListCommits(id string) ([]*GistCommit, *Response, error)
// Delete a gist.
//
-// GitHub API docs: http://developer.github.com/v3/gists/#delete-a-gist
+// GitHub API docs: https://developer.github.com/v3/gists/#delete-a-gist
func (s *GistsService) Delete(id string) (*Response, error) {
u := fmt.Sprintf("gists/%v", id)
req, err := s.client.NewRequest("DELETE", u, nil)
@@ -270,7 +270,7 @@ func (s *GistsService) Delete(id string) (*Response, error) {
// Star a gist on behalf of authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/gists/#star-a-gist
+// GitHub API docs: https://developer.github.com/v3/gists/#star-a-gist
func (s *GistsService) Star(id string) (*Response, error) {
u := fmt.Sprintf("gists/%v/star", id)
req, err := s.client.NewRequest("PUT", u, nil)
@@ -282,7 +282,7 @@ func (s *GistsService) Star(id string) (*Response, error) {
// Unstar a gist on a behalf of authenticated user.
//
-// Github API docs: http://developer.github.com/v3/gists/#unstar-a-gist
+// Github API docs: https://developer.github.com/v3/gists/#unstar-a-gist
func (s *GistsService) Unstar(id string) (*Response, error) {
u := fmt.Sprintf("gists/%v/star", id)
req, err := s.client.NewRequest("DELETE", u, nil)
@@ -294,7 +294,7 @@ func (s *GistsService) Unstar(id string) (*Response, error) {
// IsStarred checks if a gist is starred by authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/gists/#check-if-a-gist-is-starred
+// GitHub API docs: https://developer.github.com/v3/gists/#check-if-a-gist-is-starred
func (s *GistsService) IsStarred(id string) (bool, *Response, error) {
u := fmt.Sprintf("gists/%v/star", id)
req, err := s.client.NewRequest("GET", u, nil)
@@ -308,7 +308,7 @@ func (s *GistsService) IsStarred(id string) (bool, *Response, error) {
// Fork a gist.
//
-// GitHub API docs: http://developer.github.com/v3/gists/#fork-a-gist
+// GitHub API docs: https://developer.github.com/v3/gists/#fork-a-gist
func (s *GistsService) Fork(id string) (*Gist, *Response, error) {
u := fmt.Sprintf("gists/%v/forks", id)
req, err := s.client.NewRequest("POST", u, nil)
@@ -322,7 +322,7 @@ func (s *GistsService) Fork(id string) (*Gist, *Response, error) {
return nil, resp, err
}
- return g, resp, err
+ return g, resp, nil
}
// ListForks lists forks of a gist.
diff --git a/vendor/github.com/google/go-github/github/gists_comments.go b/vendor/github.com/google/go-github/github/gists_comments.go
index 71c1c01..84af61c 100644
--- a/vendor/github.com/google/go-github/github/gists_comments.go
+++ b/vendor/github.com/google/go-github/github/gists_comments.go
@@ -25,7 +25,7 @@ func (g GistComment) String() string {
// ListComments lists all comments for a gist.
//
-// GitHub API docs: http://developer.github.com/v3/gists/comments/#list-comments-on-a-gist
+// GitHub API docs: https://developer.github.com/v3/gists/comments/#list-comments-on-a-gist
func (s *GistsService) ListComments(gistID string, opt *ListOptions) ([]*GistComment, *Response, error) {
u := fmt.Sprintf("gists/%v/comments", gistID)
u, err := addOptions(u, opt)
@@ -49,7 +49,7 @@ func (s *GistsService) ListComments(gistID string, opt *ListOptions) ([]*GistCom
// GetComment retrieves a single comment from a gist.
//
-// GitHub API docs: http://developer.github.com/v3/gists/comments/#get-a-single-comment
+// GitHub API docs: https://developer.github.com/v3/gists/comments/#get-a-single-comment
func (s *GistsService) GetComment(gistID string, commentID int) (*GistComment, *Response, error) {
u := fmt.Sprintf("gists/%v/comments/%v", gistID, commentID)
req, err := s.client.NewRequest("GET", u, nil)
@@ -63,12 +63,12 @@ func (s *GistsService) GetComment(gistID string, commentID int) (*GistComment, *
return nil, resp, err
}
- return c, resp, err
+ return c, resp, nil
}
// CreateComment creates a comment for a gist.
//
-// GitHub API docs: http://developer.github.com/v3/gists/comments/#create-a-comment
+// GitHub API docs: https://developer.github.com/v3/gists/comments/#create-a-comment
func (s *GistsService) CreateComment(gistID string, comment *GistComment) (*GistComment, *Response, error) {
u := fmt.Sprintf("gists/%v/comments", gistID)
req, err := s.client.NewRequest("POST", u, comment)
@@ -82,12 +82,12 @@ func (s *GistsService) CreateComment(gistID string, comment *GistComment) (*Gist
return nil, resp, err
}
- return c, resp, err
+ return c, resp, nil
}
// EditComment edits an existing gist comment.
//
-// GitHub API docs: http://developer.github.com/v3/gists/comments/#edit-a-comment
+// GitHub API docs: https://developer.github.com/v3/gists/comments/#edit-a-comment
func (s *GistsService) EditComment(gistID string, commentID int, comment *GistComment) (*GistComment, *Response, error) {
u := fmt.Sprintf("gists/%v/comments/%v", gistID, commentID)
req, err := s.client.NewRequest("PATCH", u, comment)
@@ -101,12 +101,12 @@ func (s *GistsService) EditComment(gistID string, commentID int, comment *GistCo
return nil, resp, err
}
- return c, resp, err
+ return c, resp, nil
}
// DeleteComment deletes a gist comment.
//
-// GitHub API docs: http://developer.github.com/v3/gists/comments/#delete-a-comment
+// GitHub API docs: https://developer.github.com/v3/gists/comments/#delete-a-comment
func (s *GistsService) DeleteComment(gistID string, commentID int) (*Response, error) {
u := fmt.Sprintf("gists/%v/comments/%v", gistID, commentID)
req, err := s.client.NewRequest("DELETE", u, nil)
diff --git a/vendor/github.com/google/go-github/github/git.go b/vendor/github.com/google/go-github/github/git.go
index c934751..1ce4743 100644
--- a/vendor/github.com/google/go-github/github/git.go
+++ b/vendor/github.com/google/go-github/github/git.go
@@ -8,5 +8,5 @@ package github
// GitService handles communication with the git data related
// methods of the GitHub API.
//
-// GitHub API docs: http://developer.github.com/v3/git/
+// GitHub API docs: https://developer.github.com/v3/git/
type GitService service
diff --git a/vendor/github.com/google/go-github/github/git_blobs.go b/vendor/github.com/google/go-github/github/git_blobs.go
index 55148fd..5a46708 100644
--- a/vendor/github.com/google/go-github/github/git_blobs.go
+++ b/vendor/github.com/google/go-github/github/git_blobs.go
@@ -18,7 +18,7 @@ type Blob struct {
// GetBlob fetchs a blob from a repo given a SHA.
//
-// GitHub API docs: http://developer.github.com/v3/git/blobs/#get-a-blob
+// GitHub API docs: https://developer.github.com/v3/git/blobs/#get-a-blob
func (s *GitService) GetBlob(owner string, repo string, sha string) (*Blob, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/git/blobs/%v", owner, repo, sha)
req, err := s.client.NewRequest("GET", u, nil)
diff --git a/vendor/github.com/google/go-github/github/git_commits.go b/vendor/github.com/google/go-github/github/git_commits.go
index 0bcad41..29e0574 100644
--- a/vendor/github.com/google/go-github/github/git_commits.go
+++ b/vendor/github.com/google/go-github/github/git_commits.go
@@ -30,7 +30,7 @@ type Commit struct {
URL *string `json:"url,omitempty"`
Verification *SignatureVerification `json:"verification,omitempty"`
- // CommentCount is the number of GitHub comments on the commit. This
+ // CommentCount is the number of GitHub comments on the commit. This
// is only populated for requests that fetch GitHub data like
// Pulls.ListCommits, Repositories.ListCommits, etc.
CommentCount *int `json:"comment_count,omitempty"`
@@ -40,7 +40,7 @@ func (c Commit) String() string {
return Stringify(c)
}
-// CommitAuthor represents the author or committer of a commit. The commit
+// CommitAuthor represents the author or committer of a commit. The commit
// author may not correspond to a GitHub User.
type CommitAuthor struct {
Date *time.Time `json:"date,omitempty"`
@@ -57,7 +57,7 @@ func (c CommitAuthor) String() string {
// GetCommit fetchs the Commit object for a given SHA.
//
-// GitHub API docs: http://developer.github.com/v3/git/commits/#get-a-commit
+// GitHub API docs: https://developer.github.com/v3/git/commits/#get-a-commit
func (s *GitService) GetCommit(owner string, repo string, sha string) (*Commit, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/git/commits/%v", owner, repo, sha)
req, err := s.client.NewRequest("GET", u, nil)
@@ -74,7 +74,7 @@ func (s *GitService) GetCommit(owner string, repo string, sha string) (*Commit,
return nil, resp, err
}
- return c, resp, err
+ return c, resp, nil
}
// createCommit represents the body of a CreateCommit request.
@@ -92,7 +92,7 @@ type createCommit struct {
// data if omitted. If the commit.Author is omitted, it will be filled in with
// the authenticated user’s information and the current date.
//
-// GitHub API docs: http://developer.github.com/v3/git/commits/#create-a-commit
+// GitHub API docs: https://developer.github.com/v3/git/commits/#create-a-commit
func (s *GitService) CreateCommit(owner string, repo string, commit *Commit) (*Commit, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/git/commits", owner, repo)
@@ -123,5 +123,5 @@ func (s *GitService) CreateCommit(owner string, repo string, commit *Commit) (*C
return nil, resp, err
}
- return c, resp, err
+ return c, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/git_refs.go b/vendor/github.com/google/go-github/github/git_refs.go
index 16cbd6b..bcec615 100644
--- a/vendor/github.com/google/go-github/github/git_refs.go
+++ b/vendor/github.com/google/go-github/github/git_refs.go
@@ -46,7 +46,7 @@ type updateRefRequest struct {
// GetRef fetches the Reference object for a given Git ref.
//
-// GitHub API docs: http://developer.github.com/v3/git/refs/#get-a-reference
+// GitHub API docs: https://developer.github.com/v3/git/refs/#get-a-reference
func (s *GitService) GetRef(owner string, repo string, ref string) (*Reference, *Response, error) {
ref = strings.TrimPrefix(ref, "refs/")
u := fmt.Sprintf("repos/%v/%v/git/refs/%v", owner, repo, ref)
@@ -61,7 +61,7 @@ func (s *GitService) GetRef(owner string, repo string, ref string) (*Reference,
return nil, resp, err
}
- return r, resp, err
+ return r, resp, nil
}
// ReferenceListOptions specifies optional parameters to the
@@ -74,7 +74,7 @@ type ReferenceListOptions struct {
// ListRefs lists all refs in a repository.
//
-// GitHub API docs: http://developer.github.com/v3/git/refs/#get-all-references
+// GitHub API docs: https://developer.github.com/v3/git/refs/#get-all-references
func (s *GitService) ListRefs(owner, repo string, opt *ReferenceListOptions) ([]*Reference, *Response, error) {
var u string
if opt != nil && opt.Type != "" {
@@ -98,12 +98,12 @@ func (s *GitService) ListRefs(owner, repo string, opt *ReferenceListOptions) ([]
return nil, resp, err
}
- return rs, resp, err
+ return rs, resp, nil
}
// CreateRef creates a new ref in a repository.
//
-// GitHub API docs: http://developer.github.com/v3/git/refs/#create-a-reference
+// GitHub API docs: https://developer.github.com/v3/git/refs/#create-a-reference
func (s *GitService) CreateRef(owner string, repo string, ref *Reference) (*Reference, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/git/refs", owner, repo)
req, err := s.client.NewRequest("POST", u, &createRefRequest{
@@ -121,12 +121,12 @@ func (s *GitService) CreateRef(owner string, repo string, ref *Reference) (*Refe
return nil, resp, err
}
- return r, resp, err
+ return r, resp, nil
}
// UpdateRef updates an existing ref in a repository.
//
-// GitHub API docs: http://developer.github.com/v3/git/refs/#update-a-reference
+// GitHub API docs: https://developer.github.com/v3/git/refs/#update-a-reference
func (s *GitService) UpdateRef(owner string, repo string, ref *Reference, force bool) (*Reference, *Response, error) {
refPath := strings.TrimPrefix(*ref.Ref, "refs/")
u := fmt.Sprintf("repos/%v/%v/git/refs/%v", owner, repo, refPath)
@@ -144,12 +144,12 @@ func (s *GitService) UpdateRef(owner string, repo string, ref *Reference, force
return nil, resp, err
}
- return r, resp, err
+ return r, resp, nil
}
// DeleteRef deletes a ref from a repository.
//
-// GitHub API docs: http://developer.github.com/v3/git/refs/#delete-a-reference
+// GitHub API docs: https://developer.github.com/v3/git/refs/#delete-a-reference
func (s *GitService) DeleteRef(owner string, repo string, ref string) (*Response, error) {
ref = strings.TrimPrefix(ref, "refs/")
u := fmt.Sprintf("repos/%v/%v/git/refs/%v", owner, repo, ref)
diff --git a/vendor/github.com/google/go-github/github/git_tags.go b/vendor/github.com/google/go-github/github/git_tags.go
index 01b9cb2..a58858b 100644
--- a/vendor/github.com/google/go-github/github/git_tags.go
+++ b/vendor/github.com/google/go-github/github/git_tags.go
@@ -20,7 +20,7 @@ type Tag struct {
Verification *SignatureVerification `json:"verification,omitempty"`
}
-// createTagRequest represents the body of a CreateTag request. This is mostly
+// createTagRequest represents the body of a CreateTag request. This is mostly
// identical to Tag with the exception that the object SHA and Type are
// top-level fields, rather than being nested inside a JSON object.
type createTagRequest struct {
@@ -33,7 +33,7 @@ type createTagRequest struct {
// GetTag fetchs a tag from a repo given a SHA.
//
-// GitHub API docs: http://developer.github.com/v3/git/tags/#get-a-tag
+// GitHub API docs: https://developer.github.com/v3/git/tags/#get-a-tag
func (s *GitService) GetTag(owner string, repo string, sha string) (*Tag, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/git/tags/%v", owner, repo, sha)
req, err := s.client.NewRequest("GET", u, nil)
@@ -51,7 +51,7 @@ func (s *GitService) GetTag(owner string, repo string, sha string) (*Tag, *Respo
// CreateTag creates a tag object.
//
-// GitHub API docs: http://developer.github.com/v3/git/tags/#create-a-tag-object
+// GitHub API docs: https://developer.github.com/v3/git/tags/#create-a-tag-object
func (s *GitService) CreateTag(owner string, repo string, tag *Tag) (*Tag, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/git/tags", owner, repo)
diff --git a/vendor/github.com/google/go-github/github/git_trees.go b/vendor/github.com/google/go-github/github/git_trees.go
index 9efa4b3..13acfa6 100644
--- a/vendor/github.com/google/go-github/github/git_trees.go
+++ b/vendor/github.com/google/go-github/github/git_trees.go
@@ -17,7 +17,7 @@ func (t Tree) String() string {
return Stringify(t)
}
-// TreeEntry represents the contents of a tree structure. TreeEntry can
+// TreeEntry represents the contents of a tree structure. TreeEntry can
// represent either a blob, a commit (in the case of a submodule), or another
// tree.
type TreeEntry struct {
@@ -35,7 +35,7 @@ func (t TreeEntry) String() string {
// GetTree fetches the Tree object for a given sha hash from a repository.
//
-// GitHub API docs: http://developer.github.com/v3/git/trees/#get-a-tree
+// GitHub API docs: https://developer.github.com/v3/git/trees/#get-a-tree
func (s *GitService) GetTree(owner string, repo string, sha string, recursive bool) (*Tree, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/git/trees/%v", owner, repo, sha)
if recursive {
@@ -53,7 +53,7 @@ func (s *GitService) GetTree(owner string, repo string, sha string, recursive bo
return nil, resp, err
}
- return t, resp, err
+ return t, resp, nil
}
// createTree represents the body of a CreateTree request.
@@ -62,11 +62,11 @@ type createTree struct {
Entries []TreeEntry `json:"tree"`
}
-// CreateTree creates a new tree in a repository. If both a tree and a nested
+// CreateTree creates a new tree in a repository. If both a tree and a nested
// path modifying that tree are specified, it will overwrite the contents of
// that tree with the new path contents and write a new tree out.
//
-// GitHub API docs: http://developer.github.com/v3/git/trees/#create-a-tree
+// GitHub API docs: https://developer.github.com/v3/git/trees/#create-a-tree
func (s *GitService) CreateTree(owner string, repo string, baseTree string, entries []TreeEntry) (*Tree, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/git/trees", owner, repo)
@@ -85,5 +85,5 @@ func (s *GitService) CreateTree(owner string, repo string, baseTree string, entr
return nil, resp, err
}
- return t, resp, err
+ return t, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/github.go b/vendor/github.com/google/go-github/github/github.go
index a58dbfb..0f3145a 100644
--- a/vendor/github.com/google/go-github/github/github.go
+++ b/vendor/github.com/google/go-github/github/github.go
@@ -24,12 +24,7 @@ import (
)
const (
- // StatusUnprocessableEntity is the status code returned when sending a request with invalid fields.
- StatusUnprocessableEntity = 422
-)
-
-const (
- libraryVersion = "2"
+ libraryVersion = "3"
defaultBaseURL = "https://api.github.com/"
uploadBaseURL = "https://uploads.github.com/"
userAgent = "go-github/" + libraryVersion
@@ -106,8 +101,8 @@ type Client struct {
clientMu sync.Mutex // clientMu protects the client during calls that modify the CheckRedirect func.
client *http.Client // HTTP client used to communicate with the API.
- // Base URL for API requests. Defaults to the public GitHub API, but can be
- // set to a domain endpoint to use with GitHub Enterprise. BaseURL should
+ // Base URL for API requests. Defaults to the public GitHub API, but can be
+ // set to a domain endpoint to use with GitHub Enterprise. BaseURL should
// always be specified with a trailing slash.
BaseURL *url.URL
@@ -119,7 +114,6 @@ type Client struct {
rateMu sync.Mutex
rateLimits [categories]Rate // Rate limits for the client as determined by the most recent API calls.
- mostRecent rateLimitCategory
common service // Reuse a single struct instead of allocating one for each service on the heap.
@@ -178,7 +172,7 @@ type RawOptions struct {
Type RawType
}
-// addOptions adds the parameters in opt as URL query parameters to s. opt
+// addOptions adds the parameters in opt as URL query parameters to s. opt
// must be a struct whose fields may contain "url" tags.
func addOptions(s string, opt interface{}) (string, error) {
v := reflect.ValueOf(opt)
@@ -200,8 +194,8 @@ func addOptions(s string, opt interface{}) (string, error) {
return u.String(), nil
}
-// NewClient returns a new GitHub API client. If a nil httpClient is
-// provided, http.DefaultClient will be used. To use API methods which require
+// NewClient returns a new GitHub API client. If a nil httpClient is
+// provided, http.DefaultClient will be used. To use API methods which require
// authentication, provide an http.Client that will perform the authentication
// for you (such as that provided by the golang.org/x/oauth2 library).
func NewClient(httpClient *http.Client) *Client {
@@ -235,7 +229,7 @@ func NewClient(httpClient *http.Client) *Client {
// NewRequest creates an API request. A relative URL can be provided in urlStr,
// in which case it is resolved relative to the BaseURL of the Client.
-// Relative URLs should always be specified without a preceding slash. If
+// Relative URLs should always be specified without a preceding slash. If
// specified, the value pointed to by body is JSON encoded and included as the
// request body.
func (c *Client) NewRequest(method, urlStr string, body interface{}) (*http.Request, error) {
@@ -295,14 +289,14 @@ func (c *Client) NewUploadRequest(urlStr string, reader io.Reader, size int64, m
return req, nil
}
-// Response is a GitHub API response. This wraps the standard http.Response
+// Response is a GitHub API response. This wraps the standard http.Response
// returned from GitHub and provides convenient access to things like
// pagination links.
type Response struct {
*http.Response
// These fields provide the page values for paginating through a set of
- // results. Any or all of these may be set to the zero value for
+ // results. Any or all of these may be set to the zero value for
// responses that are not part of a paginated set, or for which there
// are no additional pages.
@@ -383,24 +377,11 @@ func parseRate(r *http.Response) Rate {
return rate
}
-// Rate specifies the current rate limit for the client as determined by the
-// most recent API call. If the client is used in a multi-user application,
-// this rate may not always be up-to-date.
-//
-// Deprecated: Use the Response.Rate returned from most recent API call instead.
-// Call RateLimits() to check the current rate.
-func (c *Client) Rate() Rate {
- c.rateMu.Lock()
- rate := c.rateLimits[c.mostRecent]
- c.rateMu.Unlock()
- return rate
-}
-
-// Do sends an API request and returns the API response. The API response is
+// Do sends an API request and returns the API response. The API response is
// JSON decoded and stored in the value pointed to by v, or returned as an
-// error if an API error has occurred. If v implements the io.Writer
+// error if an API error has occurred. If v implements the io.Writer
// interface, the raw response body will be written to v, without attempting to
-// first decode it. If rate limit is exceeded and reset time is in the future,
+// first decode it. If rate limit is exceeded and reset time is in the future,
// Do returns *RateLimitError immediately without making a network API call.
func (c *Client) Do(req *http.Request, v interface{}) (*Response, error) {
rateLimitCategory := category(req.URL.Path)
@@ -431,7 +412,6 @@ func (c *Client) Do(req *http.Request, v interface{}) (*Response, error) {
c.rateMu.Lock()
c.rateLimits[rateLimitCategory] = response.Rate
- c.mostRecent = rateLimitCategory
c.rateMu.Unlock()
err = CheckResponse(resp)
@@ -485,7 +465,7 @@ func (c *Client) checkRateLimitBeforeDo(req *http.Request, rateLimitCategory rat
/*
An ErrorResponse reports one or more errors caused by an API request.
-GitHub API docs: http://developer.github.com/v3/#client-errors
+GitHub API docs: https://developer.github.com/v3/#client-errors
*/
type ErrorResponse struct {
Response *http.Response // HTTP response that caused this error
@@ -511,7 +491,7 @@ func (r *ErrorResponse) Error() string {
}
// TwoFactorAuthError occurs when using HTTP Basic Authentication for a user
-// that has two-factor authentication enabled. The request can be reattempted
+// that has two-factor authentication enabled. The request can be reattempted
// by providing a one-time password in the request.
type TwoFactorAuthError ErrorResponse
@@ -591,7 +571,7 @@ These are the possible validation error codes:
some resources return this (e.g. github.User.CreateKey()), additional
information is set in the Message field of the Error
-GitHub API docs: http://developer.github.com/v3/#client-errors
+GitHub API docs: https://developer.github.com/v3/#client-errors
*/
type Error struct {
Resource string `json:"resource"` // resource on which the error occurred
@@ -609,7 +589,7 @@ func (e *Error) Error() string {
// present. A response is considered an error if it has a status code outside
// the 200 range or equal to 202 Accepted.
// API error responses are expected to have either no response
-// body, or a JSON response body that maps to ErrorResponse. Any other
+// body, or a JSON response body that maps to ErrorResponse. Any other
// response body will be silently ignored.
//
// The error type will be *RateLimitError for rate limit exceeded errors,
@@ -658,15 +638,15 @@ func CheckResponse(r *http.Response) error {
// parseBoolResponse determines the boolean result from a GitHub API response.
// Several GitHub API methods return boolean responses indicated by the HTTP
// status code in the response (true indicated by a 204, false indicated by a
-// 404). This helper function will determine that result and hide the 404
-// error if present. Any other error will be returned through as-is.
+// 404). This helper function will determine that result and hide the 404
+// error if present. Any other error will be returned through as-is.
func parseBoolResponse(err error) (bool, error) {
if err == nil {
return true, nil
}
if err, ok := err.(*ErrorResponse); ok && err.Response.StatusCode == http.StatusNotFound {
- // Simply false. In this one case, we do not pass the error through.
+ // Simply false. In this one case, we do not pass the error through.
return false, nil
}
@@ -692,15 +672,15 @@ func (r Rate) String() string {
// RateLimits represents the rate limits for the current client.
type RateLimits struct {
- // The rate limit for non-search API requests. Unauthenticated
- // requests are limited to 60 per hour. Authenticated requests are
+ // The rate limit for non-search API requests. Unauthenticated
+ // requests are limited to 60 per hour. Authenticated requests are
// limited to 5,000 per hour.
//
// GitHub API docs: https://developer.github.com/v3/#rate-limiting
Core *Rate `json:"core"`
- // The rate limit for search API requests. Unauthenticated requests
- // are limited to 10 requests per minutes. Authenticated requests are
+ // The rate limit for search API requests. Unauthenticated requests
+ // are limited to 10 requests per minutes. Authenticated requests are
// limited to 30 per minute.
//
// GitHub API docs: https://developer.github.com/v3/search/#rate-limit
@@ -730,18 +710,6 @@ func category(path string) rateLimitCategory {
}
}
-// RateLimit returns the core rate limit for the current client.
-//
-// Deprecated: RateLimit is deprecated, use RateLimits instead.
-func (c *Client) RateLimit() (*Rate, *Response, error) {
- limits, resp, err := c.RateLimits()
- if limits == nil {
- return nil, nil, err
- }
-
- return limits.Core, resp, err
-}
-
// RateLimits returns the rate limits for the current client.
func (c *Client) RateLimits() (*RateLimits, *Response, error) {
req, err := c.NewRequest("GET", "rate_limit", nil)
@@ -768,7 +736,7 @@ func (c *Client) RateLimits() (*RateLimits, *Response, error) {
c.rateMu.Unlock()
}
- return response.Resources, resp, err
+ return response.Resources, resp, nil
}
/*
@@ -784,7 +752,7 @@ that need to use a higher rate limit associated with your OAuth application.
This will append the querystring params client_id=xxx&client_secret=yyy to all
requests.
-See http://developer.github.com/v3/#unauthenticated-rate-limited-requests for
+See https://developer.github.com/v3/#unauthenticated-rate-limited-requests for
more information.
*/
type UnauthenticatedRateLimitedTransport struct {
@@ -838,7 +806,7 @@ func (t *UnauthenticatedRateLimitedTransport) transport() http.RoundTripper {
}
// BasicAuthTransport is an http.RoundTripper that authenticates all requests
-// using HTTP Basic Authentication with the provided username and password. It
+// using HTTP Basic Authentication with the provided username and password. It
// additionally supports users who have two-factor authentication enabled on
// their GitHub account.
type BasicAuthTransport struct {
diff --git a/vendor/github.com/google/go-github/github/gitignore.go b/vendor/github.com/google/go-github/github/gitignore.go
index 3f1f565..396178d 100644
--- a/vendor/github.com/google/go-github/github/gitignore.go
+++ b/vendor/github.com/google/go-github/github/gitignore.go
@@ -10,7 +10,7 @@ import "fmt"
// GitignoresService provides access to the gitignore related functions in the
// GitHub API.
//
-// GitHub API docs: http://developer.github.com/v3/gitignore/
+// GitHub API docs: https://developer.github.com/v3/gitignore/
type GitignoresService service
// Gitignore represents a .gitignore file as returned by the GitHub API.
@@ -25,7 +25,7 @@ func (g Gitignore) String() string {
// List all available Gitignore templates.
//
-// http://developer.github.com/v3/gitignore/#listing-available-templates
+// https://developer.github.com/v3/gitignore/#listing-available-templates
func (s GitignoresService) List() ([]string, *Response, error) {
req, err := s.client.NewRequest("GET", "gitignore/templates", nil)
if err != nil {
@@ -43,7 +43,7 @@ func (s GitignoresService) List() ([]string, *Response, error) {
// Get a Gitignore by name.
//
-// http://developer.github.com/v3/gitignore/#get-a-single-template
+// https://developer.github.com/v3/gitignore/#get-a-single-template
func (s GitignoresService) Get(name string) (*Gitignore, *Response, error) {
u := fmt.Sprintf("gitignore/templates/%v", name)
req, err := s.client.NewRequest("GET", u, nil)
@@ -57,5 +57,5 @@ func (s GitignoresService) Get(name string) (*Gitignore, *Response, error) {
return nil, resp, err
}
- return gitignore, resp, err
+ return gitignore, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/integration_installation.go b/vendor/github.com/google/go-github/github/integration_installation.go
index aa59bfe..b130470 100644
--- a/vendor/github.com/google/go-github/github/integration_installation.go
+++ b/vendor/github.com/google/go-github/github/integration_installation.go
@@ -42,5 +42,5 @@ func (s *IntegrationsService) ListRepos(opt *ListOptions) ([]*Repository, *Respo
return nil, resp, err
}
- return r.Repositories, resp, err
+ return r.Repositories, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/issues.go b/vendor/github.com/google/go-github/github/issues.go
index b14939e..c1997ee 100644
--- a/vendor/github.com/google/go-github/github/issues.go
+++ b/vendor/github.com/google/go-github/github/issues.go
@@ -13,7 +13,7 @@ import (
// IssuesService handles communication with the issue related
// methods of the GitHub API.
//
-// GitHub API docs: http://developer.github.com/v3/issues/
+// GitHub API docs: https://developer.github.com/v3/issues/
type IssuesService service
// Issue represents a GitHub issue on a repository.
@@ -68,22 +68,22 @@ type IssueRequest struct {
// IssueListOptions specifies the optional parameters to the IssuesService.List
// and IssuesService.ListByOrg methods.
type IssueListOptions struct {
- // Filter specifies which issues to list. Possible values are: assigned,
- // created, mentioned, subscribed, all. Default is "assigned".
+ // Filter specifies which issues to list. Possible values are: assigned,
+ // created, mentioned, subscribed, all. Default is "assigned".
Filter string `url:"filter,omitempty"`
- // State filters issues based on their state. Possible values are: open,
- // closed, all. Default is "open".
+ // State filters issues based on their state. Possible values are: open,
+ // closed, all. Default is "open".
State string `url:"state,omitempty"`
// Labels filters issues based on their label.
Labels []string `url:"labels,comma,omitempty"`
- // Sort specifies how to sort issues. Possible values are: created, updated,
- // and comments. Default value is "created".
+ // Sort specifies how to sort issues. Possible values are: created, updated,
+ // and comments. Default value is "created".
Sort string `url:"sort,omitempty"`
- // Direction in which to sort issues. Possible values are: asc, desc.
+ // Direction in which to sort issues. Possible values are: asc, desc.
// Default is "desc".
Direction string `url:"direction,omitempty"`
@@ -102,12 +102,12 @@ type PullRequestLinks struct {
PatchURL *string `json:"patch_url,omitempty"`
}
-// List the issues for the authenticated user. If all is true, list issues
+// List the issues for the authenticated user. If all is true, list issues
// across all the user's visible repositories including owned, member, and
// organization repositories; if false, list only owned and member
// repositories.
//
-// GitHub API docs: http://developer.github.com/v3/issues/#list-issues
+// GitHub API docs: https://developer.github.com/v3/issues/#list-issues
func (s *IssuesService) List(all bool, opt *IssueListOptions) ([]*Issue, *Response, error) {
var u string
if all {
@@ -121,7 +121,7 @@ func (s *IssuesService) List(all bool, opt *IssueListOptions) ([]*Issue, *Respon
// ListByOrg fetches the issues in the specified organization for the
// authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/issues/#list-issues
+// GitHub API docs: https://developer.github.com/v3/issues/#list-issues
func (s *IssuesService) ListByOrg(org string, opt *IssueListOptions) ([]*Issue, *Response, error) {
u := fmt.Sprintf("orgs/%v/issues", org)
return s.listIssues(u, opt)
@@ -153,16 +153,16 @@ func (s *IssuesService) listIssues(u string, opt *IssueListOptions) ([]*Issue, *
// IssueListByRepoOptions specifies the optional parameters to the
// IssuesService.ListByRepo method.
type IssueListByRepoOptions struct {
- // Milestone limits issues for the specified milestone. Possible values are
+ // Milestone limits issues for the specified milestone. Possible values are
// a milestone number, "none" for issues with no milestone, "*" for issues
// with any milestone.
Milestone string `url:"milestone,omitempty"`
- // State filters issues based on their state. Possible values are: open,
- // closed, all. Default is "open".
+ // State filters issues based on their state. Possible values are: open,
+ // closed, all. Default is "open".
State string `url:"state,omitempty"`
- // Assignee filters issues based on their assignee. Possible values are a
+ // Assignee filters issues based on their assignee. Possible values are a
// user name, "none" for issues that are not assigned, "*" for issues with
// any assigned user.
Assignee string `url:"assignee,omitempty"`
@@ -176,11 +176,11 @@ type IssueListByRepoOptions struct {
// Labels filters issues based on their label.
Labels []string `url:"labels,omitempty,comma"`
- // Sort specifies how to sort issues. Possible values are: created, updated,
- // and comments. Default value is "created".
+ // Sort specifies how to sort issues. Possible values are: created, updated,
+ // and comments. Default value is "created".
Sort string `url:"sort,omitempty"`
- // Direction in which to sort issues. Possible values are: asc, desc.
+ // Direction in which to sort issues. Possible values are: asc, desc.
// Default is "desc".
Direction string `url:"direction,omitempty"`
@@ -192,7 +192,7 @@ type IssueListByRepoOptions struct {
// ListByRepo lists the issues for the specified repository.
//
-// GitHub API docs: http://developer.github.com/v3/issues/#list-issues-for-a-repository
+// GitHub API docs: https://developer.github.com/v3/issues/#list-issues-for-a-repository
func (s *IssuesService) ListByRepo(owner string, repo string, opt *IssueListByRepoOptions) ([]*Issue, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/issues", owner, repo)
u, err := addOptions(u, opt)
@@ -219,7 +219,7 @@ func (s *IssuesService) ListByRepo(owner string, repo string, opt *IssueListByRe
// Get a single issue.
//
-// GitHub API docs: http://developer.github.com/v3/issues/#get-a-single-issue
+// GitHub API docs: https://developer.github.com/v3/issues/#get-a-single-issue
func (s *IssuesService) Get(owner string, repo string, number int) (*Issue, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/issues/%d", owner, repo, number)
req, err := s.client.NewRequest("GET", u, nil)
@@ -241,7 +241,7 @@ func (s *IssuesService) Get(owner string, repo string, number int) (*Issue, *Res
// Create a new issue on the specified repository.
//
-// GitHub API docs: http://developer.github.com/v3/issues/#create-an-issue
+// GitHub API docs: https://developer.github.com/v3/issues/#create-an-issue
func (s *IssuesService) Create(owner string, repo string, issue *IssueRequest) (*Issue, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/issues", owner, repo)
req, err := s.client.NewRequest("POST", u, issue)
@@ -260,7 +260,7 @@ func (s *IssuesService) Create(owner string, repo string, issue *IssueRequest) (
// Edit an issue.
//
-// GitHub API docs: http://developer.github.com/v3/issues/#edit-an-issue
+// GitHub API docs: https://developer.github.com/v3/issues/#edit-an-issue
func (s *IssuesService) Edit(owner string, repo string, number int, issue *IssueRequest) (*Issue, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/issues/%d", owner, repo, number)
req, err := s.client.NewRequest("PATCH", u, issue)
diff --git a/vendor/github.com/google/go-github/github/issues_assignees.go b/vendor/github.com/google/go-github/github/issues_assignees.go
index 1f06102..bdc6a6b 100644
--- a/vendor/github.com/google/go-github/github/issues_assignees.go
+++ b/vendor/github.com/google/go-github/github/issues_assignees.go
@@ -10,7 +10,7 @@ import "fmt"
// ListAssignees fetches all available assignees (owners and collaborators) to
// which issues may be assigned.
//
-// GitHub API docs: http://developer.github.com/v3/issues/assignees/#list-assignees
+// GitHub API docs: https://developer.github.com/v3/issues/assignees/#list-assignees
func (s *IssuesService) ListAssignees(owner, repo string, opt *ListOptions) ([]*User, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/assignees", owner, repo)
u, err := addOptions(u, opt)
@@ -33,7 +33,7 @@ func (s *IssuesService) ListAssignees(owner, repo string, opt *ListOptions) ([]*
// IsAssignee checks if a user is an assignee for the specified repository.
//
-// GitHub API docs: http://developer.github.com/v3/issues/assignees/#check-assignee
+// GitHub API docs: https://developer.github.com/v3/issues/assignees/#check-assignee
func (s *IssuesService) IsAssignee(owner, repo, user string) (bool, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/assignees/%v", owner, repo, user)
req, err := s.client.NewRequest("GET", u, nil)
diff --git a/vendor/github.com/google/go-github/github/issues_comments.go b/vendor/github.com/google/go-github/github/issues_comments.go
index 7d46913..e8a852e 100644
--- a/vendor/github.com/google/go-github/github/issues_comments.go
+++ b/vendor/github.com/google/go-github/github/issues_comments.go
@@ -30,10 +30,10 @@ func (i IssueComment) String() string {
// IssueListCommentsOptions specifies the optional parameters to the
// IssuesService.ListComments method.
type IssueListCommentsOptions struct {
- // Sort specifies how to sort comments. Possible values are: created, updated.
+ // Sort specifies how to sort comments. Possible values are: created, updated.
Sort string `url:"sort,omitempty"`
- // Direction in which to sort comments. Possible values are: asc, desc.
+ // Direction in which to sort comments. Possible values are: asc, desc.
Direction string `url:"direction,omitempty"`
// Since filters comments by time.
@@ -42,10 +42,10 @@ type IssueListCommentsOptions struct {
ListOptions
}
-// ListComments lists all comments on the specified issue. Specifying an issue
+// ListComments lists all comments on the specified issue. Specifying an issue
// number of 0 will return all comments on all issues for the repository.
//
-// GitHub API docs: http://developer.github.com/v3/issues/comments/#list-comments-on-an-issue
+// GitHub API docs: https://developer.github.com/v3/issues/comments/#list-comments-on-an-issue
func (s *IssuesService) ListComments(owner string, repo string, number int, opt *IssueListCommentsOptions) ([]*IssueComment, *Response, error) {
var u string
if number == 0 {
@@ -77,7 +77,7 @@ func (s *IssuesService) ListComments(owner string, repo string, number int, opt
// GetComment fetches the specified issue comment.
//
-// GitHub API docs: http://developer.github.com/v3/issues/comments/#get-a-single-comment
+// GitHub API docs: https://developer.github.com/v3/issues/comments/#get-a-single-comment
func (s *IssuesService) GetComment(owner string, repo string, id int) (*IssueComment, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/issues/comments/%d", owner, repo, id)
@@ -100,7 +100,7 @@ func (s *IssuesService) GetComment(owner string, repo string, id int) (*IssueCom
// CreateComment creates a new comment on the specified issue.
//
-// GitHub API docs: http://developer.github.com/v3/issues/comments/#create-a-comment
+// GitHub API docs: https://developer.github.com/v3/issues/comments/#create-a-comment
func (s *IssuesService) CreateComment(owner string, repo string, number int, comment *IssueComment) (*IssueComment, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/issues/%d/comments", owner, repo, number)
req, err := s.client.NewRequest("POST", u, comment)
@@ -118,7 +118,7 @@ func (s *IssuesService) CreateComment(owner string, repo string, number int, com
// EditComment updates an issue comment.
//
-// GitHub API docs: http://developer.github.com/v3/issues/comments/#edit-a-comment
+// GitHub API docs: https://developer.github.com/v3/issues/comments/#edit-a-comment
func (s *IssuesService) EditComment(owner string, repo string, id int, comment *IssueComment) (*IssueComment, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/issues/comments/%d", owner, repo, id)
req, err := s.client.NewRequest("PATCH", u, comment)
@@ -136,7 +136,7 @@ func (s *IssuesService) EditComment(owner string, repo string, id int, comment *
// DeleteComment deletes an issue comment.
//
-// GitHub API docs: http://developer.github.com/v3/issues/comments/#delete-a-comment
+// GitHub API docs: https://developer.github.com/v3/issues/comments/#delete-a-comment
func (s *IssuesService) DeleteComment(owner string, repo string, id int) (*Response, error) {
u := fmt.Sprintf("repos/%v/%v/issues/comments/%d", owner, repo, id)
req, err := s.client.NewRequest("DELETE", u, nil)
diff --git a/vendor/github.com/google/go-github/github/issues_events.go b/vendor/github.com/google/go-github/github/issues_events.go
index 71cf61a..98f215c 100644
--- a/vendor/github.com/google/go-github/github/issues_events.go
+++ b/vendor/github.com/google/go-github/github/issues_events.go
@@ -18,7 +18,7 @@ type IssueEvent struct {
// The User that generated this event.
Actor *User `json:"actor,omitempty"`
- // Event identifies the actual type of Event that occurred. Possible
+ // Event identifies the actual type of Event that occurred. Possible
// values are:
//
// closed
@@ -91,7 +91,7 @@ func (s *IssuesService) ListIssueEvents(owner, repo string, number int, opt *Lis
return nil, resp, err
}
- return events, resp, err
+ return events, resp, nil
}
// ListRepositoryEvents lists events for the specified repository.
@@ -115,7 +115,7 @@ func (s *IssuesService) ListRepositoryEvents(owner, repo string, opt *ListOption
return nil, resp, err
}
- return events, resp, err
+ return events, resp, nil
}
// GetEvent returns the specified issue event.
@@ -135,7 +135,7 @@ func (s *IssuesService) GetEvent(owner, repo string, id int) (*IssueEvent, *Resp
return nil, resp, err
}
- return event, resp, err
+ return event, resp, nil
}
// Rename contains details for 'renamed' events.
diff --git a/vendor/github.com/google/go-github/github/issues_labels.go b/vendor/github.com/google/go-github/github/issues_labels.go
index 46b2d6e..c9f8c46 100644
--- a/vendor/github.com/google/go-github/github/issues_labels.go
+++ b/vendor/github.com/google/go-github/github/issues_labels.go
@@ -20,7 +20,7 @@ func (l Label) String() string {
// ListLabels lists all labels for a repository.
//
-// GitHub API docs: http://developer.github.com/v3/issues/labels/#list-all-labels-for-this-repository
+// GitHub API docs: https://developer.github.com/v3/issues/labels/#list-all-labels-for-this-repository
func (s *IssuesService) ListLabels(owner string, repo string, opt *ListOptions) ([]*Label, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/labels", owner, repo)
u, err := addOptions(u, opt)
@@ -44,7 +44,7 @@ func (s *IssuesService) ListLabels(owner string, repo string, opt *ListOptions)
// GetLabel gets a single label.
//
-// GitHub API docs: http://developer.github.com/v3/issues/labels/#get-a-single-label
+// GitHub API docs: https://developer.github.com/v3/issues/labels/#get-a-single-label
func (s *IssuesService) GetLabel(owner string, repo string, name string) (*Label, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/labels/%v", owner, repo, name)
req, err := s.client.NewRequest("GET", u, nil)
@@ -63,7 +63,7 @@ func (s *IssuesService) GetLabel(owner string, repo string, name string) (*Label
// CreateLabel creates a new label on the specified repository.
//
-// GitHub API docs: http://developer.github.com/v3/issues/labels/#create-a-label
+// GitHub API docs: https://developer.github.com/v3/issues/labels/#create-a-label
func (s *IssuesService) CreateLabel(owner string, repo string, label *Label) (*Label, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/labels", owner, repo)
req, err := s.client.NewRequest("POST", u, label)
@@ -82,7 +82,7 @@ func (s *IssuesService) CreateLabel(owner string, repo string, label *Label) (*L
// EditLabel edits a label.
//
-// GitHub API docs: http://developer.github.com/v3/issues/labels/#update-a-label
+// GitHub API docs: https://developer.github.com/v3/issues/labels/#update-a-label
func (s *IssuesService) EditLabel(owner string, repo string, name string, label *Label) (*Label, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/labels/%v", owner, repo, name)
req, err := s.client.NewRequest("PATCH", u, label)
@@ -101,7 +101,7 @@ func (s *IssuesService) EditLabel(owner string, repo string, name string, label
// DeleteLabel deletes a label.
//
-// GitHub API docs: http://developer.github.com/v3/issues/labels/#delete-a-label
+// GitHub API docs: https://developer.github.com/v3/issues/labels/#delete-a-label
func (s *IssuesService) DeleteLabel(owner string, repo string, name string) (*Response, error) {
u := fmt.Sprintf("repos/%v/%v/labels/%v", owner, repo, name)
req, err := s.client.NewRequest("DELETE", u, nil)
@@ -156,7 +156,7 @@ func (s *IssuesService) AddLabelsToIssue(owner string, repo string, number int,
// RemoveLabelForIssue removes a label for an issue.
//
-// GitHub API docs: http://developer.github.com/v3/issues/labels/#remove-a-label-from-an-issue
+// GitHub API docs: https://developer.github.com/v3/issues/labels/#remove-a-label-from-an-issue
func (s *IssuesService) RemoveLabelForIssue(owner string, repo string, number int, label string) (*Response, error) {
u := fmt.Sprintf("repos/%v/%v/issues/%d/labels/%v", owner, repo, number, label)
req, err := s.client.NewRequest("DELETE", u, nil)
@@ -168,7 +168,7 @@ func (s *IssuesService) RemoveLabelForIssue(owner string, repo string, number in
// ReplaceLabelsForIssue replaces all labels for an issue.
//
-// GitHub API docs: http://developer.github.com/v3/issues/labels/#replace-all-labels-for-an-issue
+// GitHub API docs: https://developer.github.com/v3/issues/labels/#replace-all-labels-for-an-issue
func (s *IssuesService) ReplaceLabelsForIssue(owner string, repo string, number int, labels []string) ([]*Label, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/issues/%d/labels", owner, repo, number)
req, err := s.client.NewRequest("PUT", u, labels)
@@ -187,7 +187,7 @@ func (s *IssuesService) ReplaceLabelsForIssue(owner string, repo string, number
// RemoveLabelsForIssue removes all labels for an issue.
//
-// GitHub API docs: http://developer.github.com/v3/issues/labels/#remove-all-labels-from-an-issue
+// GitHub API docs: https://developer.github.com/v3/issues/labels/#remove-all-labels-from-an-issue
func (s *IssuesService) RemoveLabelsForIssue(owner string, repo string, number int) (*Response, error) {
u := fmt.Sprintf("repos/%v/%v/issues/%d/labels", owner, repo, number)
req, err := s.client.NewRequest("DELETE", u, nil)
@@ -199,7 +199,7 @@ func (s *IssuesService) RemoveLabelsForIssue(owner string, repo string, number i
// ListLabelsForMilestone lists labels for every issue in a milestone.
//
-// GitHub API docs: http://developer.github.com/v3/issues/labels/#get-labels-for-every-issue-in-a-milestone
+// GitHub API docs: https://developer.github.com/v3/issues/labels/#get-labels-for-every-issue-in-a-milestone
func (s *IssuesService) ListLabelsForMilestone(owner string, repo string, number int, opt *ListOptions) ([]*Label, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/milestones/%d/labels", owner, repo, number)
u, err := addOptions(u, opt)
diff --git a/vendor/github.com/google/go-github/github/licenses.go b/vendor/github.com/google/go-github/github/licenses.go
index a1fec94..5340e61 100644
--- a/vendor/github.com/google/go-github/github/licenses.go
+++ b/vendor/github.com/google/go-github/github/licenses.go
@@ -96,5 +96,5 @@ func (s *LicensesService) Get(licenseName string) (*License, *Response, error) {
return nil, resp, err
}
- return license, resp, err
+ return license, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/migrations_source_import.go b/vendor/github.com/google/go-github/github/migrations_source_import.go
index 451b13e..d593e40 100644
--- a/vendor/github.com/google/go-github/github/migrations_source_import.go
+++ b/vendor/github.com/google/go-github/github/migrations_source_import.go
@@ -39,7 +39,7 @@ type Import struct {
// repository. To see a list of these files, call LargeFiles.
LargeFilesCount *int `json:"large_files_count,omitempty"`
- // Identifies the current status of an import. An import that does not
+ // Identifies the current status of an import. An import that does not
// have errors will progress through these steps:
//
// detecting - the "detection" step of the import is in progress
@@ -101,7 +101,7 @@ type Import struct {
HumanName *string `json:"human_name,omitempty"`
// When the importer finds several projects or repositories at the
- // provided URLs, this will identify the available choices. Call
+ // provided URLs, this will identify the available choices. Call
// UpdateImport with the selected Import value.
ProjectChoices []Import `json:"project_choices,omitempty"`
}
@@ -160,7 +160,7 @@ func (s *MigrationService) StartImport(owner, repo string, in *Import) (*Import,
return nil, resp, err
}
- return out, resp, err
+ return out, resp, nil
}
// ImportProgress queries for the status and progress of an ongoing repository import.
@@ -182,7 +182,7 @@ func (s *MigrationService) ImportProgress(owner, repo string) (*Import, *Respons
return nil, resp, err
}
- return out, resp, err
+ return out, resp, nil
}
// UpdateImport initiates a repository import.
@@ -204,7 +204,7 @@ func (s *MigrationService) UpdateImport(owner, repo string, in *Import) (*Import
return nil, resp, err
}
- return out, resp, err
+ return out, resp, nil
}
// CommitAuthors gets the authors mapped from the original repository.
@@ -260,11 +260,11 @@ func (s *MigrationService) MapCommitAuthor(owner, repo string, id int, author *S
return nil, resp, err
}
- return out, resp, err
+ return out, resp, nil
}
// SetLFSPreference sets whether imported repositories should use Git LFS for
-// files larger than 100MB. Only the UseLFS field on the provided Import is
+// files larger than 100MB. Only the UseLFS field on the provided Import is
// used.
//
// GitHub API docs: https://developer.github.com/v3/migration/source_imports/#set-git-lfs-preference
@@ -284,7 +284,7 @@ func (s *MigrationService) SetLFSPreference(owner, repo string, in *Import) (*Im
return nil, resp, err
}
- return out, resp, err
+ return out, resp, nil
}
// LargeFiles lists files larger than 100MB found during the import.
diff --git a/vendor/github.com/google/go-github/github/misc.go b/vendor/github.com/google/go-github/github/misc.go
index 89e1501..0cdb3f7 100644
--- a/vendor/github.com/google/go-github/github/misc.go
+++ b/vendor/github.com/google/go-github/github/misc.go
@@ -13,7 +13,7 @@ import (
// MarkdownOptions specifies optional parameters to the Markdown method.
type MarkdownOptions struct {
- // Mode identifies the rendering mode. Possible values are:
+ // Mode identifies the rendering mode. Possible values are:
// markdown - render a document as plain Markdown, just like
// README files are rendered.
//
@@ -25,7 +25,7 @@ type MarkdownOptions struct {
// Default is "markdown".
Mode string
- // Context identifies the repository context. Only taken into account
+ // Context identifies the repository context. Only taken into account
// when rendering as "gfm".
Context string
}
@@ -125,7 +125,7 @@ func (c *Client) APIMeta() (*APIMeta, *Response, error) {
}
// Octocat returns an ASCII art octocat with the specified message in a speech
-// bubble. If message is empty, a random zen phrase is used.
+// bubble. If message is empty, a random zen phrase is used.
func (c *Client) Octocat(message string) (string, *Response, error) {
u := "octocat"
if message != "" {
diff --git a/vendor/github.com/google/go-github/github/orgs.go b/vendor/github.com/google/go-github/github/orgs.go
index 696c2b7..7421605 100644
--- a/vendor/github.com/google/go-github/github/orgs.go
+++ b/vendor/github.com/google/go-github/github/orgs.go
@@ -13,7 +13,7 @@ import (
// OrganizationsService provides access to the organization related functions
// in the GitHub API.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/
+// GitHub API docs: https://developer.github.com/v3/orgs/
type OrganizationsService service
// Organization represents a GitHub organization account.
@@ -57,7 +57,7 @@ func (o Organization) String() string {
return Stringify(o)
}
-// Plan represents the payment plan for an account. See plans at https://github.com/plans.
+// Plan represents the payment plan for an account. See plans at https://github.com/plans.
type Plan struct {
Name *string `json:"name,omitempty"`
Space *int `json:"space,omitempty"`
@@ -101,13 +101,13 @@ func (s *OrganizationsService) ListAll(opt *OrganizationsListOptions) ([]*Organi
if err != nil {
return nil, resp, err
}
- return orgs, resp, err
+ return orgs, resp, nil
}
-// List the organizations for a user. Passing the empty string will list
+// List the organizations for a user. Passing the empty string will list
// organizations for the authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/#list-user-organizations
+// GitHub API docs: https://developer.github.com/v3/orgs/#list-user-organizations
func (s *OrganizationsService) List(user string, opt *ListOptions) ([]*Organization, *Response, error) {
var u string
if user != "" {
@@ -136,7 +136,7 @@ func (s *OrganizationsService) List(user string, opt *ListOptions) ([]*Organizat
// Get fetches an organization by name.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/#get-an-organization
+// GitHub API docs: https://developer.github.com/v3/orgs/#get-an-organization
func (s *OrganizationsService) Get(org string) (*Organization, *Response, error) {
u := fmt.Sprintf("orgs/%v", org)
req, err := s.client.NewRequest("GET", u, nil)
@@ -150,12 +150,12 @@ func (s *OrganizationsService) Get(org string) (*Organization, *Response, error)
return nil, resp, err
}
- return organization, resp, err
+ return organization, resp, nil
}
// Edit an organization.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/#edit-an-organization
+// GitHub API docs: https://developer.github.com/v3/orgs/#edit-an-organization
func (s *OrganizationsService) Edit(name string, org *Organization) (*Organization, *Response, error) {
u := fmt.Sprintf("orgs/%v", name)
req, err := s.client.NewRequest("PATCH", u, org)
@@ -169,5 +169,5 @@ func (s *OrganizationsService) Edit(name string, org *Organization) (*Organizati
return nil, resp, err
}
- return o, resp, err
+ return o, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/orgs_hooks.go b/vendor/github.com/google/go-github/github/orgs_hooks.go
index 4926311..6dc1052 100644
--- a/vendor/github.com/google/go-github/github/orgs_hooks.go
+++ b/vendor/github.com/google/go-github/github/orgs_hooks.go
@@ -62,7 +62,7 @@ func (s *OrganizationsService) CreateHook(org string, hook *Hook) (*Hook, *Respo
return nil, resp, err
}
- return h, resp, err
+ return h, resp, nil
}
// EditHook updates a specified Hook.
diff --git a/vendor/github.com/google/go-github/github/orgs_members.go b/vendor/github.com/google/go-github/github/orgs_members.go
index ea8a358..40dfc56 100644
--- a/vendor/github.com/google/go-github/github/orgs_members.go
+++ b/vendor/github.com/google/go-github/github/orgs_members.go
@@ -48,8 +48,8 @@ type ListMembersOptions struct {
// organization), list only publicly visible members.
PublicOnly bool `url:"-"`
- // Filter members returned in the list. Possible values are:
- // 2fa_disabled, all. Default is "all".
+ // Filter members returned in the list. Possible values are:
+ // 2fa_disabled, all. Default is "all".
Filter string `url:"filter,omitempty"`
// Role filters members returned by their role in the organization.
@@ -64,11 +64,11 @@ type ListMembersOptions struct {
ListOptions
}
-// ListMembers lists the members for an organization. If the authenticated
+// ListMembers lists the members for an organization. If the authenticated
// user is an owner of the organization, this will return both concealed and
// public members, otherwise it will only return public members.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/members/#members-list
+// GitHub API docs: https://developer.github.com/v3/orgs/members/#members-list
func (s *OrganizationsService) ListMembers(org string, opt *ListMembersOptions) ([]*User, *Response, error) {
var u string
if opt != nil && opt.PublicOnly {
@@ -97,7 +97,7 @@ func (s *OrganizationsService) ListMembers(org string, opt *ListMembersOptions)
// IsMember checks if a user is a member of an organization.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/members/#check-membership
+// GitHub API docs: https://developer.github.com/v3/orgs/members/#check-membership
func (s *OrganizationsService) IsMember(org, user string) (bool, *Response, error) {
u := fmt.Sprintf("orgs/%v/members/%v", org, user)
req, err := s.client.NewRequest("GET", u, nil)
@@ -112,7 +112,7 @@ func (s *OrganizationsService) IsMember(org, user string) (bool, *Response, erro
// IsPublicMember checks if a user is a public member of an organization.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/members/#check-public-membership
+// GitHub API docs: https://developer.github.com/v3/orgs/members/#check-public-membership
func (s *OrganizationsService) IsPublicMember(org, user string) (bool, *Response, error) {
u := fmt.Sprintf("orgs/%v/public_members/%v", org, user)
req, err := s.client.NewRequest("GET", u, nil)
@@ -127,7 +127,7 @@ func (s *OrganizationsService) IsPublicMember(org, user string) (bool, *Response
// RemoveMember removes a user from all teams of an organization.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/members/#remove-a-member
+// GitHub API docs: https://developer.github.com/v3/orgs/members/#remove-a-member
func (s *OrganizationsService) RemoveMember(org, user string) (*Response, error) {
u := fmt.Sprintf("orgs/%v/members/%v", org, user)
req, err := s.client.NewRequest("DELETE", u, nil)
@@ -141,7 +141,7 @@ func (s *OrganizationsService) RemoveMember(org, user string) (*Response, error)
// PublicizeMembership publicizes a user's membership in an organization. (A
// user cannot publicize the membership for another user.)
//
-// GitHub API docs: http://developer.github.com/v3/orgs/members/#publicize-a-users-membership
+// GitHub API docs: https://developer.github.com/v3/orgs/members/#publicize-a-users-membership
func (s *OrganizationsService) PublicizeMembership(org, user string) (*Response, error) {
u := fmt.Sprintf("orgs/%v/public_members/%v", org, user)
req, err := s.client.NewRequest("PUT", u, nil)
@@ -154,7 +154,7 @@ func (s *OrganizationsService) PublicizeMembership(org, user string) (*Response,
// ConcealMembership conceals a user's membership in an organization.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/members/#conceal-a-users-membership
+// GitHub API docs: https://developer.github.com/v3/orgs/members/#conceal-a-users-membership
func (s *OrganizationsService) ConcealMembership(org, user string) (*Response, error) {
u := fmt.Sprintf("orgs/%v/public_members/%v", org, user)
req, err := s.client.NewRequest("DELETE", u, nil)
@@ -196,7 +196,7 @@ func (s *OrganizationsService) ListOrgMemberships(opt *ListOrgMembershipsOptions
return nil, resp, err
}
- return memberships, resp, err
+ return memberships, resp, nil
}
// GetOrgMembership gets the membership for a user in a specified organization.
@@ -224,7 +224,7 @@ func (s *OrganizationsService) GetOrgMembership(user, org string) (*Membership,
return nil, resp, err
}
- return membership, resp, err
+ return membership, resp, nil
}
// EditOrgMembership edits the membership for user in specified organization.
@@ -254,10 +254,10 @@ func (s *OrganizationsService) EditOrgMembership(user, org string, membership *M
return nil, resp, err
}
- return m, resp, err
+ return m, resp, nil
}
-// RemoveOrgMembership removes user from the specified organization. If the
+// RemoveOrgMembership removes user from the specified organization. If the
// user has been invited to the organization, this will cancel their invitation.
//
// GitHub API docs: https://developer.github.com/v3/orgs/members/#remove-organization-membership
diff --git a/vendor/github.com/google/go-github/github/orgs_teams.go b/vendor/github.com/google/go-github/github/orgs_teams.go
index ce8cbec..c1818e5 100644
--- a/vendor/github.com/google/go-github/github/orgs_teams.go
+++ b/vendor/github.com/google/go-github/github/orgs_teams.go
@@ -10,7 +10,7 @@ import (
"time"
)
-// Team represents a team within a GitHub organization. Teams are used to
+// Team represents a team within a GitHub organization. Teams are used to
// manage access to an organization's repositories.
type Team struct {
ID *int `json:"id,omitempty"`
@@ -20,9 +20,9 @@ type Team struct {
Slug *string `json:"slug,omitempty"`
// Permission is deprecated when creating or editing a team in an org
- // using the new GitHub permission model. It no longer identifies the
+ // using the new GitHub permission model. It no longer identifies the
// permission a team has on its repos, but only specifies the default
- // permission a repo is initially added with. Avoid confusion by
+ // permission a repo is initially added with. Avoid confusion by
// specifying a permission value when calling AddTeamRepo.
Permission *string `json:"permission,omitempty"`
@@ -61,7 +61,7 @@ func (i Invitation) String() string {
// ListTeams lists all of the teams for an organization.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/teams/#list-teams
+// GitHub API docs: https://developer.github.com/v3/orgs/teams/#list-teams
func (s *OrganizationsService) ListTeams(org string, opt *ListOptions) ([]*Team, *Response, error) {
u := fmt.Sprintf("orgs/%v/teams", org)
u, err := addOptions(u, opt)
@@ -85,7 +85,7 @@ func (s *OrganizationsService) ListTeams(org string, opt *ListOptions) ([]*Team,
// GetTeam fetches a team by ID.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/teams/#get-team
+// GitHub API docs: https://developer.github.com/v3/orgs/teams/#get-team
func (s *OrganizationsService) GetTeam(team int) (*Team, *Response, error) {
u := fmt.Sprintf("teams/%v", team)
req, err := s.client.NewRequest("GET", u, nil)
@@ -99,12 +99,12 @@ func (s *OrganizationsService) GetTeam(team int) (*Team, *Response, error) {
return nil, resp, err
}
- return t, resp, err
+ return t, resp, nil
}
// CreateTeam creates a new team within an organization.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/teams/#create-team
+// GitHub API docs: https://developer.github.com/v3/orgs/teams/#create-team
func (s *OrganizationsService) CreateTeam(org string, team *Team) (*Team, *Response, error) {
u := fmt.Sprintf("orgs/%v/teams", org)
req, err := s.client.NewRequest("POST", u, team)
@@ -118,12 +118,12 @@ func (s *OrganizationsService) CreateTeam(org string, team *Team) (*Team, *Respo
return nil, resp, err
}
- return t, resp, err
+ return t, resp, nil
}
// EditTeam edits a team.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/teams/#edit-team
+// GitHub API docs: https://developer.github.com/v3/orgs/teams/#edit-team
func (s *OrganizationsService) EditTeam(id int, team *Team) (*Team, *Response, error) {
u := fmt.Sprintf("teams/%v", id)
req, err := s.client.NewRequest("PATCH", u, team)
@@ -137,12 +137,12 @@ func (s *OrganizationsService) EditTeam(id int, team *Team) (*Team, *Response, e
return nil, resp, err
}
- return t, resp, err
+ return t, resp, nil
}
// DeleteTeam deletes a team.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/teams/#delete-team
+// GitHub API docs: https://developer.github.com/v3/orgs/teams/#delete-team
func (s *OrganizationsService) DeleteTeam(team int) (*Response, error) {
u := fmt.Sprintf("teams/%v", team)
req, err := s.client.NewRequest("DELETE", u, nil)
@@ -156,8 +156,8 @@ func (s *OrganizationsService) DeleteTeam(team int) (*Response, error) {
// OrganizationListTeamMembersOptions specifies the optional parameters to the
// OrganizationsService.ListTeamMembers method.
type OrganizationListTeamMembersOptions struct {
- // Role filters members returned by their role in the team. Possible
- // values are "all", "member", "maintainer". Default is "all".
+ // Role filters members returned by their role in the team. Possible
+ // values are "all", "member", "maintainer". Default is "all".
Role string `url:"role,omitempty"`
ListOptions
@@ -166,7 +166,7 @@ type OrganizationListTeamMembersOptions struct {
// ListTeamMembers lists all of the users who are members of the specified
// team.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/teams/#list-team-members
+// GitHub API docs: https://developer.github.com/v3/orgs/teams/#list-team-members
func (s *OrganizationsService) ListTeamMembers(team int, opt *OrganizationListTeamMembersOptions) ([]*User, *Response, error) {
u := fmt.Sprintf("teams/%v/members", team)
u, err := addOptions(u, opt)
@@ -190,7 +190,7 @@ func (s *OrganizationsService) ListTeamMembers(team int, opt *OrganizationListTe
// IsTeamMember checks if a user is a member of the specified team.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/teams/#get-team-member
+// GitHub API docs: https://developer.github.com/v3/orgs/teams/#get-team-member
func (s *OrganizationsService) IsTeamMember(team int, user string) (bool, *Response, error) {
u := fmt.Sprintf("teams/%v/members/%v", team, user)
req, err := s.client.NewRequest("GET", u, nil)
@@ -205,7 +205,7 @@ func (s *OrganizationsService) IsTeamMember(team int, user string) (bool, *Respo
// ListTeamRepos lists the repositories that the specified team has access to.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/teams/#list-team-repos
+// GitHub API docs: https://developer.github.com/v3/orgs/teams/#list-team-repos
func (s *OrganizationsService) ListTeamRepos(team int, opt *ListOptions) ([]*Repository, *Response, error) {
u := fmt.Sprintf("teams/%v/repos", team)
u, err := addOptions(u, opt)
@@ -227,7 +227,7 @@ func (s *OrganizationsService) ListTeamRepos(team int, opt *ListOptions) ([]*Rep
return repos, resp, nil
}
-// IsTeamRepo checks if a team manages the specified repository. If the
+// IsTeamRepo checks if a team manages the specified repository. If the
// repository is managed by team, a Repository is returned which includes the
// permissions team has for that repo.
//
@@ -247,7 +247,7 @@ func (s *OrganizationsService) IsTeamRepo(team int, owner string, repo string) (
return nil, resp, err
}
- return repository, resp, err
+ return repository, resp, nil
}
// OrganizationAddTeamRepoOptions specifies the optional parameters to the
@@ -263,11 +263,11 @@ type OrganizationAddTeamRepoOptions struct {
Permission string `json:"permission,omitempty"`
}
-// AddTeamRepo adds a repository to be managed by the specified team. The
+// AddTeamRepo adds a repository to be managed by the specified team. The
// specified repository must be owned by the organization to which the team
// belongs, or a direct fork of a repository owned by the organization.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/teams/#add-team-repo
+// GitHub API docs: https://developer.github.com/v3/orgs/teams/#add-team-repo
func (s *OrganizationsService) AddTeamRepo(team int, owner string, repo string, opt *OrganizationAddTeamRepoOptions) (*Response, error) {
u := fmt.Sprintf("teams/%v/repos/%v/%v", team, owner, repo)
req, err := s.client.NewRequest("PUT", u, opt)
@@ -279,10 +279,10 @@ func (s *OrganizationsService) AddTeamRepo(team int, owner string, repo string,
}
// RemoveTeamRepo removes a repository from being managed by the specified
-// team. Note that this does not delete the repository, it just removes it
+// team. Note that this does not delete the repository, it just removes it
// from the team.
//
-// GitHub API docs: http://developer.github.com/v3/orgs/teams/#remove-team-repo
+// GitHub API docs: https://developer.github.com/v3/orgs/teams/#remove-team-repo
func (s *OrganizationsService) RemoveTeamRepo(team int, owner string, repo string) (*Response, error) {
u := fmt.Sprintf("teams/%v/repos/%v/%v", team, owner, repo)
req, err := s.client.NewRequest("DELETE", u, nil)
@@ -332,13 +332,13 @@ func (s *OrganizationsService) GetTeamMembership(team int, user string) (*Member
return nil, resp, err
}
- return t, resp, err
+ return t, resp, nil
}
// OrganizationAddTeamMembershipOptions does stuff specifies the optional
// parameters to the OrganizationsService.AddTeamMembership method.
type OrganizationAddTeamMembershipOptions struct {
- // Role specifies the role the user should have in the team. Possible
+ // Role specifies the role the user should have in the team. Possible
// values are:
// member - a normal member of the team
// maintainer - a team maintainer. Able to add/remove other team
@@ -380,7 +380,7 @@ func (s *OrganizationsService) AddTeamMembership(team int, user string, opt *Org
return nil, resp, err
}
- return t, resp, err
+ return t, resp, nil
}
// RemoveTeamMembership removes a user from a team.
diff --git a/vendor/github.com/google/go-github/github/projects.go b/vendor/github.com/google/go-github/github/projects.go
index 2330056..766f002 100644
--- a/vendor/github.com/google/go-github/github/projects.go
+++ b/vendor/github.com/google/go-github/github/projects.go
@@ -51,7 +51,7 @@ func (s *ProjectsService) GetProject(id int) (*Project, *Response, error) {
return nil, resp, err
}
- return project, resp, err
+ return project, resp, nil
}
// ProjectOptions specifies the parameters to the
@@ -83,7 +83,7 @@ func (s *ProjectsService) UpdateProject(id int, opt *ProjectOptions) (*Project,
return nil, resp, err
}
- return project, resp, err
+ return project, resp, nil
}
// DeleteProject deletes a GitHub Project from a repository.
@@ -137,7 +137,7 @@ func (s *ProjectsService) ListProjectColumns(projectID int, opt *ListOptions) ([
return nil, resp, err
}
- return columns, resp, err
+ return columns, resp, nil
}
// GetProjectColumn gets a column of a GitHub Project for a repo.
@@ -159,7 +159,7 @@ func (s *ProjectsService) GetProjectColumn(id int) (*ProjectColumn, *Response, e
return nil, resp, err
}
- return column, resp, err
+ return column, resp, nil
}
// ProjectColumnOptions specifies the parameters to the
@@ -189,7 +189,7 @@ func (s *ProjectsService) CreateProjectColumn(projectID int, opt *ProjectColumnO
return nil, resp, err
}
- return column, resp, err
+ return column, resp, nil
}
// UpdateProjectColumn updates a column of a GitHub Project.
@@ -211,7 +211,7 @@ func (s *ProjectsService) UpdateProjectColumn(columnID int, opt *ProjectColumnOp
return nil, resp, err
}
- return column, resp, err
+ return column, resp, nil
}
// DeleteProjectColumn deletes a column from a GitHub Project.
@@ -290,7 +290,7 @@ func (s *ProjectsService) ListProjectCards(columnID int, opt *ListOptions) ([]*P
return nil, resp, err
}
- return cards, resp, err
+ return cards, resp, nil
}
// GetProjectCard gets a card in a column of a GitHub Project.
@@ -312,7 +312,7 @@ func (s *ProjectsService) GetProjectCard(columnID int) (*ProjectCard, *Response,
return nil, resp, err
}
- return card, resp, err
+ return card, resp, nil
}
// ProjectCardOptions specifies the parameters to the
@@ -347,7 +347,7 @@ func (s *ProjectsService) CreateProjectCard(columnID int, opt *ProjectCardOption
return nil, resp, err
}
- return card, resp, err
+ return card, resp, nil
}
// UpdateProjectCard updates a card of a GitHub Project.
@@ -369,7 +369,7 @@ func (s *ProjectsService) UpdateProjectCard(cardID int, opt *ProjectCardOptions)
return nil, resp, err
}
- return card, resp, err
+ return card, resp, nil
}
// DeleteProjectCard deletes a card from a GitHub Project.
diff --git a/vendor/github.com/google/go-github/github/pulls.go b/vendor/github.com/google/go-github/github/pulls.go
index d3a9ae8..5b5667b 100644
--- a/vendor/github.com/google/go-github/github/pulls.go
+++ b/vendor/github.com/google/go-github/github/pulls.go
@@ -14,7 +14,7 @@ import (
// PullRequestsService handles communication with the pull request related
// methods of the GitHub API.
//
-// GitHub API docs: http://developer.github.com/v3/pulls/
+// GitHub API docs: https://developer.github.com/v3/pulls/
type PullRequestsService service
// PullRequest represents a GitHub pull request on a repository.
@@ -69,8 +69,8 @@ type PullRequestBranch struct {
// PullRequestListOptions specifies the optional parameters to the
// PullRequestsService.List method.
type PullRequestListOptions struct {
- // State filters pull requests based on their state. Possible values are:
- // open, closed. Default is "open".
+ // State filters pull requests based on their state. Possible values are:
+ // open, closed. Default is "open".
State string `url:"state,omitempty"`
// Head filters pull requests by head user and branch name in the format of:
@@ -94,7 +94,7 @@ type PullRequestListOptions struct {
// List the pull requests for the specified repository.
//
-// GitHub API docs: http://developer.github.com/v3/pulls/#list-pull-requests
+// GitHub API docs: https://developer.github.com/v3/pulls/#list-pull-requests
func (s *PullRequestsService) List(owner string, repo string, opt *PullRequestListOptions) ([]*PullRequest, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/pulls", owner, repo)
u, err := addOptions(u, opt)
diff --git a/vendor/github.com/google/go-github/github/pulls_comments.go b/vendor/github.com/google/go-github/github/pulls_comments.go
index 51518f0..0595389 100644
--- a/vendor/github.com/google/go-github/github/pulls_comments.go
+++ b/vendor/github.com/google/go-github/github/pulls_comments.go
@@ -37,10 +37,10 @@ func (p PullRequestComment) String() string {
// PullRequestListCommentsOptions specifies the optional parameters to the
// PullRequestsService.ListComments method.
type PullRequestListCommentsOptions struct {
- // Sort specifies how to sort comments. Possible values are: created, updated.
+ // Sort specifies how to sort comments. Possible values are: created, updated.
Sort string `url:"sort,omitempty"`
- // Direction in which to sort comments. Possible values are: asc, desc.
+ // Direction in which to sort comments. Possible values are: asc, desc.
Direction string `url:"direction,omitempty"`
// Since filters comments by time.
@@ -49,7 +49,7 @@ type PullRequestListCommentsOptions struct {
ListOptions
}
-// ListComments lists all comments on the specified pull request. Specifying a
+// ListComments lists all comments on the specified pull request. Specifying a
// pull request number of 0 will return all comments on all pull requests for
// the repository.
//
diff --git a/vendor/github.com/google/go-github/github/repos.go b/vendor/github.com/google/go-github/github/repos.go
index 019a731..58d27f1 100644
--- a/vendor/github.com/google/go-github/github/repos.go
+++ b/vendor/github.com/google/go-github/github/repos.go
@@ -13,7 +13,7 @@ import (
// RepositoriesService handles communication with the repository related
// methods of the GitHub API.
//
-// GitHub API docs: http://developer.github.com/v3/repos/
+// GitHub API docs: https://developer.github.com/v3/repos/
type RepositoriesService service
// Repository represents a GitHub repository.
@@ -151,10 +151,10 @@ type RepositoryListOptions struct {
ListOptions
}
-// List the repositories for a user. Passing the empty string will list
+// List the repositories for a user. Passing the empty string will list
// repositories for the authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/repos/#list-user-repositories
+// GitHub API docs: https://developer.github.com/v3/repos/#list-user-repositories
func (s *RepositoriesService) List(user string, opt *RepositoryListOptions) ([]*Repository, *Response, error) {
var u string
if user != "" {
@@ -187,8 +187,8 @@ func (s *RepositoriesService) List(user string, opt *RepositoryListOptions) ([]*
// RepositoryListByOrgOptions specifies the optional parameters to the
// RepositoriesService.ListByOrg method.
type RepositoryListByOrgOptions struct {
- // Type of repositories to list. Possible values are: all, public, private,
- // forks, sources, member. Default is "all".
+ // Type of repositories to list. Possible values are: all, public, private,
+ // forks, sources, member. Default is "all".
Type string `url:"type,omitempty"`
ListOptions
@@ -196,7 +196,7 @@ type RepositoryListByOrgOptions struct {
// ListByOrg lists the repositories for an organization.
//
-// GitHub API docs: http://developer.github.com/v3/repos/#list-organization-repositories
+// GitHub API docs: https://developer.github.com/v3/repos/#list-organization-repositories
func (s *RepositoriesService) ListByOrg(org string, opt *RepositoryListByOrgOptions) ([]*Repository, *Response, error) {
u := fmt.Sprintf("orgs/%v/repos", org)
u, err := addOptions(u, opt)
@@ -232,7 +232,7 @@ type RepositoryListAllOptions struct {
// ListAll lists all GitHub repositories in the order that they were created.
//
-// GitHub API docs: http://developer.github.com/v3/repos/#list-all-public-repositories
+// GitHub API docs: https://developer.github.com/v3/repos/#list-all-public-repositories
func (s *RepositoriesService) ListAll(opt *RepositoryListAllOptions) ([]*Repository, *Response, error) {
u, err := addOptions("repositories", opt)
if err != nil {
@@ -253,11 +253,11 @@ func (s *RepositoriesService) ListAll(opt *RepositoryListAllOptions) ([]*Reposit
return repos, resp, nil
}
-// Create a new repository. If an organization is specified, the new
-// repository will be created under that org. If the empty string is
+// Create a new repository. If an organization is specified, the new
+// repository will be created under that org. If the empty string is
// specified, it will be created for the authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/repos/#create
+// GitHub API docs: https://developer.github.com/v3/repos/#create
func (s *RepositoriesService) Create(org string, repo *Repository) (*Repository, *Response, error) {
var u string
if org != "" {
@@ -282,7 +282,7 @@ func (s *RepositoriesService) Create(org string, repo *Repository) (*Repository,
// Get fetches a repository.
//
-// GitHub API docs: http://developer.github.com/v3/repos/#get
+// GitHub API docs: https://developer.github.com/v3/repos/#get
func (s *RepositoriesService) Get(owner, repo string) (*Repository, *Response, error) {
u := fmt.Sprintf("repos/%v/%v", owner, repo)
req, err := s.client.NewRequest("GET", u, nil)
@@ -329,7 +329,7 @@ func (s *RepositoriesService) GetByID(id int) (*Repository, *Response, error) {
// Edit updates a repository.
//
-// GitHub API docs: http://developer.github.com/v3/repos/#edit
+// GitHub API docs: https://developer.github.com/v3/repos/#edit
func (s *RepositoriesService) Edit(owner, repo string, repository *Repository) (*Repository, *Response, error) {
u := fmt.Sprintf("repos/%v/%v", owner, repo)
req, err := s.client.NewRequest("PATCH", u, repository)
@@ -395,7 +395,7 @@ type ListContributorsOptions struct {
// ListContributors lists contributors for a repository.
//
-// GitHub API docs: http://developer.github.com/v3/repos/#list-contributors
+// GitHub API docs: https://developer.github.com/v3/repos/#list-contributors
func (s *RepositoriesService) ListContributors(owner string, repository string, opt *ListContributorsOptions) ([]*Contributor, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/contributors", owner, repository)
u, err := addOptions(u, opt)
@@ -426,7 +426,7 @@ func (s *RepositoriesService) ListContributors(owner string, repository string,
// "Python": 7769
// }
//
-// GitHub API Docs: http://developer.github.com/v3/repos/#list-languages
+// GitHub API Docs: https://developer.github.com/v3/repos/#list-languages
func (s *RepositoriesService) ListLanguages(owner string, repo string) (map[string]int, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/languages", owner, repo)
req, err := s.client.NewRequest("GET", u, nil)
@@ -559,7 +559,7 @@ type BranchRestrictionsRequest struct {
// ListBranches lists branches for the specified repository.
//
-// GitHub API docs: http://developer.github.com/v3/repos/#list-branches
+// GitHub API docs: https://developer.github.com/v3/repos/#list-branches
func (s *RepositoriesService) ListBranches(owner string, repo string, opt *ListOptions) ([]*Branch, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/branches", owner, repo)
u, err := addOptions(u, opt)
diff --git a/vendor/github.com/google/go-github/github/repos_collaborators.go b/vendor/github.com/google/go-github/github/repos_collaborators.go
index a19a14a..ddb88f5 100644
--- a/vendor/github.com/google/go-github/github/repos_collaborators.go
+++ b/vendor/github.com/google/go-github/github/repos_collaborators.go
@@ -9,7 +9,7 @@ import "fmt"
// ListCollaborators lists the Github users that have access to the repository.
//
-// GitHub API docs: http://developer.github.com/v3/repos/collaborators/#list
+// GitHub API docs: https://developer.github.com/v3/repos/collaborators/#list
func (s *RepositoriesService) ListCollaborators(owner, repo string, opt *ListOptions) ([]*User, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/collaborators", owner, repo)
u, err := addOptions(u, opt)
@@ -36,7 +36,7 @@ func (s *RepositoriesService) ListCollaborators(owner, repo string, opt *ListOpt
// Note: This will return false if the user is not a collaborator OR the user
// is not a GitHub user.
//
-// GitHub API docs: http://developer.github.com/v3/repos/collaborators/#get
+// GitHub API docs: https://developer.github.com/v3/repos/collaborators/#get
func (s *RepositoriesService) IsCollaborator(owner, repo, user string) (bool, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/collaborators/%v", owner, repo, user)
req, err := s.client.NewRequest("GET", u, nil)
@@ -87,7 +87,7 @@ type RepositoryAddCollaboratorOptions struct {
// push - team members can pull and push, but not administer this repository
// admin - team members can pull, push and administer this repository
//
- // Default value is "push". This option is only valid for organization-owned repositories.
+ // Default value is "push". This option is only valid for organization-owned repositories.
Permission string `json:"permission,omitempty"`
}
@@ -110,7 +110,7 @@ func (s *RepositoriesService) AddCollaborator(owner, repo, user string, opt *Rep
// RemoveCollaborator removes the specified Github user as collaborator from the given repo.
// Note: Does not return error if a valid user that is not a collaborator is removed.
//
-// GitHub API docs: http://developer.github.com/v3/repos/collaborators/#remove-collaborator
+// GitHub API docs: https://developer.github.com/v3/repos/collaborators/#remove-collaborator
func (s *RepositoriesService) RemoveCollaborator(owner, repo, user string) (*Response, error) {
u := fmt.Sprintf("repos/%v/%v/collaborators/%v", owner, repo, user)
req, err := s.client.NewRequest("DELETE", u, nil)
diff --git a/vendor/github.com/google/go-github/github/repos_comments.go b/vendor/github.com/google/go-github/github/repos_comments.go
index 7abedc8..d5917e1 100644
--- a/vendor/github.com/google/go-github/github/repos_comments.go
+++ b/vendor/github.com/google/go-github/github/repos_comments.go
@@ -34,7 +34,7 @@ func (r RepositoryComment) String() string {
// ListComments lists all the comments for the repository.
//
-// GitHub API docs: http://developer.github.com/v3/repos/comments/#list-commit-comments-for-a-repository
+// GitHub API docs: https://developer.github.com/v3/repos/comments/#list-commit-comments-for-a-repository
func (s *RepositoriesService) ListComments(owner, repo string, opt *ListOptions) ([]*RepositoryComment, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/comments", owner, repo)
u, err := addOptions(u, opt)
@@ -61,7 +61,7 @@ func (s *RepositoriesService) ListComments(owner, repo string, opt *ListOptions)
// ListCommitComments lists all the comments for a given commit SHA.
//
-// GitHub API docs: http://developer.github.com/v3/repos/comments/#list-comments-for-a-single-commit
+// GitHub API docs: https://developer.github.com/v3/repos/comments/#list-comments-for-a-single-commit
func (s *RepositoriesService) ListCommitComments(owner, repo, sha string, opt *ListOptions) ([]*RepositoryComment, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/commits/%v/comments", owner, repo, sha)
u, err := addOptions(u, opt)
@@ -89,7 +89,7 @@ func (s *RepositoriesService) ListCommitComments(owner, repo, sha string, opt *L
// CreateComment creates a comment for the given commit.
// Note: GitHub allows for comments to be created for non-existing files and positions.
//
-// GitHub API docs: http://developer.github.com/v3/repos/comments/#create-a-commit-comment
+// GitHub API docs: https://developer.github.com/v3/repos/comments/#create-a-commit-comment
func (s *RepositoriesService) CreateComment(owner, repo, sha string, comment *RepositoryComment) (*RepositoryComment, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/commits/%v/comments", owner, repo, sha)
req, err := s.client.NewRequest("POST", u, comment)
@@ -103,12 +103,12 @@ func (s *RepositoriesService) CreateComment(owner, repo, sha string, comment *Re
return nil, resp, err
}
- return c, resp, err
+ return c, resp, nil
}
// GetComment gets a single comment from a repository.
//
-// GitHub API docs: http://developer.github.com/v3/repos/comments/#get-a-single-commit-comment
+// GitHub API docs: https://developer.github.com/v3/repos/comments/#get-a-single-commit-comment
func (s *RepositoriesService) GetComment(owner, repo string, id int) (*RepositoryComment, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/comments/%v", owner, repo, id)
req, err := s.client.NewRequest("GET", u, nil)
@@ -125,12 +125,12 @@ func (s *RepositoriesService) GetComment(owner, repo string, id int) (*Repositor
return nil, resp, err
}
- return c, resp, err
+ return c, resp, nil
}
// UpdateComment updates the body of a single comment.
//
-// GitHub API docs: http://developer.github.com/v3/repos/comments/#update-a-commit-comment
+// GitHub API docs: https://developer.github.com/v3/repos/comments/#update-a-commit-comment
func (s *RepositoriesService) UpdateComment(owner, repo string, id int, comment *RepositoryComment) (*RepositoryComment, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/comments/%v", owner, repo, id)
req, err := s.client.NewRequest("PATCH", u, comment)
@@ -144,12 +144,12 @@ func (s *RepositoriesService) UpdateComment(owner, repo string, id int, comment
return nil, resp, err
}
- return c, resp, err
+ return c, resp, nil
}
// DeleteComment deletes a single comment from a repository.
//
-// GitHub API docs: http://developer.github.com/v3/repos/comments/#delete-a-commit-comment
+// GitHub API docs: https://developer.github.com/v3/repos/comments/#delete-a-commit-comment
func (s *RepositoriesService) DeleteComment(owner, repo string, id int) (*Response, error) {
u := fmt.Sprintf("repos/%v/%v/comments/%v", owner, repo, id)
req, err := s.client.NewRequest("DELETE", u, nil)
diff --git a/vendor/github.com/google/go-github/github/repos_commits.go b/vendor/github.com/google/go-github/github/repos_commits.go
index bc0fbf9..110e7b2 100644
--- a/vendor/github.com/google/go-github/github/repos_commits.go
+++ b/vendor/github.com/google/go-github/github/repos_commits.go
@@ -107,7 +107,7 @@ type CommitsListOptions struct {
// ListCommits lists the commits of a repository.
//
-// GitHub API docs: http://developer.github.com/v3/repos/commits/#list
+// GitHub API docs: https://developer.github.com/v3/repos/commits/#list
func (s *RepositoriesService) ListCommits(owner, repo string, opt *CommitsListOptions) ([]*RepositoryCommit, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/commits", owner, repo)
u, err := addOptions(u, opt)
@@ -132,8 +132,8 @@ func (s *RepositoriesService) ListCommits(owner, repo string, opt *CommitsListOp
// GetCommit fetches the specified commit, including all details about it.
// todo: support media formats - https://github.com/google/go-github/issues/6
//
-// GitHub API docs: http://developer.github.com/v3/repos/commits/#get-a-single-commit
-// See also: http://developer.github.com//v3/git/commits/#get-a-single-commit provides the same functionality
+// GitHub API docs: https://developer.github.com/v3/repos/commits/#get-a-single-commit
+// See also: https://developer.github.com//v3/git/commits/#get-a-single-commit provides the same functionality
func (s *RepositoriesService) GetCommit(owner, repo, sha string) (*RepositoryCommit, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/commits/%v", owner, repo, sha)
@@ -151,10 +151,10 @@ func (s *RepositoriesService) GetCommit(owner, repo, sha string) (*RepositoryCom
return nil, resp, err
}
- return commit, resp, err
+ return commit, resp, nil
}
-// GetCommitSHA1 gets the SHA-1 of a commit reference. If a last-known SHA1 is
+// GetCommitSHA1 gets the SHA-1 of a commit reference. If a last-known SHA1 is
// supplied and no new commits have occurred, a 304 Unmodified response is returned.
//
// GitHub API docs: https://developer.github.com/v3/repos/commits/#get-the-sha-1-of-a-commit-reference
@@ -177,13 +177,13 @@ func (s *RepositoriesService) GetCommitSHA1(owner, repo, ref, lastSHA string) (s
return "", resp, err
}
- return buf.String(), resp, err
+ return buf.String(), resp, nil
}
// CompareCommits compares a range of commits with each other.
// todo: support media formats - https://github.com/google/go-github/issues/6
//
-// GitHub API docs: http://developer.github.com/v3/repos/commits/index.html#compare-two-commits
+// GitHub API docs: https://developer.github.com/v3/repos/commits/index.html#compare-two-commits
func (s *RepositoriesService) CompareCommits(owner, repo string, base, head string) (*CommitsComparison, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/compare/%v...%v", owner, repo, base, head)
@@ -198,5 +198,5 @@ func (s *RepositoriesService) CompareCommits(owner, repo string, base, head stri
return nil, resp, err
}
- return comp, resp, err
+ return comp, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/repos_contents.go b/vendor/github.com/google/go-github/github/repos_contents.go
index 7b08cf0..32b1573 100644
--- a/vendor/github.com/google/go-github/github/repos_contents.go
+++ b/vendor/github.com/google/go-github/github/repos_contents.go
@@ -4,14 +4,13 @@
// license that can be found in the LICENSE file.
// Repository contents API methods.
-// http://developer.github.com/v3/repos/contents/
+// https://developer.github.com/v3/repos/contents/
package github
import (
"encoding/base64"
"encoding/json"
- "errors"
"fmt"
"io"
"net/http"
@@ -64,20 +63,6 @@ func (r RepositoryContent) String() string {
return Stringify(r)
}
-// Decode decodes the file content if it is base64 encoded.
-//
-// Deprecated: Use GetContent instead.
-func (r *RepositoryContent) Decode() ([]byte, error) {
- if *r.Encoding != "base64" {
- return nil, errors.New("cannot decode non-base64")
- }
- o, err := base64.StdEncoding.DecodeString(*r.Content)
- if err != nil {
- return nil, err
- }
- return o, nil
-}
-
// GetContent returns the content of r, decoding it if necessary.
func (r *RepositoryContent) GetContent() (string, error) {
var encoding string
@@ -101,7 +86,7 @@ func (r *RepositoryContent) GetContent() (string, error) {
// GetReadme gets the Readme file for the repository.
//
-// GitHub API docs: http://developer.github.com/v3/repos/contents/#get-the-readme
+// GitHub API docs: https://developer.github.com/v3/repos/contents/#get-the-readme
func (s *RepositoriesService) GetReadme(owner, repo string, opt *RepositoryContentGetOptions) (*RepositoryContent, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/readme", owner, repo)
u, err := addOptions(u, opt)
@@ -117,7 +102,7 @@ func (s *RepositoriesService) GetReadme(owner, repo string, opt *RepositoryConte
if err != nil {
return nil, resp, err
}
- return readme, resp, err
+ return readme, resp, nil
}
// DownloadContents returns an io.ReadCloser that reads the contents of the
@@ -153,7 +138,7 @@ func (s *RepositoriesService) DownloadContents(owner, repo, filepath string, opt
// as possible, both result types will be returned but only one will contain a
// value and the other will be nil.
//
-// GitHub API docs: http://developer.github.com/v3/repos/contents/#get-contents
+// GitHub API docs: https://developer.github.com/v3/repos/contents/#get-contents
func (s *RepositoriesService) GetContents(owner, repo, path string, opt *RepositoryContentGetOptions) (fileContent *RepositoryContent, directoryContent []*RepositoryContent, resp *Response, err error) {
escapedPath := (&url.URL{Path: path}).String()
u := fmt.Sprintf("repos/%s/%s/contents/%s", owner, repo, escapedPath)
@@ -184,7 +169,7 @@ func (s *RepositoriesService) GetContents(owner, repo, path string, opt *Reposit
// CreateFile creates a new file in a repository at the given path and returns
// the commit and file metadata.
//
-// GitHub API docs: http://developer.github.com/v3/repos/contents/#create-a-file
+// GitHub API docs: https://developer.github.com/v3/repos/contents/#create-a-file
func (s *RepositoriesService) CreateFile(owner, repo, path string, opt *RepositoryContentFileOptions) (*RepositoryContentResponse, *Response, error) {
u := fmt.Sprintf("repos/%s/%s/contents/%s", owner, repo, path)
req, err := s.client.NewRequest("PUT", u, opt)
@@ -196,13 +181,13 @@ func (s *RepositoriesService) CreateFile(owner, repo, path string, opt *Reposito
if err != nil {
return nil, resp, err
}
- return createResponse, resp, err
+ return createResponse, resp, nil
}
// UpdateFile updates a file in a repository at the given path and returns the
// commit and file metadata. Requires the blob SHA of the file being updated.
//
-// GitHub API docs: http://developer.github.com/v3/repos/contents/#update-a-file
+// GitHub API docs: https://developer.github.com/v3/repos/contents/#update-a-file
func (s *RepositoriesService) UpdateFile(owner, repo, path string, opt *RepositoryContentFileOptions) (*RepositoryContentResponse, *Response, error) {
u := fmt.Sprintf("repos/%s/%s/contents/%s", owner, repo, path)
req, err := s.client.NewRequest("PUT", u, opt)
@@ -214,13 +199,13 @@ func (s *RepositoriesService) UpdateFile(owner, repo, path string, opt *Reposito
if err != nil {
return nil, resp, err
}
- return updateResponse, resp, err
+ return updateResponse, resp, nil
}
// DeleteFile deletes a file from a repository and returns the commit.
// Requires the blob SHA of the file to be deleted.
//
-// GitHub API docs: http://developer.github.com/v3/repos/contents/#delete-a-file
+// GitHub API docs: https://developer.github.com/v3/repos/contents/#delete-a-file
func (s *RepositoriesService) DeleteFile(owner, repo, path string, opt *RepositoryContentFileOptions) (*RepositoryContentResponse, *Response, error) {
u := fmt.Sprintf("repos/%s/%s/contents/%s", owner, repo, path)
req, err := s.client.NewRequest("DELETE", u, opt)
@@ -232,7 +217,7 @@ func (s *RepositoriesService) DeleteFile(owner, repo, path string, opt *Reposito
if err != nil {
return nil, resp, err
}
- return deleteResponse, resp, err
+ return deleteResponse, resp, nil
}
// archiveFormat is used to define the archive type when calling GetArchiveLink.
@@ -250,7 +235,7 @@ const (
// repository. The archiveFormat can be specified by either the github.Tarball
// or github.Zipball constant.
//
-// GitHub API docs: http://developer.github.com/v3/repos/contents/#get-archive-link
+// GitHub API docs: https://developer.github.com/v3/repos/contents/#get-archive-link
func (s *RepositoriesService) GetArchiveLink(owner, repo string, archiveformat archiveFormat, opt *RepositoryContentGetOptions) (*url.URL, *Response, error) {
u := fmt.Sprintf("repos/%s/%s/%s", owner, repo, archiveformat)
if opt != nil && opt.Ref != "" {
diff --git a/vendor/github.com/google/go-github/github/repos_deployments.go b/vendor/github.com/google/go-github/github/repos_deployments.go
index 32a9a25..ad931af 100644
--- a/vendor/github.com/google/go-github/github/repos_deployments.go
+++ b/vendor/github.com/google/go-github/github/repos_deployments.go
@@ -99,7 +99,7 @@ func (s *RepositoriesService) GetDeployment(owner, repo string, deploymentID int
return nil, resp, err
}
- return deployment, resp, err
+ return deployment, resp, nil
}
// CreateDeployment creates a new deployment for a repository.
@@ -122,7 +122,7 @@ func (s *RepositoriesService) CreateDeployment(owner, repo string, request *Depl
return nil, resp, err
}
- return d, resp, err
+ return d, resp, nil
}
// DeploymentStatus represents the status of a
@@ -144,7 +144,6 @@ type DeploymentStatus struct {
// DeploymentStatusRequest represents a deployment request
type DeploymentStatusRequest struct {
State *string `json:"state,omitempty"`
- TargetURL *string `json:"target_url,omitempty"` // Deprecated. Use LogURL instead.
LogURL *string `json:"log_url,omitempty"`
Description *string `json:"description,omitempty"`
EnvironmentURL *string `json:"environment_url,omitempty"`
@@ -195,7 +194,7 @@ func (s *RepositoriesService) GetDeploymentStatus(owner, repo string, deployment
return nil, resp, err
}
- return d, resp, err
+ return d, resp, nil
}
// CreateDeploymentStatus creates a new status for a deployment.
@@ -218,5 +217,5 @@ func (s *RepositoriesService) CreateDeploymentStatus(owner, repo string, deploym
return nil, resp, err
}
- return d, resp, err
+ return d, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/repos_forks.go b/vendor/github.com/google/go-github/github/repos_forks.go
index 986559d..fe98a6c 100644
--- a/vendor/github.com/google/go-github/github/repos_forks.go
+++ b/vendor/github.com/google/go-github/github/repos_forks.go
@@ -10,8 +10,8 @@ import "fmt"
// RepositoryListForksOptions specifies the optional parameters to the
// RepositoriesService.ListForks method.
type RepositoryListForksOptions struct {
- // How to sort the forks list. Possible values are: newest, oldest,
- // watchers. Default is "newest".
+ // How to sort the forks list. Possible values are: newest, oldest,
+ // watchers. Default is "newest".
Sort string `url:"sort,omitempty"`
ListOptions
@@ -19,7 +19,7 @@ type RepositoryListForksOptions struct {
// ListForks lists the forks of the specified repository.
//
-// GitHub API docs: http://developer.github.com/v3/repos/forks/#list-forks
+// GitHub API docs: https://developer.github.com/v3/repos/forks/#list-forks
func (s *RepositoriesService) ListForks(owner, repo string, opt *RepositoryListForksOptions) ([]*Repository, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/forks", owner, repo)
u, err := addOptions(u, opt)
@@ -75,5 +75,5 @@ func (s *RepositoriesService) CreateFork(owner, repo string, opt *RepositoryCrea
return nil, resp, err
}
- return fork, resp, err
+ return fork, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/repos_hooks.go b/vendor/github.com/google/go-github/github/repos_hooks.go
index 25f50b2..818286b 100644
--- a/vendor/github.com/google/go-github/github/repos_hooks.go
+++ b/vendor/github.com/google/go-github/github/repos_hooks.go
@@ -11,9 +11,9 @@ import (
)
// WebHookPayload represents the data that is received from GitHub when a push
-// event hook is triggered. The format of these payloads pre-date most of the
+// event hook is triggered. The format of these payloads pre-date most of the
// GitHub v3 API, so there are lots of minor incompatibilities with the types
-// defined in the rest of the API. Therefore, several types are duplicated
+// defined in the rest of the API. Therefore, several types are duplicated
// here to account for these differences.
//
// GitHub API docs: https://help.github.com/articles/post-receive-hooks
@@ -55,7 +55,7 @@ func (w WebHookCommit) String() string {
}
// WebHookAuthor represents the author or committer of a commit, as specified
-// in a WebHookCommit. The commit author may not correspond to a GitHub User.
+// in a WebHookCommit. The commit author may not correspond to a GitHub User.
type WebHookAuthor struct {
Email *string `json:"email,omitempty"`
Name *string `json:"name,omitempty"`
@@ -85,7 +85,7 @@ func (h Hook) String() string {
// CreateHook creates a Hook for the specified repository.
// Name and Config are required fields.
//
-// GitHub API docs: http://developer.github.com/v3/repos/hooks/#create-a-hook
+// GitHub API docs: https://developer.github.com/v3/repos/hooks/#create-a-hook
func (s *RepositoriesService) CreateHook(owner, repo string, hook *Hook) (*Hook, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/hooks", owner, repo)
req, err := s.client.NewRequest("POST", u, hook)
@@ -99,12 +99,12 @@ func (s *RepositoriesService) CreateHook(owner, repo string, hook *Hook) (*Hook,
return nil, resp, err
}
- return h, resp, err
+ return h, resp, nil
}
// ListHooks lists all Hooks for the specified repository.
//
-// GitHub API docs: http://developer.github.com/v3/repos/hooks/#list
+// GitHub API docs: https://developer.github.com/v3/repos/hooks/#list
func (s *RepositoriesService) ListHooks(owner, repo string, opt *ListOptions) ([]*Hook, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/hooks", owner, repo)
u, err := addOptions(u, opt)
@@ -128,7 +128,7 @@ func (s *RepositoriesService) ListHooks(owner, repo string, opt *ListOptions) ([
// GetHook returns a single specified Hook.
//
-// GitHub API docs: http://developer.github.com/v3/repos/hooks/#get-single-hook
+// GitHub API docs: https://developer.github.com/v3/repos/hooks/#get-single-hook
func (s *RepositoriesService) GetHook(owner, repo string, id int) (*Hook, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/hooks/%d", owner, repo, id)
req, err := s.client.NewRequest("GET", u, nil)
@@ -142,7 +142,7 @@ func (s *RepositoriesService) GetHook(owner, repo string, id int) (*Hook, *Respo
// EditHook updates a specified Hook.
//
-// GitHub API docs: http://developer.github.com/v3/repos/hooks/#edit-a-hook
+// GitHub API docs: https://developer.github.com/v3/repos/hooks/#edit-a-hook
func (s *RepositoriesService) EditHook(owner, repo string, id int, hook *Hook) (*Hook, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/hooks/%d", owner, repo, id)
req, err := s.client.NewRequest("PATCH", u, hook)
@@ -156,7 +156,7 @@ func (s *RepositoriesService) EditHook(owner, repo string, id int, hook *Hook) (
// DeleteHook deletes a specified Hook.
//
-// GitHub API docs: http://developer.github.com/v3/repos/hooks/#delete-a-hook
+// GitHub API docs: https://developer.github.com/v3/repos/hooks/#delete-a-hook
func (s *RepositoriesService) DeleteHook(owner, repo string, id int) (*Response, error) {
u := fmt.Sprintf("repos/%v/%v/hooks/%d", owner, repo, id)
req, err := s.client.NewRequest("DELETE", u, nil)
@@ -180,7 +180,7 @@ func (s *RepositoriesService) PingHook(owner, repo string, id int) (*Response, e
// TestHook triggers a test Hook by github.
//
-// GitHub API docs: http://developer.github.com/v3/repos/hooks/#test-a-push-hook
+// GitHub API docs: https://developer.github.com/v3/repos/hooks/#test-a-push-hook
func (s *RepositoriesService) TestHook(owner, repo string, id int) (*Response, error) {
u := fmt.Sprintf("repos/%v/%v/hooks/%d/tests", owner, repo, id)
req, err := s.client.NewRequest("POST", u, nil)
@@ -189,8 +189,3 @@ func (s *RepositoriesService) TestHook(owner, repo string, id int) (*Response, e
}
return s.client.Do(req, nil)
}
-
-// ListServiceHooks is deprecated. Use Client.ListServiceHooks instead.
-func (s *RepositoriesService) ListServiceHooks() ([]*ServiceHook, *Response, error) {
- return s.client.ListServiceHooks()
-}
diff --git a/vendor/github.com/google/go-github/github/repos_invitations.go b/vendor/github.com/google/go-github/github/repos_invitations.go
index f2806d1..e80b946 100644
--- a/vendor/github.com/google/go-github/github/repos_invitations.go
+++ b/vendor/github.com/google/go-github/github/repos_invitations.go
@@ -46,7 +46,7 @@ func (s *RepositoriesService) ListInvitations(repoID int, opt *ListOptions) ([]*
return nil, resp, err
}
- return invites, resp, err
+ return invites, resp, nil
}
// DeleteInvitation deletes a repository invitation.
diff --git a/vendor/github.com/google/go-github/github/repos_keys.go b/vendor/github.com/google/go-github/github/repos_keys.go
index f8f4f48..1ac35da 100644
--- a/vendor/github.com/google/go-github/github/repos_keys.go
+++ b/vendor/github.com/google/go-github/github/repos_keys.go
@@ -11,7 +11,7 @@ import "fmt"
// ListKeys lists the deploy keys for a repository.
//
-// GitHub API docs: http://developer.github.com/v3/repos/keys/#list
+// GitHub API docs: https://developer.github.com/v3/repos/keys/#list
func (s *RepositoriesService) ListKeys(owner string, repo string, opt *ListOptions) ([]*Key, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/keys", owner, repo)
u, err := addOptions(u, opt)
@@ -35,7 +35,7 @@ func (s *RepositoriesService) ListKeys(owner string, repo string, opt *ListOptio
// GetKey fetches a single deploy key.
//
-// GitHub API docs: http://developer.github.com/v3/repos/keys/#get
+// GitHub API docs: https://developer.github.com/v3/repos/keys/#get
func (s *RepositoriesService) GetKey(owner string, repo string, id int) (*Key, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/keys/%v", owner, repo, id)
@@ -50,12 +50,12 @@ func (s *RepositoriesService) GetKey(owner string, repo string, id int) (*Key, *
return nil, resp, err
}
- return key, resp, err
+ return key, resp, nil
}
// CreateKey adds a deploy key for a repository.
//
-// GitHub API docs: http://developer.github.com/v3/repos/keys/#create
+// GitHub API docs: https://developer.github.com/v3/repos/keys/#create
func (s *RepositoriesService) CreateKey(owner string, repo string, key *Key) (*Key, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/keys", owner, repo)
@@ -70,12 +70,12 @@ func (s *RepositoriesService) CreateKey(owner string, repo string, key *Key) (*K
return nil, resp, err
}
- return k, resp, err
+ return k, resp, nil
}
// EditKey edits a deploy key.
//
-// GitHub API docs: http://developer.github.com/v3/repos/keys/#edit
+// GitHub API docs: https://developer.github.com/v3/repos/keys/#edit
func (s *RepositoriesService) EditKey(owner string, repo string, id int, key *Key) (*Key, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/keys/%v", owner, repo, id)
@@ -90,12 +90,12 @@ func (s *RepositoriesService) EditKey(owner string, repo string, id int, key *Ke
return nil, resp, err
}
- return k, resp, err
+ return k, resp, nil
}
// DeleteKey deletes a deploy key.
//
-// GitHub API docs: http://developer.github.com/v3/repos/keys/#delete
+// GitHub API docs: https://developer.github.com/v3/repos/keys/#delete
func (s *RepositoriesService) DeleteKey(owner string, repo string, id int) (*Response, error) {
u := fmt.Sprintf("repos/%v/%v/keys/%v", owner, repo, id)
diff --git a/vendor/github.com/google/go-github/github/repos_merging.go b/vendor/github.com/google/go-github/github/repos_merging.go
index 31f8313..f9aefb4 100644
--- a/vendor/github.com/google/go-github/github/repos_merging.go
+++ b/vendor/github.com/google/go-github/github/repos_merging.go
@@ -33,5 +33,5 @@ func (s *RepositoriesService) Merge(owner, repo string, request *RepositoryMerge
return nil, resp, err
}
- return commit, resp, err
+ return commit, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/repos_pages.go b/vendor/github.com/google/go-github/github/repos_pages.go
index ddd8301..e4bb6d8 100644
--- a/vendor/github.com/google/go-github/github/repos_pages.go
+++ b/vendor/github.com/google/go-github/github/repos_pages.go
@@ -52,7 +52,7 @@ func (s *RepositoriesService) GetPagesInfo(owner, repo string) (*Pages, *Respons
return nil, resp, err
}
- return site, resp, err
+ return site, resp, nil
}
// ListPagesBuilds lists the builds for a GitHub Pages site.
@@ -71,7 +71,7 @@ func (s *RepositoriesService) ListPagesBuilds(owner, repo string) ([]*PagesBuild
return nil, resp, err
}
- return pages, resp, err
+ return pages, resp, nil
}
// GetLatestPagesBuild fetches the latest build information for a GitHub pages site.
@@ -90,7 +90,7 @@ func (s *RepositoriesService) GetLatestPagesBuild(owner, repo string) (*PagesBui
return nil, resp, err
}
- return build, resp, err
+ return build, resp, nil
}
// GetPageBuild fetches the specific build information for a GitHub pages site.
@@ -109,7 +109,7 @@ func (s *RepositoriesService) GetPageBuild(owner, repo string, id int) (*PagesBu
return nil, resp, err
}
- return build, resp, err
+ return build, resp, nil
}
// RequestPageBuild requests a build of a GitHub Pages site without needing to push new commit.
@@ -131,5 +131,5 @@ func (s *RepositoriesService) RequestPageBuild(owner, repo string) (*PagesBuild,
return nil, resp, err
}
- return build, resp, err
+ return build, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/repos_projects.go b/vendor/github.com/google/go-github/github/repos_projects.go
index 137f89d..dc9227c 100644
--- a/vendor/github.com/google/go-github/github/repos_projects.go
+++ b/vendor/github.com/google/go-github/github/repos_projects.go
@@ -31,7 +31,7 @@ func (s *RepositoriesService) ListProjects(owner, repo string, opt *ListOptions)
return nil, resp, err
}
- return projects, resp, err
+ return projects, resp, nil
}
// CreateProject creates a GitHub Project for the specified repository.
@@ -53,5 +53,5 @@ func (s *RepositoriesService) CreateProject(owner, repo string, opt *ProjectOpti
return nil, resp, err
}
- return project, resp, err
+ return project, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/repos_releases.go b/vendor/github.com/google/go-github/github/repos_releases.go
index 72d95eb..10abc88 100644
--- a/vendor/github.com/google/go-github/github/repos_releases.go
+++ b/vendor/github.com/google/go-github/github/repos_releases.go
@@ -63,7 +63,7 @@ func (r ReleaseAsset) String() string {
// ListReleases lists the releases for a repository.
//
-// GitHub API docs: http://developer.github.com/v3/repos/releases/#list-releases-for-a-repository
+// GitHub API docs: https://developer.github.com/v3/repos/releases/#list-releases-for-a-repository
func (s *RepositoriesService) ListReleases(owner, repo string, opt *ListOptions) ([]*RepositoryRelease, *Response, error) {
u := fmt.Sprintf("repos/%s/%s/releases", owner, repo)
u, err := addOptions(u, opt)
@@ -86,7 +86,7 @@ func (s *RepositoriesService) ListReleases(owner, repo string, opt *ListOptions)
// GetRelease fetches a single release.
//
-// GitHub API docs: http://developer.github.com/v3/repos/releases/#get-a-single-release
+// GitHub API docs: https://developer.github.com/v3/repos/releases/#get-a-single-release
func (s *RepositoriesService) GetRelease(owner, repo string, id int) (*RepositoryRelease, *Response, error) {
u := fmt.Sprintf("repos/%s/%s/releases/%d", owner, repo, id)
return s.getSingleRelease(u)
@@ -119,12 +119,12 @@ func (s *RepositoriesService) getSingleRelease(url string) (*RepositoryRelease,
if err != nil {
return nil, resp, err
}
- return release, resp, err
+ return release, resp, nil
}
// CreateRelease adds a new release for a repository.
//
-// GitHub API docs : http://developer.github.com/v3/repos/releases/#create-a-release
+// GitHub API docs : https://developer.github.com/v3/repos/releases/#create-a-release
func (s *RepositoriesService) CreateRelease(owner, repo string, release *RepositoryRelease) (*RepositoryRelease, *Response, error) {
u := fmt.Sprintf("repos/%s/%s/releases", owner, repo)
@@ -138,12 +138,12 @@ func (s *RepositoriesService) CreateRelease(owner, repo string, release *Reposit
if err != nil {
return nil, resp, err
}
- return r, resp, err
+ return r, resp, nil
}
// EditRelease edits a repository release.
//
-// GitHub API docs : http://developer.github.com/v3/repos/releases/#edit-a-release
+// GitHub API docs : https://developer.github.com/v3/repos/releases/#edit-a-release
func (s *RepositoriesService) EditRelease(owner, repo string, id int, release *RepositoryRelease) (*RepositoryRelease, *Response, error) {
u := fmt.Sprintf("repos/%s/%s/releases/%d", owner, repo, id)
@@ -157,12 +157,12 @@ func (s *RepositoriesService) EditRelease(owner, repo string, id int, release *R
if err != nil {
return nil, resp, err
}
- return r, resp, err
+ return r, resp, nil
}
// DeleteRelease delete a single release from a repository.
//
-// GitHub API docs : http://developer.github.com/v3/repos/releases/#delete-a-release
+// GitHub API docs : https://developer.github.com/v3/repos/releases/#delete-a-release
func (s *RepositoriesService) DeleteRelease(owner, repo string, id int) (*Response, error) {
u := fmt.Sprintf("repos/%s/%s/releases/%d", owner, repo, id)
@@ -175,7 +175,7 @@ func (s *RepositoriesService) DeleteRelease(owner, repo string, id int) (*Respon
// ListReleaseAssets lists the release's assets.
//
-// GitHub API docs : http://developer.github.com/v3/repos/releases/#list-assets-for-a-release
+// GitHub API docs : https://developer.github.com/v3/repos/releases/#list-assets-for-a-release
func (s *RepositoriesService) ListReleaseAssets(owner, repo string, id int, opt *ListOptions) ([]*ReleaseAsset, *Response, error) {
u := fmt.Sprintf("repos/%s/%s/releases/%d/assets", owner, repo, id)
u, err := addOptions(u, opt)
@@ -198,7 +198,7 @@ func (s *RepositoriesService) ListReleaseAssets(owner, repo string, id int, opt
// GetReleaseAsset fetches a single release asset.
//
-// GitHub API docs : http://developer.github.com/v3/repos/releases/#get-a-single-release-asset
+// GitHub API docs : https://developer.github.com/v3/repos/releases/#get-a-single-release-asset
func (s *RepositoriesService) GetReleaseAsset(owner, repo string, id int) (*ReleaseAsset, *Response, error) {
u := fmt.Sprintf("repos/%s/%s/releases/assets/%d", owner, repo, id)
@@ -212,7 +212,7 @@ func (s *RepositoriesService) GetReleaseAsset(owner, repo string, id int) (*Rele
if err != nil {
return nil, resp, err
}
- return asset, resp, err
+ return asset, resp, nil
}
// DownloadReleaseAsset downloads a release asset or returns a redirect URL.
@@ -222,7 +222,7 @@ func (s *RepositoriesService) GetReleaseAsset(owner, repo string, id int) (*Rele
// If a redirect is returned, the redirect URL will be returned as a string instead
// of the io.ReadCloser. Exactly one of rc and redirectURL will be zero.
//
-// GitHub API docs : http://developer.github.com/v3/repos/releases/#get-a-single-release-asset
+// GitHub API docs : https://developer.github.com/v3/repos/releases/#get-a-single-release-asset
func (s *RepositoriesService) DownloadReleaseAsset(owner, repo string, id int) (rc io.ReadCloser, redirectURL string, err error) {
u := fmt.Sprintf("repos/%s/%s/releases/assets/%d", owner, repo, id)
@@ -261,7 +261,7 @@ func (s *RepositoriesService) DownloadReleaseAsset(owner, repo string, id int) (
// EditReleaseAsset edits a repository release asset.
//
-// GitHub API docs : http://developer.github.com/v3/repos/releases/#edit-a-release-asset
+// GitHub API docs : https://developer.github.com/v3/repos/releases/#edit-a-release-asset
func (s *RepositoriesService) EditReleaseAsset(owner, repo string, id int, release *ReleaseAsset) (*ReleaseAsset, *Response, error) {
u := fmt.Sprintf("repos/%s/%s/releases/assets/%d", owner, repo, id)
@@ -275,12 +275,12 @@ func (s *RepositoriesService) EditReleaseAsset(owner, repo string, id int, relea
if err != nil {
return nil, resp, err
}
- return asset, resp, err
+ return asset, resp, nil
}
// DeleteReleaseAsset delete a single release asset from a repository.
//
-// GitHub API docs : http://developer.github.com/v3/repos/releases/#delete-a-release-asset
+// GitHub API docs : https://developer.github.com/v3/repos/releases/#delete-a-release-asset
func (s *RepositoriesService) DeleteReleaseAsset(owner, repo string, id int) (*Response, error) {
u := fmt.Sprintf("repos/%s/%s/releases/assets/%d", owner, repo, id)
@@ -294,7 +294,7 @@ func (s *RepositoriesService) DeleteReleaseAsset(owner, repo string, id int) (*R
// UploadReleaseAsset creates an asset by uploading a file into a release repository.
// To upload assets that cannot be represented by an os.File, call NewUploadRequest directly.
//
-// GitHub API docs : http://developer.github.com/v3/repos/releases/#upload-a-release-asset
+// GitHub API docs : https://developer.github.com/v3/repos/releases/#upload-a-release-asset
func (s *RepositoriesService) UploadReleaseAsset(owner, repo string, id int, 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)
@@ -321,5 +321,5 @@ func (s *RepositoriesService) UploadReleaseAsset(owner, repo string, id int, opt
if err != nil {
return nil, resp, err
}
- return asset, resp, err
+ return asset, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/repos_stats.go b/vendor/github.com/google/go-github/github/repos_stats.go
index 8657bd7..5ed1dec 100644
--- a/vendor/github.com/google/go-github/github/repos_stats.go
+++ b/vendor/github.com/google/go-github/github/repos_stats.go
@@ -58,7 +58,7 @@ func (s *RepositoriesService) ListContributorsStats(owner, repo string) ([]*Cont
return nil, resp, err
}
- return contributorStats, resp, err
+ return contributorStats, resp, nil
}
// WeeklyCommitActivity represents the weekly commit activity for a repository.
@@ -97,11 +97,11 @@ func (s *RepositoriesService) ListCommitActivity(owner, repo string) ([]*WeeklyC
return nil, resp, err
}
- return weeklyCommitActivity, resp, err
+ return weeklyCommitActivity, resp, nil
}
// ListCodeFrequency returns a weekly aggregate of the number of additions and
-// deletions pushed to a repository. Returned WeeklyStats will contain
+// deletions pushed to a repository. Returned WeeklyStats will contain
// additions and deletions, but not total commits.
//
// If this is the first time these statistics are requested for the given
@@ -177,7 +177,7 @@ func (s *RepositoriesService) ListParticipation(owner, repo string) (*Repository
return nil, resp, err
}
- return participation, resp, err
+ return participation, resp, nil
}
// PunchCard represents the number of commits made during a given hour of a
diff --git a/vendor/github.com/google/go-github/github/repos_statuses.go b/vendor/github.com/google/go-github/github/repos_statuses.go
index 1056eee..65c2e0a 100644
--- a/vendor/github.com/google/go-github/github/repos_statuses.go
+++ b/vendor/github.com/google/go-github/github/repos_statuses.go
@@ -15,11 +15,11 @@ type RepoStatus struct {
ID *int `json:"id,omitempty"`
URL *string `json:"url,omitempty"`
- // State is the current state of the repository. Possible values are:
+ // State is the current state of the repository. Possible values are:
// pending, success, error, or failure.
State *string `json:"state,omitempty"`
- // TargetURL is the URL of the page representing this status. It will be
+ // TargetURL is the URL of the page representing this status. It will be
// linked from the GitHub UI to allow users to see the source of the status.
TargetURL *string `json:"target_url,omitempty"`
@@ -39,9 +39,9 @@ func (r RepoStatus) String() string {
}
// ListStatuses lists the statuses of a repository at the specified
-// reference. ref can be a SHA, a branch name, or a tag name.
+// reference. ref can be a SHA, a branch name, or a tag name.
//
-// GitHub API docs: http://developer.github.com/v3/repos/statuses/#list-statuses-for-a-specific-ref
+// GitHub API docs: https://developer.github.com/v3/repos/statuses/#list-statuses-for-a-specific-ref
func (s *RepositoriesService) ListStatuses(owner, repo, ref string, opt *ListOptions) ([]*RepoStatus, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/commits/%v/statuses", owner, repo, ref)
u, err := addOptions(u, opt)
@@ -64,9 +64,9 @@ func (s *RepositoriesService) ListStatuses(owner, repo, ref string, opt *ListOpt
}
// CreateStatus creates a new status for a repository at the specified
-// reference. Ref can be a SHA, a branch name, or a tag name.
+// reference. Ref can be a SHA, a branch name, or a tag name.
//
-// GitHub API docs: http://developer.github.com/v3/repos/statuses/#create-a-status
+// GitHub API docs: https://developer.github.com/v3/repos/statuses/#create-a-status
func (s *RepositoriesService) CreateStatus(owner, repo, ref string, status *RepoStatus) (*RepoStatus, *Response, error) {
u := fmt.Sprintf("repos/%v/%v/statuses/%v", owner, repo, ref)
req, err := s.client.NewRequest("POST", u, status)
@@ -80,12 +80,12 @@ func (s *RepositoriesService) CreateStatus(owner, repo, ref string, status *Repo
return nil, resp, err
}
- return repoStatus, resp, err
+ return repoStatus, resp, nil
}
// CombinedStatus represents the combined status of a repository at a particular reference.
type CombinedStatus struct {
- // State is the combined state of the repository. Possible values are:
+ // State is the combined state of the repository. Possible values are:
// failure, pending, or success.
State *string `json:"state,omitempty"`
@@ -103,7 +103,7 @@ func (s CombinedStatus) String() string {
}
// GetCombinedStatus returns the combined status of a repository at the specified
-// reference. ref can be a SHA, a branch name, or a tag name.
+// reference. ref can be a SHA, a branch name, or a tag name.
//
// GitHub API docs: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref
func (s *RepositoriesService) GetCombinedStatus(owner, repo, ref string, opt *ListOptions) (*CombinedStatus, *Response, error) {
@@ -124,5 +124,5 @@ func (s *RepositoriesService) GetCombinedStatus(owner, repo, ref string, opt *Li
return nil, resp, err
}
- return status, resp, err
+ return status, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/repos_traffic.go b/vendor/github.com/google/go-github/github/repos_traffic.go
index 0713c73..67341b9 100644
--- a/vendor/github.com/google/go-github/github/repos_traffic.go
+++ b/vendor/github.com/google/go-github/github/repos_traffic.go
@@ -110,7 +110,7 @@ func (s *RepositoriesService) ListTrafficViews(owner, repo string, opt *TrafficB
return nil, resp, err
}
- return trafficViews, resp, err
+ return trafficViews, resp, nil
}
// ListTrafficClones get total number of clones for the last 14 days and breaks it down either per day or week for the last 14 days.
@@ -134,5 +134,5 @@ func (s *RepositoriesService) ListTrafficClones(owner, repo string, opt *Traffic
return nil, resp, err
}
- return trafficClones, resp, err
+ return trafficClones, resp, nil
}
diff --git a/vendor/github.com/google/go-github/github/search.go b/vendor/github.com/google/go-github/github/search.go
index 8fd9430..e48f3ea 100644
--- a/vendor/github.com/google/go-github/github/search.go
+++ b/vendor/github.com/google/go-github/github/search.go
@@ -14,12 +14,12 @@ import (
// SearchService provides access to the search related functions
// in the GitHub API.
//
-// GitHub API docs: http://developer.github.com/v3/search/
+// GitHub API docs: https://developer.github.com/v3/search/
type SearchService service
// SearchOptions specifies optional parameters to the SearchService methods.
type SearchOptions struct {
- // How to sort the search results. Possible values are:
+ // How to sort the search results. Possible values are:
// - for repositories: stars, fork, updated
// - for commits: author-date, committer-date
// - for code: indexed
@@ -48,7 +48,7 @@ type RepositoriesSearchResult struct {
// Repositories searches repositories via various criteria.
//
-// GitHub API docs: http://developer.github.com/v3/search/#search-repositories
+// GitHub API docs: https://developer.github.com/v3/search/#search-repositories
func (s *SearchService) Repositories(query string, opt *SearchOptions) (*RepositoriesSearchResult, *Response, error) {
result := new(RepositoriesSearchResult)
resp, err := s.search("repositories", query, opt, result)
@@ -95,7 +95,7 @@ type IssuesSearchResult struct {
// Issues searches issues via various criteria.
//
-// GitHub API docs: http://developer.github.com/v3/search/#search-issues
+// GitHub API docs: https://developer.github.com/v3/search/#search-issues
func (s *SearchService) Issues(query string, opt *SearchOptions) (*IssuesSearchResult, *Response, error) {
result := new(IssuesSearchResult)
resp, err := s.search("issues", query, opt, result)
@@ -111,7 +111,7 @@ type UsersSearchResult struct {
// Users searches users via various criteria.
//
-// GitHub API docs: http://developer.github.com/v3/search/#search-users
+// GitHub API docs: https://developer.github.com/v3/search/#search-users
func (s *SearchService) Users(query string, opt *SearchOptions) (*UsersSearchResult, *Response, error) {
result := new(UsersSearchResult)
resp, err := s.search("users", query, opt, result)
@@ -160,7 +160,7 @@ func (c CodeResult) String() string {
// Code searches code via various criteria.
//
-// GitHub API docs: http://developer.github.com/v3/search/#search-code
+// GitHub API docs: https://developer.github.com/v3/search/#search-code
func (s *SearchService) Code(query string, opt *SearchOptions) (*CodeSearchResult, *Response, error) {
result := new(CodeSearchResult)
resp, err := s.search("code", query, opt, result)
diff --git a/vendor/github.com/google/go-github/github/strings.go b/vendor/github.com/google/go-github/github/strings.go
index 3857723..431e1cc 100644
--- a/vendor/github.com/google/go-github/github/strings.go
+++ b/vendor/github.com/google/go-github/github/strings.go
@@ -16,7 +16,7 @@ import (
var timestampType = reflect.TypeOf(Timestamp{})
// Stringify attempts to create a reasonable string representation of types in
-// the GitHub library. It does things like resolve pointers to their values
+// the GitHub library. It does things like resolve pointers to their values
// and omits struct fields with nil values.
func Stringify(message interface{}) string {
var buf bytes.Buffer
diff --git a/vendor/github.com/google/go-github/github/users.go b/vendor/github.com/google/go-github/github/users.go
index cd305a9..7639cb2 100644
--- a/vendor/github.com/google/go-github/github/users.go
+++ b/vendor/github.com/google/go-github/github/users.go
@@ -10,7 +10,7 @@ import "fmt"
// UsersService handles communication with the user related
// methods of the GitHub API.
//
-// GitHub API docs: http://developer.github.com/v3/users/
+// GitHub API docs: https://developer.github.com/v3/users/
type UsersService service
// User represents a GitHub user.
@@ -68,10 +68,10 @@ func (u User) String() string {
return Stringify(u)
}
-// Get fetches a user. Passing the empty string will fetch the authenticated
+// Get fetches a user. Passing the empty string will fetch the authenticated
// user.
//
-// GitHub API docs: http://developer.github.com/v3/users/#get-a-single-user
+// GitHub API docs: https://developer.github.com/v3/users/#get-a-single-user
func (s *UsersService) Get(user string) (*User, *Response, error) {
var u string
if user != "" {
@@ -90,7 +90,7 @@ func (s *UsersService) Get(user string) (*User, *Response, error) {
return nil, resp, err
}
- return uResp, resp, err
+ return uResp, resp, nil
}
// GetByID fetches a user.
@@ -109,12 +109,12 @@ func (s *UsersService) GetByID(id int) (*User, *Response, error) {
return nil, resp, err
}
- return user, resp, err
+ return user, resp, nil
}
// Edit the authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/users/#update-the-authenticated-user
+// GitHub API docs: https://developer.github.com/v3/users/#update-the-authenticated-user
func (s *UsersService) Edit(user *User) (*User, *Response, error) {
u := "user"
req, err := s.client.NewRequest("PATCH", u, user)
@@ -128,7 +128,7 @@ func (s *UsersService) Edit(user *User) (*User, *Response, error) {
return nil, resp, err
}
- return uResp, resp, err
+ return uResp, resp, nil
}
// UserListOptions specifies optional parameters to the UsersService.ListAll
@@ -144,7 +144,7 @@ type UserListOptions struct {
//
// To paginate through all users, populate 'Since' with the ID of the last user.
//
-// GitHub API docs: http://developer.github.com/v3/users/#get-all-users
+// GitHub API docs: https://developer.github.com/v3/users/#get-all-users
func (s *UsersService) ListAll(opt *UserListOptions) ([]*User, *Response, error) {
u, err := addOptions("users", opt)
if err != nil {
@@ -184,7 +184,7 @@ func (s *UsersService) ListInvitations() ([]*RepositoryInvitation, *Response, er
return nil, resp, err
}
- return invites, resp, err
+ return invites, resp, nil
}
// AcceptInvitation accepts the currently-open repository invitation for the
diff --git a/vendor/github.com/google/go-github/github/users_emails.go b/vendor/github.com/google/go-github/github/users_emails.go
index 4785946..f236b42 100644
--- a/vendor/github.com/google/go-github/github/users_emails.go
+++ b/vendor/github.com/google/go-github/github/users_emails.go
@@ -14,7 +14,7 @@ type UserEmail struct {
// ListEmails lists all email addresses for the authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/users/emails/#list-email-addresses-for-a-user
+// GitHub API docs: https://developer.github.com/v3/users/emails/#list-email-addresses-for-a-user
func (s *UsersService) ListEmails(opt *ListOptions) ([]*UserEmail, *Response, error) {
u := "user/emails"
u, err := addOptions(u, opt)
@@ -38,7 +38,7 @@ func (s *UsersService) ListEmails(opt *ListOptions) ([]*UserEmail, *Response, er
// AddEmails adds email addresses of the authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/users/emails/#add-email-addresses
+// GitHub API docs: https://developer.github.com/v3/users/emails/#add-email-addresses
func (s *UsersService) AddEmails(emails []string) ([]*UserEmail, *Response, error) {
u := "user/emails"
req, err := s.client.NewRequest("POST", u, emails)
@@ -57,7 +57,7 @@ func (s *UsersService) AddEmails(emails []string) ([]*UserEmail, *Response, erro
// DeleteEmails deletes email addresses from authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/users/emails/#delete-email-addresses
+// GitHub API docs: https://developer.github.com/v3/users/emails/#delete-email-addresses
func (s *UsersService) DeleteEmails(emails []string) (*Response, error) {
u := "user/emails"
req, err := s.client.NewRequest("DELETE", u, emails)
diff --git a/vendor/github.com/google/go-github/github/users_followers.go b/vendor/github.com/google/go-github/github/users_followers.go
index 123b1c1..9e81b60 100644
--- a/vendor/github.com/google/go-github/github/users_followers.go
+++ b/vendor/github.com/google/go-github/github/users_followers.go
@@ -7,10 +7,10 @@ package github
import "fmt"
-// ListFollowers lists the followers for a user. Passing the empty string will
+// ListFollowers lists the followers for a user. Passing the empty string will
// fetch followers for the authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/users/followers/#list-followers-of-a-user
+// GitHub API docs: https://developer.github.com/v3/users/followers/#list-followers-of-a-user
func (s *UsersService) ListFollowers(user string, opt *ListOptions) ([]*User, *Response, error) {
var u string
if user != "" {
@@ -37,10 +37,10 @@ func (s *UsersService) ListFollowers(user string, opt *ListOptions) ([]*User, *R
return users, resp, nil
}
-// ListFollowing lists the people that a user is following. Passing the empty
+// ListFollowing lists the people that a user is following. Passing the empty
// string will list people the authenticated user is following.
//
-// GitHub API docs: http://developer.github.com/v3/users/followers/#list-users-followed-by-another-user
+// GitHub API docs: https://developer.github.com/v3/users/followers/#list-users-followed-by-another-user
func (s *UsersService) ListFollowing(user string, opt *ListOptions) ([]*User, *Response, error) {
var u string
if user != "" {
@@ -67,10 +67,10 @@ func (s *UsersService) ListFollowing(user string, opt *ListOptions) ([]*User, *R
return users, resp, nil
}
-// IsFollowing checks if "user" is following "target". Passing the empty
+// IsFollowing checks if "user" is following "target". Passing the empty
// string for "user" will check if the authenticated user is following "target".
//
-// GitHub API docs: http://developer.github.com/v3/users/followers/#check-if-you-are-following-a-user
+// GitHub API docs: https://developer.github.com/v3/users/followers/#check-if-you-are-following-a-user
func (s *UsersService) IsFollowing(user, target string) (bool, *Response, error) {
var u string
if user != "" {
@@ -91,7 +91,7 @@ func (s *UsersService) IsFollowing(user, target string) (bool, *Response, error)
// Follow will cause the authenticated user to follow the specified user.
//
-// GitHub API docs: http://developer.github.com/v3/users/followers/#follow-a-user
+// GitHub API docs: https://developer.github.com/v3/users/followers/#follow-a-user
func (s *UsersService) Follow(user string) (*Response, error) {
u := fmt.Sprintf("user/following/%v", user)
req, err := s.client.NewRequest("PUT", u, nil)
@@ -104,7 +104,7 @@ func (s *UsersService) Follow(user string) (*Response, error) {
// Unfollow will cause the authenticated user to unfollow the specified user.
//
-// GitHub API docs: http://developer.github.com/v3/users/followers/#unfollow-a-user
+// GitHub API docs: https://developer.github.com/v3/users/followers/#unfollow-a-user
func (s *UsersService) Unfollow(user string) (*Response, error) {
u := fmt.Sprintf("user/following/%v", user)
req, err := s.client.NewRequest("DELETE", u, nil)
diff --git a/vendor/github.com/google/go-github/github/users_gpg_keys.go b/vendor/github.com/google/go-github/github/users_gpg_keys.go
index 08cfbed..1576365 100644
--- a/vendor/github.com/google/go-github/github/users_gpg_keys.go
+++ b/vendor/github.com/google/go-github/github/users_gpg_keys.go
@@ -58,7 +58,7 @@ func (s *UsersService) ListGPGKeys() ([]*GPGKey, *Response, error) {
return nil, resp, err
}
- return keys, resp, err
+ return keys, resp, nil
}
// GetGPGKey gets extended details for a single GPG key. It requires authentication
@@ -81,7 +81,7 @@ func (s *UsersService) GetGPGKey(id int) (*GPGKey, *Response, error) {
return nil, resp, err
}
- return key, resp, err
+ return key, resp, nil
}
// CreateGPGKey creates a GPG key. It requires authenticatation via Basic Auth
@@ -106,7 +106,7 @@ func (s *UsersService) CreateGPGKey(armoredPublicKey string) (*GPGKey, *Response
return nil, resp, err
}
- return key, resp, err
+ return key, resp, nil
}
// DeleteGPGKey deletes a GPG key. It requires authentication via Basic Auth or
diff --git a/vendor/github.com/google/go-github/github/users_keys.go b/vendor/github.com/google/go-github/github/users_keys.go
index 59b1dc2..ebc333f 100644
--- a/vendor/github.com/google/go-github/github/users_keys.go
+++ b/vendor/github.com/google/go-github/github/users_keys.go
@@ -20,10 +20,10 @@ func (k Key) String() string {
return Stringify(k)
}
-// ListKeys lists the verified public keys for a user. Passing the empty
+// ListKeys lists the verified public keys for a user. Passing the empty
// string will fetch keys for the authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/users/keys/#list-public-keys-for-a-user
+// GitHub API docs: https://developer.github.com/v3/users/keys/#list-public-keys-for-a-user
func (s *UsersService) ListKeys(user string, opt *ListOptions) ([]*Key, *Response, error) {
var u string
if user != "" {
@@ -52,7 +52,7 @@ func (s *UsersService) ListKeys(user string, opt *ListOptions) ([]*Key, *Respons
// GetKey fetches a single public key.
//
-// GitHub API docs: http://developer.github.com/v3/users/keys/#get-a-single-public-key
+// GitHub API docs: https://developer.github.com/v3/users/keys/#get-a-single-public-key
func (s *UsersService) GetKey(id int) (*Key, *Response, error) {
u := fmt.Sprintf("user/keys/%v", id)
@@ -67,12 +67,12 @@ func (s *UsersService) GetKey(id int) (*Key, *Response, error) {
return nil, resp, err
}
- return key, resp, err
+ return key, resp, nil
}
// CreateKey adds a public key for the authenticated user.
//
-// GitHub API docs: http://developer.github.com/v3/users/keys/#create-a-public-key
+// GitHub API docs: https://developer.github.com/v3/users/keys/#create-a-public-key
func (s *UsersService) CreateKey(key *Key) (*Key, *Response, error) {
u := "user/keys"
@@ -87,12 +87,12 @@ func (s *UsersService) CreateKey(key *Key) (*Key, *Response, error) {
return nil, resp, err
}
- return k, resp, err
+ return k, resp, nil
}
// DeleteKey deletes a public key.
//
-// GitHub API docs: http://developer.github.com/v3/users/keys/#delete-a-public-key
+// GitHub API docs: https://developer.github.com/v3/users/keys/#delete-a-public-key
func (s *UsersService) DeleteKey(id int) (*Response, error) {
u := fmt.Sprintf("user/keys/%v", id)
diff --git a/vendor/github.com/hashicorp/vault/api/sys_audit.go b/vendor/github.com/hashicorp/vault/api/sys_audit.go
index 1ffdef8..89f2141 100644
--- a/vendor/github.com/hashicorp/vault/api/sys_audit.go
+++ b/vendor/github.com/hashicorp/vault/api/sys_audit.go
@@ -3,6 +3,7 @@ package api
import (
"fmt"
+ "github.com/fatih/structs"
"github.com/mitchellh/mapstructure"
)
@@ -71,13 +72,18 @@ func (c *Sys) ListAudit() (map[string]*Audit, error) {
return mounts, nil
}
+// DEPRECATED: Use EnableAuditWithOptions instead
func (c *Sys) EnableAudit(
path string, auditType string, desc string, opts map[string]string) error {
- body := map[string]interface{}{
- "type": auditType,
- "description": desc,
- "options": opts,
- }
+ return c.EnableAuditWithOptions(path, &EnableAuditOptions{
+ Type: auditType,
+ Description: desc,
+ Options: opts,
+ })
+}
+
+func (c *Sys) EnableAuditWithOptions(path string, options *EnableAuditOptions) error {
+ body := structs.Map(options)
r := c.c.NewRequest("PUT", fmt.Sprintf("/v1/sys/audit/%s", path))
if err := r.SetJSONBody(body); err != nil {
@@ -106,9 +112,17 @@ func (c *Sys) DisableAudit(path string) error {
// individually documented because the map almost directly to the raw HTTP API
// documentation. Please refer to that documentation for more details.
+type EnableAuditOptions struct {
+ Type string `json:"type" structs:"type"`
+ Description string `json:"description" structs:"description"`
+ Options map[string]string `json:"options" structs:"options"`
+ Local bool `json:"local" structs:"local"`
+}
+
type Audit struct {
Path string
Type string
Description string
Options map[string]string
+ Local bool
}
diff --git a/vendor/github.com/hashicorp/vault/api/sys_auth.go b/vendor/github.com/hashicorp/vault/api/sys_auth.go
index 1940e84..f9f3c8c 100644
--- a/vendor/github.com/hashicorp/vault/api/sys_auth.go
+++ b/vendor/github.com/hashicorp/vault/api/sys_auth.go
@@ -3,6 +3,7 @@ package api
import (
"fmt"
+ "github.com/fatih/structs"
"github.com/mitchellh/mapstructure"
)
@@ -42,11 +43,16 @@ func (c *Sys) ListAuth() (map[string]*AuthMount, error) {
return mounts, nil
}
+// DEPRECATED: Use EnableAuthWithOptions instead
func (c *Sys) EnableAuth(path, authType, desc string) error {
- body := map[string]string{
- "type": authType,
- "description": desc,
- }
+ return c.EnableAuthWithOptions(path, &EnableAuthOptions{
+ Type: authType,
+ Description: desc,
+ })
+}
+
+func (c *Sys) EnableAuthWithOptions(path string, options *EnableAuthOptions) error {
+ body := structs.Map(options)
r := c.c.NewRequest("POST", fmt.Sprintf("/v1/sys/auth/%s", path))
if err := r.SetJSONBody(body); err != nil {
@@ -75,10 +81,17 @@ func (c *Sys) DisableAuth(path string) error {
// individually documentd because the map almost directly to the raw HTTP API
// documentation. Please refer to that documentation for more details.
+type EnableAuthOptions struct {
+ Type string `json:"type" structs:"type"`
+ Description string `json:"description" structs:"description"`
+ Local bool `json:"local" structs:"local"`
+}
+
type AuthMount struct {
Type string `json:"type" structs:"type" mapstructure:"type"`
Description string `json:"description" structs:"description" mapstructure:"description"`
Config AuthConfigOutput `json:"config" structs:"config" mapstructure:"config"`
+ Local bool `json:"local" structs:"local" mapstructure:"local"`
}
type AuthConfigOutput struct {
diff --git a/vendor/github.com/hashicorp/vault/api/sys_mounts.go b/vendor/github.com/hashicorp/vault/api/sys_mounts.go
index ca5e427..768e09f 100644
--- a/vendor/github.com/hashicorp/vault/api/sys_mounts.go
+++ b/vendor/github.com/hashicorp/vault/api/sys_mounts.go
@@ -123,6 +123,7 @@ type MountInput struct {
Type string `json:"type" structs:"type"`
Description string `json:"description" structs:"description"`
Config MountConfigInput `json:"config" structs:"config"`
+ Local bool `json:"local" structs:"local"`
}
type MountConfigInput struct {
@@ -134,6 +135,7 @@ type MountOutput struct {
Type string `json:"type" structs:"type"`
Description string `json:"description" structs:"description"`
Config MountConfigOutput `json:"config" structs:"config"`
+ Local bool `json:"local" structs:"local"`
}
type MountConfigOutput struct {
diff --git a/vendor/github.com/mattn/go-sqlite3/sqlite3.go b/vendor/github.com/mattn/go-sqlite3/sqlite3.go
index f5699e4..cbe3964 100644
--- a/vendor/github.com/mattn/go-sqlite3/sqlite3.go
+++ b/vendor/github.com/mattn/go-sqlite3/sqlite3.go
@@ -772,7 +772,7 @@ func (s *SQLiteStmt) query(ctx context.Context, args []namedValue) (driver.Rows,
select {
case <-rows.done:
default:
- C.sqlite3_interrupt(s.c.db)
+ C.sqlite3_interrupt(db)
rows.Close()
}
case <-rows.done:
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/doc.go b/vendor/github.com/prometheus/client_golang/prometheus/doc.go
index 618c4de..f60710f 100644
--- a/vendor/github.com/prometheus/client_golang/prometheus/doc.go
+++ b/vendor/github.com/prometheus/client_golang/prometheus/doc.go
@@ -17,7 +17,7 @@
// Pushgateway (package push).
//
// All exported functions and methods are safe to be used concurrently unless
-//specified otherwise.
+// specified otherwise.
//
// A Basic Example
//
@@ -95,8 +95,8 @@
// SummaryVec, HistogramVec, and UntypedVec are not.
//
// To create instances of Metrics and their vector versions, you need a suitable
-// …Opts struct, i.e. GaugeOpts, CounterOpts, SummaryOpts,
-// HistogramOpts, or UntypedOpts.
+// …Opts struct, i.e. GaugeOpts, CounterOpts, SummaryOpts, HistogramOpts, or
+// UntypedOpts.
//
// Custom Collectors and constant Metrics
//
@@ -114,8 +114,8 @@
// Metric instances “on the fly” using NewConstMetric, NewConstHistogram, and
// NewConstSummary (and their respective Must… versions). That will happen in
// the Collect method. The Describe method has to return separate Desc
-// instances, representative of the “throw-away” metrics to be created
-// later. NewDesc comes in handy to create those Desc instances.
+// instances, representative of the “throw-away” metrics to be created later.
+// NewDesc comes in handy to create those Desc instances.
//
// The Collector example illustrates the use case. You can also look at the
// source code of the processCollector (mirroring process metrics), the
@@ -129,32 +129,32 @@
// Advanced Uses of the Registry
//
// While MustRegister is the by far most common way of registering a Collector,
-// sometimes you might want to handle the errors the registration might
-// cause. As suggested by the name, MustRegister panics if an error occurs. With
-// the Register function, the error is returned and can be handled.
+// sometimes you might want to handle the errors the registration might cause.
+// As suggested by the name, MustRegister panics if an error occurs. With the
+// Register function, the error is returned and can be handled.
//
// An error is returned if the registered Collector is incompatible or
// inconsistent with already registered metrics. The registry aims for
-// consistency of the collected metrics according to the Prometheus data
-// model. Inconsistencies are ideally detected at registration time, not at
-// collect time. The former will usually be detected at start-up time of a
-// program, while the latter will only happen at scrape time, possibly not even
-// on the first scrape if the inconsistency only becomes relevant later. That is
-// the main reason why a Collector and a Metric have to describe themselves to
-// the registry.
+// consistency of the collected metrics according to the Prometheus data model.
+// Inconsistencies are ideally detected at registration time, not at collect
+// time. The former will usually be detected at start-up time of a program,
+// while the latter will only happen at scrape time, possibly not even on the
+// first scrape if the inconsistency only becomes relevant later. That is the
+// main reason why a Collector and a Metric have to describe themselves to the
+// registry.
//
// So far, everything we did operated on the so-called default registry, as it
// can be found in the global DefaultRegistry variable. With NewRegistry, you
// can create a custom registry, or you can even implement the Registerer or
-// Gatherer interfaces yourself. The methods Register and Unregister work in
-// the same way on a custom registry as the global functions Register and
-// Unregister on the default registry.
+// Gatherer interfaces yourself. The methods Register and Unregister work in the
+// same way on a custom registry as the global functions Register and Unregister
+// on the default registry.
//
-// There are a number of uses for custom registries: You can use registries
-// with special properties, see NewPedanticRegistry. You can avoid global state,
-// as it is imposed by the DefaultRegistry. You can use multiple registries at
-// the same time to expose different metrics in different ways. You can use
-// separate registries for testing purposes.
+// There are a number of uses for custom registries: You can use registries with
+// special properties, see NewPedanticRegistry. You can avoid global state, as
+// it is imposed by the DefaultRegistry. You can use multiple registries at the
+// same time to expose different metrics in different ways. You can use separate
+// registries for testing purposes.
//
// Also note that the DefaultRegistry comes registered with a Collector for Go
// runtime metrics (via NewGoCollector) and a Collector for process metrics (via
@@ -166,16 +166,20 @@
// The Registry implements the Gatherer interface. The caller of the Gather
// method can then expose the gathered metrics in some way. Usually, the metrics
// are served via HTTP on the /metrics endpoint. That's happening in the example
-// above. The tools to expose metrics via HTTP are in the promhttp
-// sub-package. (The top-level functions in the prometheus package are
-// deprecated.)
+// above. The tools to expose metrics via HTTP are in the promhttp sub-package.
+// (The top-level functions in the prometheus package are deprecated.)
//
// Pushing to the Pushgateway
//
// Function for pushing to the Pushgateway can be found in the push sub-package.
//
+// Graphite Bridge
+//
+// Functions and examples to push metrics from a Gatherer to Graphite can be
+// found in the graphite sub-package.
+//
// Other Means of Exposition
//
-// More ways of exposing metrics can easily be added. Sending metrics to
-// Graphite would be an example that will soon be implemented.
+// More ways of exposing metrics can easily be added by following the approaches
+// of the existing implementations.
package prometheus
diff --git a/vendor/github.com/prometheus/client_golang/prometheus/go_collector.go b/vendor/github.com/prometheus/client_golang/prometheus/go_collector.go
index 6dea674..1ae9b8f 100644
--- a/vendor/github.com/prometheus/client_golang/prometheus/go_collector.go
+++ b/vendor/github.com/prometheus/client_golang/prometheus/go_collector.go
@@ -8,8 +8,9 @@ import (
)
type goCollector struct {
- goroutines Gauge
- gcDesc *Desc
+ goroutinesDesc *Desc
+ threadsDesc *Desc
+ gcDesc *Desc
// metrics to describe and collect
metrics memStatsMetrics
@@ -19,11 +20,14 @@ type goCollector struct {
// go process.
func NewGoCollector() Collector {
return &goCollector{
- goroutines: NewGauge(GaugeOpts{
- Namespace: "go",
- Name: "goroutines",
- Help: "Number of goroutines that currently exist.",
- }),
+ goroutinesDesc: NewDesc(
+ "go_goroutines",
+ "Number of goroutines that currently exist.",
+ nil, nil),
+ threadsDesc: NewDesc(
+ "go_threads",
+ "Number of OS threads created",
+ nil, nil),
gcDesc: NewDesc(
"go_gc_duration_seconds",
"A summary of the GC invocation durations.",
@@ -224,9 +228,9 @@ func memstatNamespace(s string) string {
// Describe returns all descriptions of the collector.
func (c *goCollector) Describe(ch chan<- *Desc) {
- ch <- c.goroutines.Desc()
+ ch <- c.goroutinesDesc
+ ch <- c.threadsDesc
ch <- c.gcDesc
-
for _, i := range c.metrics {
ch <- i.desc
}
@@ -234,8 +238,9 @@ func (c *goCollector) Describe(ch chan<- *Desc) {
// Collect returns the current state of all metrics of the collector.
func (c *goCollector) Collect(ch chan<- Metric) {
- c.goroutines.Set(float64(runtime.NumGoroutine()))
- ch <- c.goroutines
+ ch <- MustNewConstMetric(c.goroutinesDesc, GaugeValue, float64(runtime.NumGoroutine()))
+ n, _ := runtime.ThreadCreateProfile(nil)
+ ch <- MustNewConstMetric(c.threadsDesc, GaugeValue, float64(n))
var stats debug.GCStats
stats.PauseQuantiles = make([]time.Duration, 5)
diff --git a/vendor/github.com/prometheus/common/model/value.go b/vendor/github.com/prometheus/common/model/value.go
index 7728aba..c9ed3ff 100644
--- a/vendor/github.com/prometheus/common/model/value.go
+++ b/vendor/github.com/prometheus/common/model/value.go
@@ -129,11 +129,8 @@ func (s *Sample) Equal(o *Sample) bool {
if !s.Timestamp.Equal(o.Timestamp) {
return false
}
- if s.Value.Equal(o.Value) {
- return false
- }
- return true
+ return s.Value.Equal(o.Value)
}
func (s Sample) String() string {
diff --git a/vendor/github.com/prometheus/procfs/AUTHORS.md b/vendor/github.com/prometheus/procfs/AUTHORS.md
deleted file mode 100644
index d558635..0000000
--- a/vendor/github.com/prometheus/procfs/AUTHORS.md
+++ /dev/null
@@ -1,21 +0,0 @@
-The Prometheus project was started by Matt T. Proud (emeritus) and
-Julius Volz in 2012.
-
-Maintainers of this repository:
-
-* Tobias Schmidt <ts@soundcloud.com>
-
-The following individuals have contributed code to this repository
-(listed in alphabetical order):
-
-* Armen Baghumian <abaghumian@noggin.com.au>
-* Bjoern Rabenstein <beorn@soundcloud.com>
-* David Cournapeau <cournape@gmail.com>
-* Ji-Hoon, Seol <jihoon.seol@gmail.com>
-* Jonas Große Sundrup <cherti@letopolis.de>
-* Julius Volz <julius.volz@gmail.com>
-* Matt Layher <mdlayher@gmail.com>
-* Matthias Rampke <mr@soundcloud.com>
-* Nicky Gerritsen <nicky@streamone.nl>
-* Rémi Audebert <contact@halfr.net>
-* Tobias Schmidt <tobidt@gmail.com>
diff --git a/vendor/github.com/prometheus/procfs/CONTRIBUTING.md b/vendor/github.com/prometheus/procfs/CONTRIBUTING.md
index 5705f0f..40503ed 100644
--- a/vendor/github.com/prometheus/procfs/CONTRIBUTING.md
+++ b/vendor/github.com/prometheus/procfs/CONTRIBUTING.md
@@ -2,9 +2,9 @@
Prometheus uses GitHub to manage reviews of pull requests.
-* If you have a trivial fix or improvement, go ahead and create a pull
- request, addressing (with `@...`) one or more of the maintainers
- (see [AUTHORS.md](AUTHORS.md)) in the description of the pull request.
+* If you have a trivial fix or improvement, go ahead and create a pull request,
+ addressing (with `@...`) the maintainer of this repository (see
+ [MAINTAINERS.md](MAINTAINERS.md)) in the description of the pull request.
* If you plan to do something more involved, first discuss your ideas
on our [mailing list](https://groups.google.com/forum/?fromgroups#!forum/prometheus-developers).
diff --git a/vendor/github.com/prometheus/procfs/MAINTAINERS.md b/vendor/github.com/prometheus/procfs/MAINTAINERS.md
new file mode 100644
index 0000000..35993c4
--- /dev/null
+++ b/vendor/github.com/prometheus/procfs/MAINTAINERS.md
@@ -0,0 +1 @@
+* Tobias Schmidt <tobidt@gmail.com>
diff --git a/vendor/github.com/prometheus/procfs/README.md b/vendor/github.com/prometheus/procfs/README.md
index 6e7ee6b..2095494 100644
--- a/vendor/github.com/prometheus/procfs/README.md
+++ b/vendor/github.com/prometheus/procfs/README.md
@@ -8,3 +8,4 @@ backwards-incompatible ways without warnings. Use it at your own risk.
[![GoDoc](https://godoc.org/github.com/prometheus/procfs?status.png)](https://godoc.org/github.com/prometheus/procfs)
[![Build Status](https://travis-ci.org/prometheus/procfs.svg?branch=master)](https://travis-ci.org/prometheus/procfs)
+[![Go Report Card](https://goreportcard.com/badge/github.com/prometheus/procfs)](https://goreportcard.com/report/github.com/prometheus/procfs)
diff --git a/vendor/github.com/prometheus/procfs/buddyinfo.go b/vendor/github.com/prometheus/procfs/buddyinfo.go
new file mode 100644
index 0000000..680a984
--- /dev/null
+++ b/vendor/github.com/prometheus/procfs/buddyinfo.go
@@ -0,0 +1,95 @@
+// Copyright 2017 The Prometheus Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package procfs
+
+import (
+ "bufio"
+ "fmt"
+ "io"
+ "os"
+ "strconv"
+ "strings"
+)
+
+// A BuddyInfo is the details parsed from /proc/buddyinfo.
+// The data is comprised of an array of free fragments of each size.
+// The sizes are 2^n*PAGE_SIZE, where n is the array index.
+type BuddyInfo struct {
+ Node string
+ Zone string
+ Sizes []float64
+}
+
+// NewBuddyInfo reads the buddyinfo statistics.
+func NewBuddyInfo() ([]BuddyInfo, error) {
+ fs, err := NewFS(DefaultMountPoint)
+ if err != nil {
+ return nil, err
+ }
+
+ return fs.NewBuddyInfo()
+}
+
+// NewBuddyInfo reads the buddyinfo statistics from the specified `proc` filesystem.
+func (fs FS) NewBuddyInfo() ([]BuddyInfo, error) {
+ file, err := os.Open(fs.Path("buddyinfo"))
+ if err != nil {
+ return nil, err
+ }
+ defer file.Close()
+
+ return parseBuddyInfo(file)
+}
+
+func parseBuddyInfo(r io.Reader) ([]BuddyInfo, error) {
+ var (
+ buddyInfo = []BuddyInfo{}
+ scanner = bufio.NewScanner(r)
+ bucketCount = -1
+ )
+
+ for scanner.Scan() {
+ var err error
+ line := scanner.Text()
+ parts := strings.Fields(string(line))
+
+ if len(parts) < 4 {
+ return nil, fmt.Errorf("invalid number of fields when parsing buddyinfo")
+ }
+
+ node := strings.TrimRight(parts[1], ",")
+ zone := strings.TrimRight(parts[3], ",")
+ arraySize := len(parts[4:])
+
+ if bucketCount == -1 {
+ bucketCount = arraySize
+ } else {
+ if bucketCount != arraySize {
+ return nil, fmt.Errorf("mismatch in number of buddyinfo buckets, previous count %d, new count %d", bucketCount, arraySize)
+ }
+ }
+
+ sizes := make([]float64, arraySize)
+ for i := 0; i < arraySize; i++ {
+ sizes[i], err = strconv.ParseFloat(parts[i+4], 64)
+ if err != nil {
+ return nil, fmt.Errorf("invalid value in buddyinfo: %s", err)
+ }
+ }
+
+ buddyInfo = append(buddyInfo, BuddyInfo{node, zone, sizes})
+ }
+
+ return buddyInfo, scanner.Err()
+}
diff --git a/vendor/github.com/prometheus/procfs/fs.go b/vendor/github.com/prometheus/procfs/fs.go
index 49aaab0..1754675 100644
--- a/vendor/github.com/prometheus/procfs/fs.go
+++ b/vendor/github.com/prometheus/procfs/fs.go
@@ -4,6 +4,8 @@ import (
"fmt"
"os"
"path"
+
+ "github.com/prometheus/procfs/xfs"
)
// FS represents the pseudo-filesystem proc, which provides an interface to
@@ -31,3 +33,14 @@ func NewFS(mountPoint string) (FS, error) {
func (fs FS) Path(p ...string) string {
return path.Join(append([]string{string(fs)}, p...)...)
}
+
+// XFSStats retrieves XFS filesystem runtime statistics.
+func (fs FS) XFSStats() (*xfs.Stats, error) {
+ f, err := os.Open(fs.Path("fs/xfs/stat"))
+ if err != nil {
+ return nil, err
+ }
+ defer f.Close()
+
+ return xfs.ParseStats(f)
+}
diff --git a/vendor/github.com/prometheus/procfs/mountstats.go b/vendor/github.com/prometheus/procfs/mountstats.go
index 47ab0a7..fe8f1f6 100644
--- a/vendor/github.com/prometheus/procfs/mountstats.go
+++ b/vendor/github.com/prometheus/procfs/mountstats.go
@@ -123,7 +123,7 @@ type NFSEventsStats struct {
VFSFlush uint64
// Number of times fsync() has been called on directories and files.
VFSFsync uint64
- // Number of times locking has been attemped on a file.
+ // Number of times locking has been attempted on a file.
VFSLock uint64
// Number of times files have been closed and released.
VFSFileRelease uint64
@@ -356,7 +356,7 @@ func parseMountStatsNFS(s *bufio.Scanner, statVersion string) (*MountStatsNFS, e
}
// When encountering "per-operation statistics", we must break this
- // loop and parse them seperately to ensure we can terminate parsing
+ // loop and parse them separately to ensure we can terminate parsing
// before reaching another device entry; hence why this 'if' statement
// is not just another switch case
if ss[0] == fieldPerOpStats {
diff --git a/vendor/github.com/prometheus/procfs/xfs/parse.go b/vendor/github.com/prometheus/procfs/xfs/parse.go
new file mode 100644
index 0000000..d1285fa
--- /dev/null
+++ b/vendor/github.com/prometheus/procfs/xfs/parse.go
@@ -0,0 +1,361 @@
+// Copyright 2017 The Prometheus Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package xfs
+
+import (
+ "bufio"
+ "fmt"
+ "io"
+ "log"
+ "strconv"
+ "strings"
+)
+
+// ParseStats parses a Stats from an input io.Reader, using the format
+// found in /proc/fs/xfs/stat.
+func ParseStats(r io.Reader) (*Stats, error) {
+ const (
+ // Fields parsed into stats structures.
+ fieldExtentAlloc = "extent_alloc"
+ fieldAbt = "abt"
+ fieldBlkMap = "blk_map"
+ fieldBmbt = "bmbt"
+ fieldDir = "dir"
+ fieldTrans = "trans"
+ fieldIg = "ig"
+ fieldLog = "log"
+ fieldRw = "rw"
+ fieldAttr = "attr"
+ fieldIcluster = "icluster"
+ fieldVnodes = "vnodes"
+ fieldBuf = "buf"
+ fieldXpc = "xpc"
+
+ // Unimplemented at this time due to lack of documentation.
+ fieldPushAil = "push_ail"
+ fieldXstrat = "xstrat"
+ fieldAbtb2 = "abtb2"
+ fieldAbtc2 = "abtc2"
+ fieldBmbt2 = "bmbt2"
+ fieldIbt2 = "ibt2"
+ fieldFibt2 = "fibt2"
+ fieldQm = "qm"
+ fieldDebug = "debug"
+ )
+
+ var xfss Stats
+
+ s := bufio.NewScanner(r)
+ for s.Scan() {
+ // Expect at least a string label and a single integer value, ex:
+ // - abt 0
+ // - rw 1 2
+ ss := strings.Fields(string(s.Bytes()))
+ if len(ss) < 2 {
+ continue
+ }
+ label := ss[0]
+
+ // Extended precision counters are uint64 values.
+ if label == fieldXpc {
+ us, err := parseUint64s(ss[1:])
+ if err != nil {
+ return nil, err
+ }
+
+ xfss.ExtendedPrecision, err = extendedPrecisionStats(us)
+ if err != nil {
+ return nil, err
+ }
+
+ continue
+ }
+
+ // All other counters are uint32 values.
+ us, err := parseUint32s(ss[1:])
+ if err != nil {
+ return nil, err
+ }
+
+ switch label {
+ case fieldExtentAlloc:
+ xfss.ExtentAllocation, err = extentAllocationStats(us)
+ case fieldAbt:
+ xfss.AllocationBTree, err = btreeStats(us)
+ case fieldBlkMap:
+ xfss.BlockMapping, err = blockMappingStats(us)
+ case fieldBmbt:
+ xfss.BlockMapBTree, err = btreeStats(us)
+ case fieldDir:
+ xfss.DirectoryOperation, err = directoryOperationStats(us)
+ case fieldTrans:
+ xfss.Transaction, err = transactionStats(us)
+ case fieldIg:
+ xfss.InodeOperation, err = inodeOperationStats(us)
+ case fieldLog:
+ xfss.LogOperation, err = logOperationStats(us)
+ case fieldRw:
+ xfss.ReadWrite, err = readWriteStats(us)
+ case fieldAttr:
+ xfss.AttributeOperation, err = attributeOperationStats(us)
+ case fieldIcluster:
+ xfss.InodeClustering, err = inodeClusteringStats(us)
+ case fieldVnodes:
+ xfss.Vnode, err = vnodeStats(us)
+ case fieldBuf:
+ xfss.Buffer, err = bufferStats(us)
+ }
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ return &xfss, s.Err()
+}
+
+// extentAllocationStats builds an ExtentAllocationStats from a slice of uint32s.
+func extentAllocationStats(us []uint32) (ExtentAllocationStats, error) {
+ if l := len(us); l != 4 {
+ return ExtentAllocationStats{}, fmt.Errorf("incorrect number of values for XFS extent allocation stats: %d", l)
+ }
+
+ return ExtentAllocationStats{
+ ExtentsAllocated: us[0],
+ BlocksAllocated: us[1],
+ ExtentsFreed: us[2],
+ BlocksFreed: us[3],
+ }, nil
+}
+
+// btreeStats builds a BTreeStats from a slice of uint32s.
+func btreeStats(us []uint32) (BTreeStats, error) {
+ if l := len(us); l != 4 {
+ return BTreeStats{}, fmt.Errorf("incorrect number of values for XFS btree stats: %d", l)
+ }
+
+ return BTreeStats{
+ Lookups: us[0],
+ Compares: us[1],
+ RecordsInserted: us[2],
+ RecordsDeleted: us[3],
+ }, nil
+}
+
+// BlockMappingStat builds a BlockMappingStats from a slice of uint32s.
+func blockMappingStats(us []uint32) (BlockMappingStats, error) {
+ if l := len(us); l != 7 {
+ return BlockMappingStats{}, fmt.Errorf("incorrect number of values for XFS block mapping stats: %d", l)
+ }
+
+ return BlockMappingStats{
+ Reads: us[0],
+ Writes: us[1],
+ Unmaps: us[2],
+ ExtentListInsertions: us[3],
+ ExtentListDeletions: us[4],
+ ExtentListLookups: us[5],
+ ExtentListCompares: us[6],
+ }, nil
+}
+
+// DirectoryOperationStats builds a DirectoryOperationStats from a slice of uint32s.
+func directoryOperationStats(us []uint32) (DirectoryOperationStats, error) {
+ if l := len(us); l != 4 {
+ return DirectoryOperationStats{}, fmt.Errorf("incorrect number of values for XFS directory operation stats: %d", l)
+ }
+
+ return DirectoryOperationStats{
+ Lookups: us[0],
+ Creates: us[1],
+ Removes: us[2],
+ Getdents: us[3],
+ }, nil
+}
+
+// TransactionStats builds a TransactionStats from a slice of uint32s.
+func transactionStats(us []uint32) (TransactionStats, error) {
+ if l := len(us); l != 3 {
+ return TransactionStats{}, fmt.Errorf("incorrect number of values for XFS transaction stats: %d", l)
+ }
+
+ return TransactionStats{
+ Sync: us[0],
+ Async: us[1],
+ Empty: us[2],
+ }, nil
+}
+
+// InodeOperationStats builds an InodeOperationStats from a slice of uint32s.
+func inodeOperationStats(us []uint32) (InodeOperationStats, error) {
+ if l := len(us); l != 7 {
+ return InodeOperationStats{}, fmt.Errorf("incorrect number of values for XFS inode operation stats: %d", l)
+ }
+
+ return InodeOperationStats{
+ Attempts: us[0],
+ Found: us[1],
+ Recycle: us[2],
+ Missed: us[3],
+ Duplicate: us[4],
+ Reclaims: us[5],
+ AttributeChange: us[6],
+ }, nil
+}
+
+// LogOperationStats builds a LogOperationStats from a slice of uint32s.
+func logOperationStats(us []uint32) (LogOperationStats, error) {
+ if l := len(us); l != 5 {
+ return LogOperationStats{}, fmt.Errorf("incorrect number of values for XFS log operation stats: %d", l)
+ }
+
+ return LogOperationStats{
+ Writes: us[0],
+ Blocks: us[1],
+ NoInternalBuffers: us[2],
+ Force: us[3],
+ ForceSleep: us[4],
+ }, nil
+}
+
+// ReadWriteStats builds a ReadWriteStats from a slice of uint32s.
+func readWriteStats(us []uint32) (ReadWriteStats, error) {
+ if l := len(us); l != 2 {
+ return ReadWriteStats{}, fmt.Errorf("incorrect number of values for XFS read write stats: %d", l)
+ }
+
+ return ReadWriteStats{
+ Read: us[0],
+ Write: us[1],
+ }, nil
+}
+
+// AttributeOperationStats builds an AttributeOperationStats from a slice of uint32s.
+func attributeOperationStats(us []uint32) (AttributeOperationStats, error) {
+ if l := len(us); l != 4 {
+ return AttributeOperationStats{}, fmt.Errorf("incorrect number of values for XFS attribute operation stats: %d", l)
+ }
+
+ return AttributeOperationStats{
+ Get: us[0],
+ Set: us[1],
+ Remove: us[2],
+ List: us[3],
+ }, nil
+}
+
+// InodeClusteringStats builds an InodeClusteringStats from a slice of uint32s.
+func inodeClusteringStats(us []uint32) (InodeClusteringStats, error) {
+ if l := len(us); l != 3 {
+ return InodeClusteringStats{}, fmt.Errorf("incorrect number of values for XFS inode clustering stats: %d", l)
+ }
+
+ return InodeClusteringStats{
+ Iflush: us[0],
+ Flush: us[1],
+ FlushInode: us[2],
+ }, nil
+}
+
+// VnodeStats builds a VnodeStats from a slice of uint32s.
+func vnodeStats(us []uint32) (VnodeStats, error) {
+ // The attribute "Free" appears to not be available on older XFS
+ // stats versions. Therefore, 7 or 8 elements may appear in
+ // this slice.
+ l := len(us)
+ log.Println(l)
+ if l != 7 && l != 8 {
+ return VnodeStats{}, fmt.Errorf("incorrect number of values for XFS vnode stats: %d", l)
+ }
+
+ s := VnodeStats{
+ Active: us[0],
+ Allocate: us[1],
+ Get: us[2],
+ Hold: us[3],
+ Release: us[4],
+ Reclaim: us[5],
+ Remove: us[6],
+ }
+
+ // Skip adding free, unless it is present. The zero value will
+ // be used in place of an actual count.
+ if l == 7 {
+ return s, nil
+ }
+
+ s.Free = us[7]
+ return s, nil
+}
+
+// BufferStats builds a BufferStats from a slice of uint32s.
+func bufferStats(us []uint32) (BufferStats, error) {
+ if l := len(us); l != 9 {
+ return BufferStats{}, fmt.Errorf("incorrect number of values for XFS buffer stats: %d", l)
+ }
+
+ return BufferStats{
+ Get: us[0],
+ Create: us[1],
+ GetLocked: us[2],
+ GetLockedWaited: us[3],
+ BusyLocked: us[4],
+ MissLocked: us[5],
+ PageRetries: us[6],
+ PageFound: us[7],
+ GetRead: us[8],
+ }, nil
+}
+
+// ExtendedPrecisionStats builds an ExtendedPrecisionStats from a slice of uint32s.
+func extendedPrecisionStats(us []uint64) (ExtendedPrecisionStats, error) {
+ if l := len(us); l != 3 {
+ return ExtendedPrecisionStats{}, fmt.Errorf("incorrect number of values for XFS extended precision stats: %d", l)
+ }
+
+ return ExtendedPrecisionStats{
+ FlushBytes: us[0],
+ WriteBytes: us[1],
+ ReadBytes: us[2],
+ }, nil
+}
+
+// parseUint32s parses a slice of strings into a slice of uint32s.
+func parseUint32s(ss []string) ([]uint32, error) {
+ us := make([]uint32, 0, len(ss))
+ for _, s := range ss {
+ u, err := strconv.ParseUint(s, 10, 32)
+ if err != nil {
+ return nil, err
+ }
+
+ us = append(us, uint32(u))
+ }
+
+ return us, nil
+}
+
+// parseUint64s parses a slice of strings into a slice of uint64s.
+func parseUint64s(ss []string) ([]uint64, error) {
+ us := make([]uint64, 0, len(ss))
+ for _, s := range ss {
+ u, err := strconv.ParseUint(s, 10, 64)
+ if err != nil {
+ return nil, err
+ }
+
+ us = append(us, u)
+ }
+
+ return us, nil
+}
diff --git a/vendor/github.com/prometheus/procfs/xfs/xfs.go b/vendor/github.com/prometheus/procfs/xfs/xfs.go
new file mode 100644
index 0000000..ed77d90
--- /dev/null
+++ b/vendor/github.com/prometheus/procfs/xfs/xfs.go
@@ -0,0 +1,158 @@
+// Copyright 2017 The Prometheus Authors
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Package xfs provides access to statistics exposed by the XFS filesystem.
+package xfs
+
+// Stats contains XFS filesystem runtime statistics, parsed from
+// /proc/fs/xfs/stat.
+//
+// The names and meanings of each statistic were taken from
+// http://xfs.org/index.php/Runtime_Stats and xfs_stats.h in the Linux
+// kernel source. Most counters are uint32s (same data types used in
+// xfs_stats.h), but some of the "extended precision stats" are uint64s.
+type Stats struct {
+ ExtentAllocation ExtentAllocationStats
+ AllocationBTree BTreeStats
+ BlockMapping BlockMappingStats
+ BlockMapBTree BTreeStats
+ DirectoryOperation DirectoryOperationStats
+ Transaction TransactionStats
+ InodeOperation InodeOperationStats
+ LogOperation LogOperationStats
+ ReadWrite ReadWriteStats
+ AttributeOperation AttributeOperationStats
+ InodeClustering InodeClusteringStats
+ Vnode VnodeStats
+ Buffer BufferStats
+ ExtendedPrecision ExtendedPrecisionStats
+}
+
+// ExtentAllocationStats contains statistics regarding XFS extent allocations.
+type ExtentAllocationStats struct {
+ ExtentsAllocated uint32
+ BlocksAllocated uint32
+ ExtentsFreed uint32
+ BlocksFreed uint32
+}
+
+// BTreeStats contains statistics regarding an XFS internal B-tree.
+type BTreeStats struct {
+ Lookups uint32
+ Compares uint32
+ RecordsInserted uint32
+ RecordsDeleted uint32
+}
+
+// BlockMappingStats contains statistics regarding XFS block maps.
+type BlockMappingStats struct {
+ Reads uint32
+ Writes uint32
+ Unmaps uint32
+ ExtentListInsertions uint32
+ ExtentListDeletions uint32
+ ExtentListLookups uint32
+ ExtentListCompares uint32
+}
+
+// DirectoryOperationStats contains statistics regarding XFS directory entries.
+type DirectoryOperationStats struct {
+ Lookups uint32
+ Creates uint32
+ Removes uint32
+ Getdents uint32
+}
+
+// TransactionStats contains statistics regarding XFS metadata transactions.
+type TransactionStats struct {
+ Sync uint32
+ Async uint32
+ Empty uint32
+}
+
+// InodeOperationStats contains statistics regarding XFS inode operations.
+type InodeOperationStats struct {
+ Attempts uint32
+ Found uint32
+ Recycle uint32
+ Missed uint32
+ Duplicate uint32
+ Reclaims uint32
+ AttributeChange uint32
+}
+
+// LogOperationStats contains statistics regarding the XFS log buffer.
+type LogOperationStats struct {
+ Writes uint32
+ Blocks uint32
+ NoInternalBuffers uint32
+ Force uint32
+ ForceSleep uint32
+}
+
+// ReadWriteStats contains statistics regarding the number of read and write
+// system calls for XFS filesystems.
+type ReadWriteStats struct {
+ Read uint32
+ Write uint32
+}
+
+// AttributeOperationStats contains statistics regarding manipulation of
+// XFS extended file attributes.
+type AttributeOperationStats struct {
+ Get uint32
+ Set uint32
+ Remove uint32
+ List uint32
+}
+
+// InodeClusteringStats contains statistics regarding XFS inode clustering
+// operations.
+type InodeClusteringStats struct {
+ Iflush uint32
+ Flush uint32
+ FlushInode uint32
+}
+
+// VnodeStats contains statistics regarding XFS vnode operations.
+type VnodeStats struct {
+ Active uint32
+ Allocate uint32
+ Get uint32
+ Hold uint32
+ Release uint32
+ Reclaim uint32
+ Remove uint32
+ Free uint32
+}
+
+// BufferStats contains statistics regarding XFS read/write I/O buffers.
+type BufferStats struct {
+ Get uint32
+ Create uint32
+ GetLocked uint32
+ GetLockedWaited uint32
+ BusyLocked uint32
+ MissLocked uint32
+ PageRetries uint32
+ PageFound uint32
+ GetRead uint32
+}
+
+// ExtendedPrecisionStats contains high precision counters used to track the
+// total number of bytes read, written, or flushed, during XFS operations.
+type ExtendedPrecisionStats struct {
+ FlushBytes uint64
+ WriteBytes uint64
+ ReadBytes uint64
+}
diff --git a/vendor/github.com/spf13/viper/viper.go b/vendor/github.com/spf13/viper/viper.go
index 2603c78..fce13b1 100644
--- a/vendor/github.com/spf13/viper/viper.go
+++ b/vendor/github.com/spf13/viper/viper.go
@@ -1093,9 +1093,15 @@ func (v *Viper) ReadInConfig() error {
return err
}
- v.config = make(map[string]interface{})
+ config := make(map[string]interface{})
+
+ err = v.unmarshalReader(bytes.NewReader(file), config)
+ if err != nil {
+ return err
+ }
- return v.unmarshalReader(bytes.NewReader(file), v.config)
+ v.config = config
+ return nil
}
// MergeInConfig merges a new configuration with an existing config.
diff --git a/vendor/github.com/xanzy/go-gitlab/CHANGELOG.md b/vendor/github.com/xanzy/go-gitlab/CHANGELOG.md
index 8958062..09cb6db 100644
--- a/vendor/github.com/xanzy/go-gitlab/CHANGELOG.md
+++ b/vendor/github.com/xanzy/go-gitlab/CHANGELOG.md
@@ -1,6 +1,14 @@
go-github CHANGELOG
===================
+0.4.0
+-----
+- Add support to use [`sudo`](https://docs.gitlab.com/ce/api/README.html#sudo) for all API calls.
+- Add support for the Notification Settings API.
+- Add support for the Time Tracking API.
+- Make sure that the error response correctly outputs any returned errors.
+- And a reasonable number of smaller enhanchements and bugfixes.
+
0.3.0
-----
- Moved the tags related API calls to their own service, following the Gitlab API structure.
diff --git a/vendor/github.com/xanzy/go-gitlab/branches.go b/vendor/github.com/xanzy/go-gitlab/branches.go
index b8fa45d..adb4c73 100644
--- a/vendor/github.com/xanzy/go-gitlab/branches.go
+++ b/vendor/github.com/xanzy/go-gitlab/branches.go
@@ -47,14 +47,14 @@ func (b Branch) String() string {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/branches.html#list-repository-branches
-func (s *BranchesService) ListBranches(pid interface{}) ([]*Branch, *Response, error) {
+func (s *BranchesService) ListBranches(pid interface{}, options ...OptionFunc) ([]*Branch, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/repository/branches", url.QueryEscape(project))
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -72,14 +72,14 @@ func (s *BranchesService) ListBranches(pid interface{}) ([]*Branch, *Response, e
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/branches.html#get-single-repository-branch
-func (s *BranchesService) GetBranch(pid interface{}, branch string) (*Branch, *Response, error) {
+func (s *BranchesService) GetBranch(pid interface{}, branch string, options ...OptionFunc) (*Branch, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/repository/branches/%s", url.QueryEscape(project), branch)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -99,14 +99,14 @@ func (s *BranchesService) GetBranch(pid interface{}, branch string) (*Branch, *R
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/branches.html#protect-repository-branch
-func (s *BranchesService) ProtectBranch(pid interface{}, branch string) (*Branch, *Response, error) {
+func (s *BranchesService) ProtectBranch(pid interface{}, branch string, options ...OptionFunc) (*Branch, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/repository/branches/%s/protect", url.QueryEscape(project), branch)
- req, err := s.client.NewRequest("PUT", u, nil)
+ req, err := s.client.NewRequest("PUT", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -126,16 +126,14 @@ func (s *BranchesService) ProtectBranch(pid interface{}, branch string) (*Branch
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/branches.html#unprotect-repository-branch
-func (s *BranchesService) UnprotectBranch(
- pid interface{},
- branch string) (*Branch, *Response, error) {
+func (s *BranchesService) UnprotectBranch(pid interface{}, branch string, options ...OptionFunc) (*Branch, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/repository/branches/%s/unprotect", url.QueryEscape(project), branch)
- req, err := s.client.NewRequest("PUT", u, nil)
+ req, err := s.client.NewRequest("PUT", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -162,16 +160,14 @@ type CreateBranchOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/branches.html#create-repository-branch
-func (s *BranchesService) CreateBranch(
- pid interface{},
- opt *CreateBranchOptions) (*Branch, *Response, error) {
+func (s *BranchesService) CreateBranch(pid interface{}, opt *CreateBranchOptions, options ...OptionFunc) (*Branch, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/repository/branches", url.QueryEscape(project))
- req, err := s.client.NewRequest("POST", u, opt)
+ req, err := s.client.NewRequest("POST", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -189,14 +185,14 @@ func (s *BranchesService) CreateBranch(
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/branches.html#delete-repository-branch
-func (s *BranchesService) DeleteBranch(pid interface{}, branch string) (*Response, error) {
+func (s *BranchesService) DeleteBranch(pid interface{}, branch string, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, err
}
u := fmt.Sprintf("projects/%s/repository/branches/%s", url.QueryEscape(project), branch)
- req, err := s.client.NewRequest("DELETE", u, nil)
+ req, err := s.client.NewRequest("DELETE", u, nil, options)
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/xanzy/go-gitlab/build_variables.go b/vendor/github.com/xanzy/go-gitlab/build_variables.go
index 5234a01..a1bdf7f 100644
--- a/vendor/github.com/xanzy/go-gitlab/build_variables.go
+++ b/vendor/github.com/xanzy/go-gitlab/build_variables.go
@@ -29,14 +29,14 @@ func (v BuildVariable) String() string {
//
// Gitlab API Docs:
// https://docs.gitlab.com/ce/api/build_variables.html#list-project-variables
-func (s *BuildVariablesService) ListBuildVariables(pid interface{}) ([]*BuildVariable, *Response, error) {
+func (s *BuildVariablesService) ListBuildVariables(pid interface{}, options ...OptionFunc) ([]*BuildVariable, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/variables", url.QueryEscape(project))
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -54,14 +54,14 @@ func (s *BuildVariablesService) ListBuildVariables(pid interface{}) ([]*BuildVar
//
// Gitlab API Docs:
// https://docs.gitlab.com/ce/api/build_variables.html#show-variable-details
-func (s *BuildVariablesService) GetBuildVariable(pid interface{}, key string) (*BuildVariable, *Response, error) {
+func (s *BuildVariablesService) GetBuildVariable(pid interface{}, key string, options ...OptionFunc) (*BuildVariable, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/variables/%s", url.QueryEscape(project), key)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -79,14 +79,14 @@ func (s *BuildVariablesService) GetBuildVariable(pid interface{}, key string) (*
//
// Gitlab API Docs:
// https://docs.gitlab.com/ce/api/build_variables.html#create-variable
-func (s *BuildVariablesService) CreateBuildVariable(pid interface{}, key, value string) (*BuildVariable, *Response, error) {
+func (s *BuildVariablesService) CreateBuildVariable(pid interface{}, key, value string, options ...OptionFunc) (*BuildVariable, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/variables", url.QueryEscape(project))
- req, err := s.client.NewRequest("POST", u, BuildVariable{key, value})
+ req, err := s.client.NewRequest("POST", u, BuildVariable{key, value}, options)
if err != nil {
return nil, nil, err
}
@@ -105,14 +105,14 @@ func (s *BuildVariablesService) CreateBuildVariable(pid interface{}, key, value
//
// Gitlab API Docs:
// https://docs.gitlab.com/ce/api/build_variables.html#update-variable
-func (s *BuildVariablesService) UpdateBuildVariable(pid interface{}, key, value string) (*BuildVariable, *Response, error) {
+func (s *BuildVariablesService) UpdateBuildVariable(pid interface{}, key, value string, options ...OptionFunc) (*BuildVariable, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/variables/%s", url.QueryEscape(project), key)
- req, err := s.client.NewRequest("PUT", u, BuildVariable{key, value})
+ req, err := s.client.NewRequest("PUT", u, BuildVariable{key, value}, options)
if err != nil {
return nil, nil, err
}
@@ -130,14 +130,14 @@ func (s *BuildVariablesService) UpdateBuildVariable(pid interface{}, key, value
//
// Gitlab API Docs:
// https://docs.gitlab.com/ce/api/build_variables.html#remove-variable
-func (s *BuildVariablesService) RemoveBuildVariable(pid interface{}, key string) (*Response, error) {
+func (s *BuildVariablesService) RemoveBuildVariable(pid interface{}, key string, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, err
}
u := fmt.Sprintf("projects/%s/variables/%s", url.QueryEscape(project), key)
- req, err := s.client.NewRequest("DELETE", u, nil)
+ req, err := s.client.NewRequest("DELETE", u, nil, options)
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/xanzy/go-gitlab/builds.go b/vendor/github.com/xanzy/go-gitlab/builds.go
index a26ead5..dfee85b 100644
--- a/vendor/github.com/xanzy/go-gitlab/builds.go
+++ b/vendor/github.com/xanzy/go-gitlab/builds.go
@@ -73,14 +73,14 @@ type Build struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/builds.html#list-project-builds
-func (s *BuildsService) ListProjectBuilds(pid interface{}, opts *ListBuildsOptions) ([]Build, *Response, error) {
+func (s *BuildsService) ListProjectBuilds(pid interface{}, opts *ListBuildsOptions, options ...OptionFunc) ([]Build, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/builds", url.QueryEscape(project))
- req, err := s.client.NewRequest("GET", u, opts)
+ req, err := s.client.NewRequest("GET", u, opts, options)
if err != nil {
return nil, nil, err
}
@@ -99,14 +99,14 @@ func (s *BuildsService) ListProjectBuilds(pid interface{}, opts *ListBuildsOptio
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/builds.html#list-commit-builds
-func (s *BuildsService) ListCommitBuilds(pid interface{}, sha string, opts *ListBuildsOptions) ([]Build, *Response, error) {
+func (s *BuildsService) ListCommitBuilds(pid interface{}, sha string, opts *ListBuildsOptions, options ...OptionFunc) ([]Build, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/repository/commits/%s/builds", project, sha)
- req, err := s.client.NewRequest("GET", u, opts)
+ req, err := s.client.NewRequest("GET", u, opts, options)
if err != nil {
return nil, nil, err
}
@@ -124,14 +124,14 @@ func (s *BuildsService) ListCommitBuilds(pid interface{}, sha string, opts *List
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/builds.html#get-a-single-build
-func (s *BuildsService) GetBuild(pid interface{}, buildID int) (*Build, *Response, error) {
+func (s *BuildsService) GetBuild(pid interface{}, buildID int, options ...OptionFunc) (*Build, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/builds/%d", project, buildID)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -149,14 +149,14 @@ func (s *BuildsService) GetBuild(pid interface{}, buildID int) (*Build, *Respons
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/builds.html#get-build-artifacts
-func (s *BuildsService) GetBuildArtifacts(pid interface{}, buildID int) (io.Reader, *Response, error) {
+func (s *BuildsService) GetBuildArtifacts(pid interface{}, buildID int, options ...OptionFunc) (io.Reader, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/builds/%d/artifacts", project, buildID)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -175,14 +175,14 @@ func (s *BuildsService) GetBuildArtifacts(pid interface{}, buildID int) (io.Read
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/builds.html#download-the-artifacts-file
-func (s *BuildsService) DownloadArtifactsFile(pid interface{}, refName string, job string) (io.Reader, *Response, error) {
+func (s *BuildsService) DownloadArtifactsFile(pid interface{}, refName string, job string, options ...OptionFunc) (io.Reader, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/builds/artifacts/%s/download?job=%s", project, refName, job)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -200,14 +200,14 @@ func (s *BuildsService) DownloadArtifactsFile(pid interface{}, refName string, j
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/builds.html#get-a-trace-file
-func (s *BuildsService) GetTraceFile(pid interface{}, buildID int) (io.Reader, *Response, error) {
+func (s *BuildsService) GetTraceFile(pid interface{}, buildID int, options ...OptionFunc) (io.Reader, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/builds/%d/trace", project, buildID)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -225,14 +225,14 @@ func (s *BuildsService) GetTraceFile(pid interface{}, buildID int) (io.Reader, *
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/builds.html#cancel-a-build
-func (s *BuildsService) CancelBuild(pid interface{}, buildID int) (*Build, *Response, error) {
+func (s *BuildsService) CancelBuild(pid interface{}, buildID int, options ...OptionFunc) (*Build, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/builds/%d/cancel", project, buildID)
- req, err := s.client.NewRequest("POST", u, nil)
+ req, err := s.client.NewRequest("POST", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -250,14 +250,14 @@ func (s *BuildsService) CancelBuild(pid interface{}, buildID int) (*Build, *Resp
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/builds.html#retry-a-build
-func (s *BuildsService) RetryBuild(pid interface{}, buildID int) (*Build, *Response, error) {
+func (s *BuildsService) RetryBuild(pid interface{}, buildID int, options ...OptionFunc) (*Build, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/builds/%d/retry", project, buildID)
- req, err := s.client.NewRequest("POST", u, nil)
+ req, err := s.client.NewRequest("POST", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -276,14 +276,14 @@ func (s *BuildsService) RetryBuild(pid interface{}, buildID int) (*Build, *Respo
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/builds.html#erase-a-build
-func (s *BuildsService) EraseBuild(pid interface{}, buildID int) (*Build, *Response, error) {
+func (s *BuildsService) EraseBuild(pid interface{}, buildID int, options ...OptionFunc) (*Build, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/builds/%d/erase", project, buildID)
- req, err := s.client.NewRequest("POST", u, nil)
+ req, err := s.client.NewRequest("POST", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -302,14 +302,14 @@ func (s *BuildsService) EraseBuild(pid interface{}, buildID int) (*Build, *Respo
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/builds.html#keep-artifacts
-func (s *BuildsService) KeepArtifacts(pid interface{}, buildID int) (*Build, *Response, error) {
+func (s *BuildsService) KeepArtifacts(pid interface{}, buildID int, options ...OptionFunc) (*Build, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/builds/%d/artifacts/keep", project, buildID)
- req, err := s.client.NewRequest("POST", u, nil)
+ req, err := s.client.NewRequest("POST", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -327,14 +327,14 @@ func (s *BuildsService) KeepArtifacts(pid interface{}, buildID int) (*Build, *Re
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/builds.html#play-a-build
-func (s *BuildsService) PlayBuild(pid interface{}, buildID int) (*Build, *Response, error) {
+func (s *BuildsService) PlayBuild(pid interface{}, buildID int, options ...OptionFunc) (*Build, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/builds/%d/play", project, buildID)
- req, err := s.client.NewRequest("POST", u, nil)
+ req, err := s.client.NewRequest("POST", u, nil, options)
if err != nil {
return nil, nil, err
}
diff --git a/vendor/github.com/xanzy/go-gitlab/commits.go b/vendor/github.com/xanzy/go-gitlab/commits.go
index c61a6b7..7860f58 100644
--- a/vendor/github.com/xanzy/go-gitlab/commits.go
+++ b/vendor/github.com/xanzy/go-gitlab/commits.go
@@ -63,16 +63,14 @@ type ListCommitsOptions struct {
// ListCommits gets a list of repository commits in a project.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#list-commits
-func (s *CommitsService) ListCommits(
- pid interface{},
- opt *ListCommitsOptions) ([]*Commit, *Response, error) {
+func (s *CommitsService) ListCommits(pid interface{}, opt *ListCommitsOptions, options ...OptionFunc) ([]*Commit, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/repository/commits", url.QueryEscape(project))
- req, err := s.client.NewRequest("GET", u, opt)
+ req, err := s.client.NewRequest("GET", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -90,16 +88,14 @@ func (s *CommitsService) ListCommits(
// branch or tag.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#get-a-single-commit
-func (s *CommitsService) GetCommit(
- pid interface{},
- sha string) (*Commit, *Response, error) {
+func (s *CommitsService) GetCommit(pid interface{}, sha string, options ...OptionFunc) (*Commit, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/repository/commits/%s", url.QueryEscape(project), sha)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -135,16 +131,14 @@ func (d Diff) String() string {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/commits.html#get-the-diff-of-a-commit
-func (s *CommitsService) GetCommitDiff(
- pid interface{},
- sha string) ([]*Diff, *Response, error) {
+func (s *CommitsService) GetCommitDiff(pid interface{}, sha string, options ...OptionFunc) ([]*Diff, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/repository/commits/%s/diff", url.QueryEscape(project), sha)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -188,16 +182,14 @@ func (c CommitComment) String() string {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/commits.html#get-the-comments-of-a-commit
-func (s *CommitsService) GetCommitComments(
- pid interface{},
- sha string) ([]*CommitComment, *Response, error) {
+func (s *CommitsService) GetCommitComments(pid interface{}, sha string, options ...OptionFunc) ([]*CommitComment, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/repository/commits/%s/comments", url.QueryEscape(project), sha)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -229,17 +221,14 @@ type PostCommitCommentOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/commits.html#post-comment-to-commit
-func (s *CommitsService) PostCommitComment(
- pid interface{},
- sha string,
- opt *PostCommitCommentOptions) (*CommitComment, *Response, error) {
+func (s *CommitsService) PostCommitComment(pid interface{}, sha string, opt *PostCommitCommentOptions, options ...OptionFunc) (*CommitComment, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/repository/commits/%s/comments", url.QueryEscape(project), sha)
- req, err := s.client.NewRequest("POST", u, opt)
+ req, err := s.client.NewRequest("POST", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -283,17 +272,14 @@ type CommitStatus struct {
// GetCommitStatuses gets the statuses of a commit in a project.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#get-the-status-of-a-commit
-func (s *CommitsService) GetCommitStatuses(
- pid interface{},
- sha string,
- opt *GetCommitStatusesOptions) ([]*CommitStatus, *Response, error) {
+func (s *CommitsService) GetCommitStatuses(pid interface{}, sha string, opt *GetCommitStatusesOptions, options ...OptionFunc) ([]*CommitStatus, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/repository/commits/%s/statuses", url.QueryEscape(project), sha)
- req, err := s.client.NewRequest("GET", u, opt)
+ req, err := s.client.NewRequest("GET", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -334,17 +320,14 @@ const (
// SetCommitStatus sets the status of a commit in a project.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/commits.html#post-the-status-to-commit
-func (s *CommitsService) SetCommitStatus(
- pid interface{},
- sha string,
- opt *SetCommitStatusOptions) (*CommitStatus, *Response, error) {
+func (s *CommitsService) SetCommitStatus(pid interface{}, sha string, opt *SetCommitStatusOptions, options ...OptionFunc) (*CommitStatus, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/statuses/%s", url.QueryEscape(project), sha)
- req, err := s.client.NewRequest("POST", u, opt)
+ req, err := s.client.NewRequest("POST", u, opt, options)
if err != nil {
return nil, nil, err
}
diff --git a/vendor/github.com/xanzy/go-gitlab/deploy_keys.go b/vendor/github.com/xanzy/go-gitlab/deploy_keys.go
index 1dcf99c..e964e18 100644
--- a/vendor/github.com/xanzy/go-gitlab/deploy_keys.go
+++ b/vendor/github.com/xanzy/go-gitlab/deploy_keys.go
@@ -46,14 +46,14 @@ func (k DeployKey) String() string {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/deploy_keys.html#list-deploy-keys
-func (s *DeployKeysService) ListDeployKeys(pid interface{}) ([]*DeployKey, *Response, error) {
+func (s *DeployKeysService) ListDeployKeys(pid interface{}, options ...OptionFunc) ([]*DeployKey, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/keys", url.QueryEscape(project))
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -71,16 +71,14 @@ func (s *DeployKeysService) ListDeployKeys(pid interface{}) ([]*DeployKey, *Resp
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/deploy_keys.html#single-deploy-key
-func (s *DeployKeysService) GetDeployKey(
- pid interface{},
- deployKey int) (*DeployKey, *Response, error) {
+func (s *DeployKeysService) GetDeployKey(pid interface{}, deployKey int, options ...OptionFunc) (*DeployKey, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/keys/%d", url.QueryEscape(project), deployKey)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -109,16 +107,14 @@ type AddDeployKeyOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/deploy_keys.html#add-deploy-key
-func (s *DeployKeysService) AddDeployKey(
- pid interface{},
- opt *AddDeployKeyOptions) (*DeployKey, *Response, error) {
+func (s *DeployKeysService) AddDeployKey(pid interface{}, opt *AddDeployKeyOptions, options ...OptionFunc) (*DeployKey, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/keys", url.QueryEscape(project))
- req, err := s.client.NewRequest("POST", u, opt)
+ req, err := s.client.NewRequest("POST", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -136,14 +132,14 @@ func (s *DeployKeysService) AddDeployKey(
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/deploy_keys.html#delete-deploy-key
-func (s *DeployKeysService) DeleteDeployKey(pid interface{}, deployKey int) (*Response, error) {
+func (s *DeployKeysService) DeleteDeployKey(pid interface{}, deployKey int, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, err
}
u := fmt.Sprintf("projects/%s/keys/%d", url.QueryEscape(project), deployKey)
- req, err := s.client.NewRequest("DELETE", u, nil)
+ req, err := s.client.NewRequest("DELETE", u, nil, options)
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/xanzy/go-gitlab/gitlab.go b/vendor/github.com/xanzy/go-gitlab/gitlab.go
index 296e32c..35d65a4 100644
--- a/vendor/github.com/xanzy/go-gitlab/gitlab.go
+++ b/vendor/github.com/xanzy/go-gitlab/gitlab.go
@@ -24,6 +24,7 @@ import (
"io/ioutil"
"net/http"
"net/url"
+ "sort"
"strconv"
"strings"
@@ -65,22 +66,66 @@ const (
OwnerPermission AccessLevelValue = 50
)
-// NotificationLevelValue represents a notification level within Gitlab.
-//
-// GitLab API docs: https://docs.gitlab.com/ce/api/
+// NotificationLevelValue represents a notification level.
type NotificationLevelValue int
-// List of available notification levels
-//
-// GitLab API docs: https://docs.gitlab.com/ce/api/
+// String implements the fmt.Stringer interface.
+func (l NotificationLevelValue) String() string {
+ return notificationLevelNames[l]
+}
+
+// MarshalJSON implements the json.Marshaler interface.
+func (l NotificationLevelValue) MarshalJSON() ([]byte, error) {
+ return json.Marshal(l.String())
+}
+
+// UnmarshalJSON implements the json.Unmarshaler interface.
+func (l *NotificationLevelValue) UnmarshalJSON(data []byte) error {
+ var raw interface{}
+ if err := json.Unmarshal(data, &raw); err != nil {
+ return err
+ }
+
+ switch raw := raw.(type) {
+ case float64:
+ *l = NotificationLevelValue(raw)
+ case string:
+ *l = notificationLevelTypes[raw]
+ default:
+ return fmt.Errorf("json: cannot unmarshal %T into Go value of type %T", raw, *l)
+ }
+
+ return nil
+}
+
+// List of valid notification levels.
const (
- DisabledNotifications NotificationLevelValue = iota
- ParticipatingNotifications
- WatchNotifications
- GlobalNotifications
- MentionNotifications
+ DisabledNotificationLevel NotificationLevelValue = iota
+ ParticipatingNotificationLevel
+ WatchNotificationLevel
+ GlobalNotificationLevel
+ MentionNotificationLevel
+ CustomNotificationLevel
)
+var notificationLevelNames = [...]string{
+ "disabled",
+ "participating",
+ "watch",
+ "global",
+ "mention",
+ "custom",
+}
+
+var notificationLevelTypes = map[string]NotificationLevelValue{
+ "disabled": DisabledNotificationLevel,
+ "participating": ParticipatingNotificationLevel,
+ "watch": WatchNotificationLevel,
+ "global": GlobalNotificationLevel,
+ "mention": MentionNotificationLevel,
+ "custom": CustomNotificationLevel,
+}
+
// VisibilityLevelValue represents a visibility level within GitLab.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/
@@ -115,30 +160,31 @@ type Client struct {
UserAgent string
// Services used for talking to different parts of the GitLab API.
- Branches *BranchesService
- BuildVariables *BuildVariablesService
- Builds *BuildsService
- Commits *CommitsService
- DeployKeys *DeployKeysService
- Groups *GroupsService
- Issues *IssuesService
- Labels *LabelsService
- MergeRequests *MergeRequestsService
- Milestones *MilestonesService
- Namespaces *NamespacesService
- Notes *NotesService
- Projects *ProjectsService
- ProjectSnippets *ProjectSnippetsService
- Pipelines *PipelinesService
- Repositories *RepositoriesService
- RepositoryFiles *RepositoryFilesService
- Services *ServicesService
- Session *SessionService
- Settings *SettingsService
- SystemHooks *SystemHooksService
- Tags *TagsService
- TimeStats *TimeStatsService
- Users *UsersService
+ Branches *BranchesService
+ BuildVariables *BuildVariablesService
+ Builds *BuildsService
+ Commits *CommitsService
+ DeployKeys *DeployKeysService
+ Groups *GroupsService
+ Issues *IssuesService
+ Labels *LabelsService
+ MergeRequests *MergeRequestsService
+ Milestones *MilestonesService
+ Namespaces *NamespacesService
+ Notes *NotesService
+ NotificationSettings *NotificationSettingsService
+ Projects *ProjectsService
+ ProjectSnippets *ProjectSnippetsService
+ Pipelines *PipelinesService
+ Repositories *RepositoriesService
+ RepositoryFiles *RepositoryFilesService
+ Services *ServicesService
+ Session *SessionService
+ Settings *SettingsService
+ SystemHooks *SystemHooksService
+ Tags *TagsService
+ TimeStats *TimeStatsService
+ Users *UsersService
}
// ListOptions specifies the optional parameters to various List methods that
@@ -186,8 +232,9 @@ func newClient(httpClient *http.Client, tokenType tokenType, token string) *Clie
c.Labels = &LabelsService{client: c}
c.MergeRequests = &MergeRequestsService{client: c}
c.Milestones = &MilestonesService{client: c}
- c.Notes = &NotesService{client: c}
c.Namespaces = &NamespacesService{client: c}
+ c.Notes = &NotesService{client: c}
+ c.NotificationSettings = &NotificationSettingsService{client: c}
c.Projects = &ProjectsService{client: c}
c.ProjectSnippets = &ProjectSnippetsService{client: c}
c.Pipelines = &PipelinesService{client: c}
@@ -228,7 +275,7 @@ func (c *Client) SetBaseURL(urlStr string) error {
// Relative URL paths should always be specified without a preceding slash. If
// specified, the value pointed to by body is JSON encoded and included as the
// request body.
-func (c *Client) NewRequest(method, path string, opt interface{}) (*http.Request, error) {
+func (c *Client) NewRequest(method, path string, opt interface{}, options []OptionFunc) (*http.Request, error) {
u := *c.baseURL
// Set the encoded opaque data
u.Opaque = c.baseURL.Path + path
@@ -251,6 +298,12 @@ func (c *Client) NewRequest(method, path string, opt interface{}) (*http.Request
Host: u.Host,
}
+ for _, fn := range options {
+ if err := fn(req); err != nil {
+ return nil, err
+ }
+ }
+
if method == "POST" || method == "PUT" {
bodyBytes, err := json.Marshal(opt)
if err != nil {
@@ -397,61 +450,102 @@ func parseID(id interface{}) (string, error) {
// GitLab API docs:
// https://docs.gitlab.com/ce/api/README.html#data-validation-and-error-reporting
type ErrorResponse struct {
- Response *http.Response // HTTP response that caused this error
- Message string `json:"message"` // error message
- Errors []Error `json:"errors"` // more detail on individual errors
+ Response *http.Response
+ Message string
}
-func (r *ErrorResponse) Error() string {
- path, _ := url.QueryUnescape(r.Response.Request.URL.Opaque)
- ru := fmt.Sprintf("%s://%s%s", r.Response.Request.URL.Scheme, r.Response.Request.URL.Host, path)
-
- return fmt.Sprintf("%v %s: %d %v %+v",
- r.Response.Request.Method, ru, r.Response.StatusCode, r.Message, r.Errors)
+func (e *ErrorResponse) Error() string {
+ path, _ := url.QueryUnescape(e.Response.Request.URL.Opaque)
+ u := fmt.Sprintf("%s://%s%s", e.Response.Request.URL.Scheme, e.Response.Request.URL.Host, path)
+ return fmt.Sprintf("%s %s: %d %s", e.Response.Request.Method, u, e.Response.StatusCode, e.Message)
}
-// An Error reports more details on an individual error in an ErrorResponse.
-// These are the possible validation error codes:
-//
-// missing:
-// resource does not exist
-// missing_field:
-// a required field on a resource has not been set
-// invalid:
-// the formatting of a field is invalid
-// already_exists:
-// another resource has the same valid as this field
-//
-// GitLab API docs:
-// https://docs.gitlab.com/ce/api/README.html#data-validation-and-error-reporting
-type Error struct {
- Resource string `json:"resource"` // resource on which the error occurred
- Field string `json:"field"` // field on which the error occurred
- Code string `json:"code"` // validation error code
-}
-
-func (e *Error) Error() string {
- return fmt.Sprintf("%v error caused by %v field on %v resource",
- e.Code, e.Field, e.Resource)
-}
-
-// CheckResponse checks the API response for errors, and returns them if
-// present. A response is considered an error if it has a status code outside
-// the 200 range. API error responses are expected to have either no response
-// body, or a JSON response body that maps to ErrorResponse. Any other
-// response body will be silently ignored.
+// CheckResponse checks the API response for errors, and returns them if present.
func CheckResponse(r *http.Response) error {
- if c := r.StatusCode; 200 <= c && c <= 299 {
+ switch r.StatusCode {
+ case 200, 201, 304:
return nil
}
+
errorResponse := &ErrorResponse{Response: r}
data, err := ioutil.ReadAll(r.Body)
if err == nil && data != nil {
- json.Unmarshal(data, errorResponse)
+ var raw interface{}
+ if err := json.Unmarshal(data, &raw); err != nil {
+ errorResponse.Message = "failed to parse unknown error format"
+ }
+
+ errorResponse.Message = parseError(raw)
}
+
return errorResponse
}
+// Format:
+// {
+// "message": {
+// "<property-name>": [
+// "<error-message>",
+// "<error-message>",
+// ...
+// ],
+// "<embed-entity>": {
+// "<property-name>": [
+// "<error-message>",
+// "<error-message>",
+// ...
+// ],
+// }
+// },
+// "error": "<error-message>"
+// }
+func parseError(raw interface{}) string {
+ switch raw := raw.(type) {
+ case string:
+ return raw
+
+ case []interface{}:
+ var errs []string
+ for _, v := range raw {
+ errs = append(errs, parseError(v))
+ }
+ return fmt.Sprintf("[%s]", strings.Join(errs, ", "))
+
+ case map[string]interface{}:
+ var errs []string
+ for k, v := range raw {
+ errs = append(errs, fmt.Sprintf("{%s: %s}", k, parseError(v)))
+ }
+ sort.Strings(errs)
+ return fmt.Sprintf("%s", strings.Join(errs, ", "))
+
+ default:
+ return fmt.Sprintf("failed to parse unexpected error type: %T", raw)
+ }
+}
+
+// OptionFunc can be passed to all API requests to make the API call as if you were
+// another user, provided your private token is from an administrator account.
+//
+// GitLab docs: https://docs.gitlab.com/ce/api/README.html#sudo
+type OptionFunc func(*http.Request) error
+
+// WithSudo takes either a username or user ID and sets the SUDO request header
+func WithSudo(uid interface{}) OptionFunc {
+ return func(req *http.Request) error {
+ switch uid := uid.(type) {
+ case int:
+ req.Header.Set("SUDO", strconv.Itoa(uid))
+ return nil
+ case string:
+ req.Header.Set("SUDO", uid)
+ return nil
+ default:
+ return fmt.Errorf("uid must be either a username or user ID")
+ }
+ }
+}
+
// Bool is a helper routine that allocates a new bool value
// to store v and returns a pointer to it.
func Bool(v bool) *bool {
@@ -485,6 +579,14 @@ func AccessLevel(v AccessLevelValue) *AccessLevelValue {
return p
}
+// NotificationLevel is a helper routine that allocates a new NotificationLevelValue
+// to store v and returns a pointer to it.
+func NotificationLevel(v NotificationLevelValue) *NotificationLevelValue {
+ p := new(NotificationLevelValue)
+ *p = v
+ return p
+}
+
// VisibilityLevel is a helper routine that allocates a new VisibilityLevelValue
// to store v and returns a pointer to it.
func VisibilityLevel(v VisibilityLevelValue) *VisibilityLevelValue {
diff --git a/vendor/github.com/xanzy/go-gitlab/groups.go b/vendor/github.com/xanzy/go-gitlab/groups.go
index 994f62c..060079e 100644
--- a/vendor/github.com/xanzy/go-gitlab/groups.go
+++ b/vendor/github.com/xanzy/go-gitlab/groups.go
@@ -52,8 +52,8 @@ type ListGroupsOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/groups.html#list-project-groups
-func (s *GroupsService) ListGroups(opt *ListGroupsOptions) ([]*Group, *Response, error) {
- req, err := s.client.NewRequest("GET", "groups", opt)
+func (s *GroupsService) ListGroups(opt *ListGroupsOptions, options ...OptionFunc) ([]*Group, *Response, error) {
+ req, err := s.client.NewRequest("GET", "groups", opt, options)
if err != nil {
return nil, nil, err
}
@@ -70,14 +70,14 @@ func (s *GroupsService) ListGroups(opt *ListGroupsOptions) ([]*Group, *Response,
// GetGroup gets all details of a group.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#details-of-a-group
-func (s *GroupsService) GetGroup(gid interface{}) (*Group, *Response, error) {
+func (s *GroupsService) GetGroup(gid interface{}, options ...OptionFunc) (*Group, *Response, error) {
group, err := parseID(gid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("groups/%s", group)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -105,8 +105,8 @@ type CreateGroupOptions struct {
// create groups.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#new-group
-func (s *GroupsService) CreateGroup(opt *CreateGroupOptions) (*Group, *Response, error) {
- req, err := s.client.NewRequest("POST", "groups", opt)
+func (s *GroupsService) CreateGroup(opt *CreateGroupOptions, options ...OptionFunc) (*Group, *Response, error) {
+ req, err := s.client.NewRequest("POST", "groups", opt, options)
if err != nil {
return nil, nil, err
}
@@ -125,14 +125,14 @@ func (s *GroupsService) CreateGroup(opt *CreateGroupOptions) (*Group, *Response,
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/groups.html#transfer-project-to-group
-func (s *GroupsService) TransferGroup(gid interface{}, project int) (*Group, *Response, error) {
+func (s *GroupsService) TransferGroup(gid interface{}, project int, options ...OptionFunc) (*Group, *Response, error) {
group, err := parseID(gid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("groups/%s/projects/%d", group, project)
- req, err := s.client.NewRequest("POST", u, nil)
+ req, err := s.client.NewRequest("POST", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -149,14 +149,14 @@ func (s *GroupsService) TransferGroup(gid interface{}, project int) (*Group, *Re
// DeleteGroup removes group with all projects inside.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#remove-group
-func (s *GroupsService) DeleteGroup(gid interface{}) (*Response, error) {
+func (s *GroupsService) DeleteGroup(gid interface{}, options ...OptionFunc) (*Response, error) {
group, err := parseID(gid)
if err != nil {
return nil, err
}
u := fmt.Sprintf("groups/%s", group)
- req, err := s.client.NewRequest("DELETE", u, nil)
+ req, err := s.client.NewRequest("DELETE", u, nil, options)
if err != nil {
return nil, err
}
@@ -167,13 +167,13 @@ func (s *GroupsService) DeleteGroup(gid interface{}) (*Response, error) {
// SearchGroup get all groups that match your string in their name or path.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/groups.html#search-for-group
-func (s *GroupsService) SearchGroup(query string) ([]*Group, *Response, error) {
+func (s *GroupsService) SearchGroup(query string, options ...OptionFunc) ([]*Group, *Response, error) {
var q struct {
Search string `url:"search,omitempty" json:"search,omitempty"`
}
q.Search = query
- req, err := s.client.NewRequest("GET", "groups", &q)
+ req, err := s.client.NewRequest("GET", "groups", &q, options)
if err != nil {
return nil, nil, err
}
@@ -214,14 +214,14 @@ type ListGroupMembersOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/groups.html#list-group-members
-func (s *GroupsService) ListGroupMembers(gid interface{}, opt *ListGroupMembersOptions) ([]*GroupMember, *Response, error) {
+func (s *GroupsService) ListGroupMembers(gid interface{}, opt *ListGroupMembersOptions, options ...OptionFunc) ([]*GroupMember, *Response, error) {
group, err := parseID(gid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("groups/%s/members", group)
- req, err := s.client.NewRequest("GET", u, opt)
+ req, err := s.client.NewRequest("GET", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -235,18 +235,27 @@ func (s *GroupsService) ListGroupMembers(gid interface{}, opt *ListGroupMembersO
return g, resp, err
}
+// ListGroupProjectsOptions represents the available ListGroupProjects()
+// options.
+//
+// GitLab API docs:
+// https://docs.gitlab.com/ce/api/groups.html#list-a-group-s-projects
+type ListGroupProjectsOptions struct {
+ ListOptions
+}
+
// ListGroupProjects get a list of group projects
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/groups.html#list-a-group-s-projects
-func (s *GroupsService) ListGroupProjects(gid interface{}) ([]*Project, *Response, error) {
+func (s *GroupsService) ListGroupProjects(gid interface{}, opt *ListGroupProjectsOptions, options ...OptionFunc) ([]*Project, *Response, error) {
group, err := parseID(gid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("groups/%s/projects", group)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -272,16 +281,14 @@ type AddGroupMemberOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/groups.html#list-group-members
-func (s *GroupsService) AddGroupMember(
- gid interface{},
- opt *AddGroupMemberOptions) (*GroupMember, *Response, error) {
+func (s *GroupsService) AddGroupMember(gid interface{}, opt *AddGroupMemberOptions, options ...OptionFunc) (*GroupMember, *Response, error) {
group, err := parseID(gid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("groups/%s/members", group)
- req, err := s.client.NewRequest("POST", u, opt)
+ req, err := s.client.NewRequest("POST", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -308,17 +315,14 @@ type UpdateGroupMemberOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/groups.html#list-group-members
-func (s *GroupsService) UpdateGroupMember(
- gid interface{},
- user int,
- opt *UpdateGroupMemberOptions) (*GroupMember, *Response, error) {
+func (s *GroupsService) UpdateGroupMember(gid interface{}, user int, opt *UpdateGroupMemberOptions, options ...OptionFunc) (*GroupMember, *Response, error) {
group, err := parseID(gid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("groups/%s/members/%d", group, user)
- req, err := s.client.NewRequest("PUT", u, opt)
+ req, err := s.client.NewRequest("PUT", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -336,14 +340,14 @@ func (s *GroupsService) UpdateGroupMember(
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/groups.html#remove-user-from-user-team
-func (s *GroupsService) RemoveGroupMember(gid interface{}, user int) (*Response, error) {
+func (s *GroupsService) RemoveGroupMember(gid interface{}, user int, options ...OptionFunc) (*Response, error) {
group, err := parseID(gid)
if err != nil {
return nil, err
}
u := fmt.Sprintf("groups/%s/members/%d", group, user)
- req, err := s.client.NewRequest("DELETE", u, nil)
+ req, err := s.client.NewRequest("DELETE", u, nil, options)
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/xanzy/go-gitlab/issues.go b/vendor/github.com/xanzy/go-gitlab/issues.go
index 176628c..0a286c2 100644
--- a/vendor/github.com/xanzy/go-gitlab/issues.go
+++ b/vendor/github.com/xanzy/go-gitlab/issues.go
@@ -96,8 +96,8 @@ type ListIssuesOptions struct {
// takes pagination parameters page and per_page to restrict the list of issues.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#list-issues
-func (s *IssuesService) ListIssues(opt *ListIssuesOptions) ([]*Issue, *Response, error) {
- req, err := s.client.NewRequest("GET", "issues", opt)
+func (s *IssuesService) ListIssues(opt *ListIssuesOptions, options ...OptionFunc) ([]*Issue, *Response, error) {
+ req, err := s.client.NewRequest("GET", "issues", opt, options)
if err != nil {
return nil, nil, err
}
@@ -128,16 +128,14 @@ type ListProjectIssuesOptions struct {
// pagination parameters page and per_page to return the list of project issues.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#list-project-issues
-func (s *IssuesService) ListProjectIssues(
- pid interface{},
- opt *ListProjectIssuesOptions) ([]*Issue, *Response, error) {
+func (s *IssuesService) ListProjectIssues(pid interface{}, opt *ListProjectIssuesOptions, options ...OptionFunc) ([]*Issue, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/issues", url.QueryEscape(project))
- req, err := s.client.NewRequest("GET", u, opt)
+ req, err := s.client.NewRequest("GET", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -154,14 +152,14 @@ func (s *IssuesService) ListProjectIssues(
// GetIssue gets a single project issue.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#single-issues
-func (s *IssuesService) GetIssue(pid interface{}, issue int) (*Issue, *Response, error) {
+func (s *IssuesService) GetIssue(pid interface{}, issue int, options ...OptionFunc) (*Issue, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/issues/%d", url.QueryEscape(project), issue)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -189,16 +187,14 @@ type CreateIssueOptions struct {
// CreateIssue creates a new project issue.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#new-issues
-func (s *IssuesService) CreateIssue(
- pid interface{},
- opt *CreateIssueOptions) (*Issue, *Response, error) {
+func (s *IssuesService) CreateIssue(pid interface{}, opt *CreateIssueOptions, options ...OptionFunc) (*Issue, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/issues", url.QueryEscape(project))
- req, err := s.client.NewRequest("POST", u, opt)
+ req, err := s.client.NewRequest("POST", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -228,17 +224,14 @@ type UpdateIssueOptions struct {
// to mark an issue as closed.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#edit-issues
-func (s *IssuesService) UpdateIssue(
- pid interface{},
- issue int,
- opt *UpdateIssueOptions) (*Issue, *Response, error) {
+func (s *IssuesService) UpdateIssue(pid interface{}, issue int, opt *UpdateIssueOptions, options ...OptionFunc) (*Issue, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/issues/%d", url.QueryEscape(project), issue)
- req, err := s.client.NewRequest("PUT", u, opt)
+ req, err := s.client.NewRequest("PUT", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -255,14 +248,14 @@ func (s *IssuesService) UpdateIssue(
// DeleteIssue deletes a single project issue.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/issues.html#delete-an-issue
-func (s *IssuesService) DeleteIssue(pid interface{}, issue int) (*Response, error) {
+func (s *IssuesService) DeleteIssue(pid interface{}, issue int, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, err
}
u := fmt.Sprintf("projects/%s/issues/%d", url.QueryEscape(project), issue)
- req, err := s.client.NewRequest("DELETE", u, nil)
+ req, err := s.client.NewRequest("DELETE", u, nil, options)
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/xanzy/go-gitlab/labels.go b/vendor/github.com/xanzy/go-gitlab/labels.go
index 7063da9..8d571b7 100644
--- a/vendor/github.com/xanzy/go-gitlab/labels.go
+++ b/vendor/github.com/xanzy/go-gitlab/labels.go
@@ -48,14 +48,14 @@ func (l Label) String() string {
// ListLabels gets all labels for given project.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#list-labels
-func (s *LabelsService) ListLabels(pid interface{}) ([]*Label, *Response, error) {
+func (s *LabelsService) ListLabels(pid interface{}, options ...OptionFunc) ([]*Label, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/labels", url.QueryEscape(project))
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -82,16 +82,14 @@ type CreateLabelOptions struct {
// color.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#create-a-new-label
-func (s *LabelsService) CreateLabel(
- pid interface{},
- opt *CreateLabelOptions) (*Label, *Response, error) {
+func (s *LabelsService) CreateLabel(pid interface{}, opt *CreateLabelOptions, options ...OptionFunc) (*Label, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/labels", url.QueryEscape(project))
- req, err := s.client.NewRequest("POST", u, opt)
+ req, err := s.client.NewRequest("POST", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -115,14 +113,14 @@ type DeleteLabelOptions struct {
// DeleteLabel deletes a label given by its name.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#delete-a-label
-func (s *LabelsService) DeleteLabel(pid interface{}, opt *DeleteLabelOptions) (*Response, error) {
+func (s *LabelsService) DeleteLabel(pid interface{}, opt *DeleteLabelOptions, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, err
}
u := fmt.Sprintf("projects/%s/labels", url.QueryEscape(project))
- req, err := s.client.NewRequest("DELETE", u, opt)
+ req, err := s.client.NewRequest("DELETE", u, opt, options)
if err != nil {
return nil, err
}
@@ -144,16 +142,14 @@ type UpdateLabelOptions struct {
// one parameter is required, to update the label.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/labels.html#edit-an-existing-label
-func (s *LabelsService) UpdateLabel(
- pid interface{},
- opt *UpdateLabelOptions) (*Label, *Response, error) {
+func (s *LabelsService) UpdateLabel(pid interface{}, opt *UpdateLabelOptions, options ...OptionFunc) (*Label, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/labels", url.QueryEscape(project))
- req, err := s.client.NewRequest("PUT", u, opt)
+ req, err := s.client.NewRequest("PUT", u, opt, options)
if err != nil {
return nil, nil, err
}
diff --git a/vendor/github.com/xanzy/go-gitlab/merge_requests.go b/vendor/github.com/xanzy/go-gitlab/merge_requests.go
index b135d9d..1d15406 100644
--- a/vendor/github.com/xanzy/go-gitlab/merge_requests.go
+++ b/vendor/github.com/xanzy/go-gitlab/merge_requests.go
@@ -118,16 +118,14 @@ type ListMergeRequestsOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/merge_requests.html#list-merge-requests
-func (s *MergeRequestsService) ListMergeRequests(
- pid interface{},
- opt *ListMergeRequestsOptions) ([]*MergeRequest, *Response, error) {
+func (s *MergeRequestsService) ListMergeRequests(pid interface{}, opt *ListMergeRequestsOptions, options ...OptionFunc) ([]*MergeRequest, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/merge_requests", url.QueryEscape(project))
- req, err := s.client.NewRequest("GET", u, opt)
+ req, err := s.client.NewRequest("GET", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -145,16 +143,14 @@ func (s *MergeRequestsService) ListMergeRequests(
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/merge_requests.html#get-single-mr
-func (s *MergeRequestsService) GetMergeRequest(
- pid interface{},
- mergeRequest int) (*MergeRequest, *Response, error) {
+func (s *MergeRequestsService) GetMergeRequest(pid interface{}, mergeRequest int, options ...OptionFunc) (*MergeRequest, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
- u := fmt.Sprintf("projects/%s/merge_request/%d", url.QueryEscape(project), mergeRequest)
+ u := fmt.Sprintf("projects/%s/merge_requests/%d", url.QueryEscape(project), mergeRequest)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -168,21 +164,44 @@ func (s *MergeRequestsService) GetMergeRequest(
return m, resp, err
}
+// GetMergeRequestCommits gets a list of merge request commits.
+//
+// GitLab API docs:
+// https://docs.gitlab.com/ce/api/merge_requests.html#get-single-mr-commits
+func (s *MergeRequestsService) GetMergeRequestCommits(pid interface{}, mergeRequest int, options ...OptionFunc) ([]*Commit, *Response, error) {
+ project, err := parseID(pid)
+ if err != nil {
+ return nil, nil, err
+ }
+ u := fmt.Sprintf("projects/%s/merge_requests/%d/commits", url.QueryEscape(project), mergeRequest)
+
+ req, err := s.client.NewRequest("GET", u, nil, options)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ var c []*Commit
+ resp, err := s.client.Do(req, &c)
+ if err != nil {
+ return nil, resp, err
+ }
+
+ return c, resp, err
+}
+
// GetMergeRequestChanges shows information about the merge request including
// its files and changes.
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/merge_requests.html#get-single-mr-changes
-func (s *MergeRequestsService) GetMergeRequestChanges(
- pid interface{},
- mergeRequest int) (*MergeRequest, *Response, error) {
+func (s *MergeRequestsService) GetMergeRequestChanges(pid interface{}, mergeRequest int, options ...OptionFunc) (*MergeRequest, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
- u := fmt.Sprintf("projects/%s/merge_request/%d/changes", url.QueryEscape(project), mergeRequest)
+ u := fmt.Sprintf("projects/%s/merge_requests/%d/changes", url.QueryEscape(project), mergeRequest)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -214,16 +233,14 @@ type CreateMergeRequestOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/merge_requests.html#create-mr
-func (s *MergeRequestsService) CreateMergeRequest(
- pid interface{},
- opt *CreateMergeRequestOptions) (*MergeRequest, *Response, error) {
+func (s *MergeRequestsService) CreateMergeRequest(pid interface{}, opt *CreateMergeRequestOptions, options ...OptionFunc) (*MergeRequest, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/merge_requests", url.QueryEscape(project))
- req, err := s.client.NewRequest("POST", u, opt)
+ req, err := s.client.NewRequest("POST", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -254,17 +271,14 @@ type UpdateMergeRequestOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/merge_requests.html#update-mr
-func (s *MergeRequestsService) UpdateMergeRequest(
- pid interface{},
- mergeRequest int,
- opt *UpdateMergeRequestOptions) (*MergeRequest, *Response, error) {
+func (s *MergeRequestsService) UpdateMergeRequest(pid interface{}, mergeRequest int, opt *UpdateMergeRequestOptions, options ...OptionFunc) (*MergeRequest, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
- u := fmt.Sprintf("projects/%s/merge_request/%d", url.QueryEscape(project), mergeRequest)
+ u := fmt.Sprintf("projects/%s/merge_requests/%d", url.QueryEscape(project), mergeRequest)
- req, err := s.client.NewRequest("PUT", u, opt)
+ req, err := s.client.NewRequest("PUT", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -297,17 +311,14 @@ type AcceptMergeRequestOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/merge_requests.html#accept-mr
-func (s *MergeRequestsService) AcceptMergeRequest(
- pid interface{},
- mergeRequest int,
- opt *AcceptMergeRequestOptions) (*MergeRequest, *Response, error) {
+func (s *MergeRequestsService) AcceptMergeRequest(pid interface{}, mergeRequest int, opt *AcceptMergeRequestOptions, options ...OptionFunc) (*MergeRequest, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
- u := fmt.Sprintf("projects/%s/merge_request/%d/merge", url.QueryEscape(project), mergeRequest)
+ u := fmt.Sprintf("projects/%s/merge_requests/%d/merge", url.QueryEscape(project), mergeRequest)
- req, err := s.client.NewRequest("PUT", u, opt)
+ req, err := s.client.NewRequest("PUT", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -320,97 +331,3 @@ func (s *MergeRequestsService) AcceptMergeRequest(
return m, resp, err
}
-
-// MergeRequestComment represents a GitLab merge request comment.
-//
-// GitLab API docs: https://docs.gitlab.com/ce/api/merge_requests.html
-type MergeRequestComment struct {
- Note string `json:"note"`
- Author struct {
- ID int `json:"id"`
- Username string `json:"username"`
- Email string `json:"email"`
- Name string `json:"name"`
- State string `json:"state"`
- CreatedAt *time.Time `json:"created_at"`
- } `json:"author"`
-}
-
-func (m MergeRequestComment) String() string {
- return Stringify(m)
-}
-
-// GetMergeRequestCommentsOptions represents the available GetMergeRequestComments()
-// options.
-//
-// GitLab API docs:
-// https://docs.gitlab.com/ce/api/merge_requests.html#get-the-comments-on-a-mr
-type GetMergeRequestCommentsOptions struct {
- ListOptions
-}
-
-// GetMergeRequestComments gets all the comments associated with a merge
-// request.
-//
-// GitLab API docs:
-// https://docs.gitlab.com/ce/api/merge_requests.html#get-the-comments-on-a-mr
-func (s *MergeRequestsService) GetMergeRequestComments(
- pid interface{},
- mergeRequest int,
- opt *GetMergeRequestCommentsOptions) ([]*MergeRequestComment, *Response, error) {
- project, err := parseID(pid)
- if err != nil {
- return nil, nil, err
- }
- u := fmt.Sprintf("projects/%s/merge_request/%d/comments", url.QueryEscape(project), mergeRequest)
-
- req, err := s.client.NewRequest("GET", u, opt)
- if err != nil {
- return nil, nil, err
- }
-
- var c []*MergeRequestComment
- resp, err := s.client.Do(req, &c)
- if err != nil {
- return nil, resp, err
- }
-
- return c, resp, err
-}
-
-// PostMergeRequestCommentOptions represents the available
-// PostMergeRequestComment() options.
-//
-// GitLab API docs:
-// https://docs.gitlab.com/ce/api/commits.html#post-comment-to-mr
-type PostMergeRequestCommentOptions struct {
- Note *string `url:"note,omitempty" json:"note,omitempty"`
-}
-
-// PostMergeRequestComment dds a comment to a merge request.
-//
-// GitLab API docs:
-// https://docs.gitlab.com/ce/api/commits.html#post-comment-to-mr
-func (s *MergeRequestsService) PostMergeRequestComment(
- pid interface{},
- mergeRequest int,
- opt *PostMergeRequestCommentOptions) (*MergeRequestComment, *Response, error) {
- project, err := parseID(pid)
- if err != nil {
- return nil, nil, err
- }
- u := fmt.Sprintf("projects/%s/merge_request/%d/comments", url.QueryEscape(project), mergeRequest)
-
- req, err := s.client.NewRequest("POST", u, opt)
- if err != nil {
- return nil, nil, err
- }
-
- c := new(MergeRequestComment)
- resp, err := s.client.Do(req, c)
- if err != nil {
- return nil, resp, err
- }
-
- return c, resp, err
-}
diff --git a/vendor/github.com/xanzy/go-gitlab/milestones.go b/vendor/github.com/xanzy/go-gitlab/milestones.go
index e570ca5..eeaf9cc 100644
--- a/vendor/github.com/xanzy/go-gitlab/milestones.go
+++ b/vendor/github.com/xanzy/go-gitlab/milestones.go
@@ -63,16 +63,14 @@ type ListMilestonesOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/milestones.html#list-project-milestones
-func (s *MilestonesService) ListMilestones(
- pid interface{},
- opt *ListMilestonesOptions) ([]*Milestone, *Response, error) {
+func (s *MilestonesService) ListMilestones(pid interface{}, opt *ListMilestonesOptions, options ...OptionFunc) ([]*Milestone, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/milestones", url.QueryEscape(project))
- req, err := s.client.NewRequest("GET", u, opt)
+ req, err := s.client.NewRequest("GET", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -90,16 +88,14 @@ func (s *MilestonesService) ListMilestones(
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/milestones.html#get-single-milestone
-func (s *MilestonesService) GetMilestone(
- pid interface{},
- milestone int) (*Milestone, *Response, error) {
+func (s *MilestonesService) GetMilestone(pid interface{}, milestone int, options ...OptionFunc) (*Milestone, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/milestones/%d", url.QueryEscape(project), milestone)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -128,16 +124,14 @@ type CreateMilestoneOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/milestones.html#create-new-milestone
-func (s *MilestonesService) CreateMilestone(
- pid interface{},
- opt *CreateMilestoneOptions) (*Milestone, *Response, error) {
+func (s *MilestonesService) CreateMilestone(pid interface{}, opt *CreateMilestoneOptions, options ...OptionFunc) (*Milestone, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/milestones", url.QueryEscape(project))
- req, err := s.client.NewRequest("POST", u, opt)
+ req, err := s.client.NewRequest("POST", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -167,17 +161,14 @@ type UpdateMilestoneOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/milestones.html#edit-milestone
-func (s *MilestonesService) UpdateMilestone(
- pid interface{},
- milestone int,
- opt *UpdateMilestoneOptions) (*Milestone, *Response, error) {
+func (s *MilestonesService) UpdateMilestone(pid interface{}, milestone int, opt *UpdateMilestoneOptions, options ...OptionFunc) (*Milestone, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/milestones/%d", url.QueryEscape(project), milestone)
- req, err := s.client.NewRequest("PUT", u, opt)
+ req, err := s.client.NewRequest("PUT", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -203,17 +194,14 @@ type GetMilestoneIssuesOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/milestones.html#get-all-issues-assigned-to-a-single-milestone
-func (s *MilestonesService) GetMilestoneIssues(
- pid interface{},
- milestone int,
- opt *GetMilestoneIssuesOptions) ([]*Issue, *Response, error) {
+func (s *MilestonesService) GetMilestoneIssues(pid interface{}, milestone int, opt *GetMilestoneIssuesOptions, options ...OptionFunc) ([]*Issue, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/milestones/%d/issues", url.QueryEscape(project), milestone)
- req, err := s.client.NewRequest("GET", u, opt)
+ req, err := s.client.NewRequest("GET", u, opt, options)
if err != nil {
return nil, nil, err
}
diff --git a/vendor/github.com/xanzy/go-gitlab/namespaces.go b/vendor/github.com/xanzy/go-gitlab/namespaces.go
index b849cbf..d4b5e45 100644
--- a/vendor/github.com/xanzy/go-gitlab/namespaces.go
+++ b/vendor/github.com/xanzy/go-gitlab/namespaces.go
@@ -48,8 +48,8 @@ type ListNamespacesOptions struct {
// ListNamespaces gets a list of projects accessible by the authenticated user.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/namespaces.html#list-namespaces
-func (s *NamespacesService) ListNamespaces(opt *ListNamespacesOptions) ([]*Namespace, *Response, error) {
- req, err := s.client.NewRequest("GET", "namespaces", opt)
+func (s *NamespacesService) ListNamespaces(opt *ListNamespacesOptions, options ...OptionFunc) ([]*Namespace, *Response, error) {
+ req, err := s.client.NewRequest("GET", "namespaces", opt, options)
if err != nil {
return nil, nil, err
}
@@ -68,13 +68,13 @@ func (s *NamespacesService) ListNamespaces(opt *ListNamespacesOptions) ([]*Names
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/namespaces.html#search-for-namespace
-func (s *NamespacesService) SearchNamespace(query string) ([]*Namespace, *Response, error) {
+func (s *NamespacesService) SearchNamespace(query string, options ...OptionFunc) ([]*Namespace, *Response, error) {
var q struct {
Search string `url:"search,omitempty" json:"search,omitempty"`
}
q.Search = query
- req, err := s.client.NewRequest("GET", "namespaces", &q)
+ req, err := s.client.NewRequest("GET", "namespaces", &q, options)
if err != nil {
return nil, nil, err
}
diff --git a/vendor/github.com/xanzy/go-gitlab/notes.go b/vendor/github.com/xanzy/go-gitlab/notes.go
index 04e8a64..c1836c2 100644
--- a/vendor/github.com/xanzy/go-gitlab/notes.go
+++ b/vendor/github.com/xanzy/go-gitlab/notes.go
@@ -68,17 +68,14 @@ type ListIssueNotesOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/notes.html#list-project-issue-notes
-func (s *NotesService) ListIssueNotes(
- pid interface{},
- issue int,
- opt *ListIssueNotesOptions) ([]*Note, *Response, error) {
+func (s *NotesService) ListIssueNotes(pid interface{}, issue int, opt *ListIssueNotesOptions, options ...OptionFunc) ([]*Note, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/issues/%d/notes", url.QueryEscape(project), issue)
- req, err := s.client.NewRequest("GET", u, opt)
+ req, err := s.client.NewRequest("GET", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -96,17 +93,14 @@ func (s *NotesService) ListIssueNotes(
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/notes.html#get-single-issue-note
-func (s *NotesService) GetIssueNote(
- pid interface{},
- issue int,
- note int) (*Note, *Response, error) {
+func (s *NotesService) GetIssueNote(pid interface{}, issue int, note int, options ...OptionFunc) (*Note, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/issues/%d/notes/%d", url.QueryEscape(project), issue, note)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -133,17 +127,14 @@ type CreateIssueNoteOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/notes.html#create-new-issue-note
-func (s *NotesService) CreateIssueNote(
- pid interface{},
- issue int,
- opt *CreateIssueNoteOptions) (*Note, *Response, error) {
+func (s *NotesService) CreateIssueNote(pid interface{}, issue int, opt *CreateIssueNoteOptions, options ...OptionFunc) (*Note, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/issues/%d/notes", url.QueryEscape(project), issue)
- req, err := s.client.NewRequest("POST", u, opt)
+ req, err := s.client.NewRequest("POST", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -169,18 +160,14 @@ type UpdateIssueNoteOptions struct {
// UpdateIssueNote modifies existing note of an issue.
//
// https://docs.gitlab.com/ce/api/notes.html#modify-existing-issue-note
-func (s *NotesService) UpdateIssueNote(
- pid interface{},
- issue int,
- note int,
- opt *UpdateIssueNoteOptions) (*Note, *Response, error) {
+func (s *NotesService) UpdateIssueNote(pid interface{}, issue int, note int, opt *UpdateIssueNoteOptions, options ...OptionFunc) (*Note, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/issues/%d/notes/%d", url.QueryEscape(project), issue, note)
- req, err := s.client.NewRequest("PUT", u, opt)
+ req, err := s.client.NewRequest("PUT", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -199,14 +186,14 @@ func (s *NotesService) UpdateIssueNote(
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/notes.html#list-all-snippet-notes
-func (s *NotesService) ListSnippetNotes(pid interface{}, snippet int) ([]*Note, *Response, error) {
+func (s *NotesService) ListSnippetNotes(pid interface{}, snippet int, options ...OptionFunc) ([]*Note, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/snippets/%d/notes", url.QueryEscape(project), snippet)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -224,17 +211,14 @@ func (s *NotesService) ListSnippetNotes(pid interface{}, snippet int) ([]*Note,
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/notes.html#get-single-snippet-note
-func (s *NotesService) GetSnippetNote(
- pid interface{},
- snippet int,
- note int) (*Note, *Response, error) {
+func (s *NotesService) GetSnippetNote(pid interface{}, snippet int, note int, options ...OptionFunc) (*Note, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/snippets/%d/notes/%d", url.QueryEscape(project), snippet, note)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -262,17 +246,14 @@ type CreateSnippetNoteOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/notes.html#create-new-snippet-note
-func (s *NotesService) CreateSnippetNote(
- pid interface{},
- snippet int,
- opt *CreateSnippetNoteOptions) (*Note, *Response, error) {
+func (s *NotesService) CreateSnippetNote(pid interface{}, snippet int, opt *CreateSnippetNoteOptions, options ...OptionFunc) (*Note, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/snippets/%d/notes", url.QueryEscape(project), snippet)
- req, err := s.client.NewRequest("POST", u, opt)
+ req, err := s.client.NewRequest("POST", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -298,18 +279,14 @@ type UpdateSnippetNoteOptions struct {
// UpdateSnippetNote modifies existing note of a snippet.
//
// https://docs.gitlab.com/ce/api/notes.html#modify-existing-snippet-note
-func (s *NotesService) UpdateSnippetNote(
- pid interface{},
- snippet int,
- note int,
- opt *UpdateSnippetNoteOptions) (*Note, *Response, error) {
+func (s *NotesService) UpdateSnippetNote(pid interface{}, snippet int, note int, opt *UpdateSnippetNoteOptions, options ...OptionFunc) (*Note, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/snippets/%d/notes/%d", url.QueryEscape(project), snippet, note)
- req, err := s.client.NewRequest("PUT", u, opt)
+ req, err := s.client.NewRequest("PUT", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -327,16 +304,14 @@ func (s *NotesService) UpdateSnippetNote(
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/notes.html#list-all-merge-request-notes
-func (s *NotesService) ListMergeRequestNotes(
- pid interface{},
- mergeRequest int) ([]*Note, *Response, error) {
+func (s *NotesService) ListMergeRequestNotes(pid interface{}, mergeRequest int, options ...OptionFunc) ([]*Note, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/merge_requests/%d/notes", url.QueryEscape(project), mergeRequest)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -354,17 +329,14 @@ func (s *NotesService) ListMergeRequestNotes(
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/notes.html#get-single-merge-request-note
-func (s *NotesService) GetMergeRequestNote(
- pid interface{},
- mergeRequest int,
- note int) (*Note, *Response, error) {
+func (s *NotesService) GetMergeRequestNote(pid interface{}, mergeRequest int, note int, options ...OptionFunc) (*Note, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/merge_requests/%d/notes/%d", url.QueryEscape(project), mergeRequest, note)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -391,17 +363,14 @@ type CreateMergeRequestNoteOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/notes.html#create-new-merge-request-note
-func (s *NotesService) CreateMergeRequestNote(
- pid interface{},
- mergeRequest int,
- opt *CreateMergeRequestNoteOptions) (*Note, *Response, error) {
+func (s *NotesService) CreateMergeRequestNote(pid interface{}, mergeRequest int, opt *CreateMergeRequestNoteOptions, options ...OptionFunc) (*Note, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/merge_requests/%d/notes", url.QueryEscape(project), mergeRequest)
- req, err := s.client.NewRequest("POST", u, opt)
+ req, err := s.client.NewRequest("POST", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -427,19 +396,14 @@ type UpdateMergeRequestNoteOptions struct {
// UpdateMergeRequestNote modifies existing note of a merge request.
//
// https://docs.gitlab.com/ce/api/notes.html#modify-existing-merge-request-note
-func (s *NotesService) UpdateMergeRequestNote(
- pid interface{},
- mergeRequest int,
- note int,
- opt *UpdateMergeRequestNoteOptions) (*Note, *Response, error) {
+func (s *NotesService) UpdateMergeRequestNote(pid interface{}, mergeRequest int, note int, opt *UpdateMergeRequestNoteOptions, options ...OptionFunc) (*Note, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf(
"projects/%s/merge_requests/%d/notes/%d", url.QueryEscape(project), mergeRequest, note)
-
- req, err := s.client.NewRequest("PUT", u, opt)
+ req, err := s.client.NewRequest("PUT", u, opt, options)
if err != nil {
return nil, nil, err
}
diff --git a/vendor/github.com/xanzy/go-gitlab/notifications.go b/vendor/github.com/xanzy/go-gitlab/notifications.go
new file mode 100644
index 0000000..04424c2
--- /dev/null
+++ b/vendor/github.com/xanzy/go-gitlab/notifications.go
@@ -0,0 +1,214 @@
+package gitlab
+
+import (
+ "errors"
+ "fmt"
+ "net/url"
+)
+
+// NotificationSettingsService handles communication with the notification settings
+// related methods of the GitLab API.
+//
+// GitLab API docs: https://docs.gitlab.com/ce/api/notification_settings.html
+type NotificationSettingsService struct {
+ client *Client
+}
+
+// NotificationSettings represents the Gitlab notification setting.
+//
+// GitLab API docs:
+// https://docs.gitlab.com/ce/api/notification_settings.html#notification-settings
+type NotificationSettings struct {
+ Level NotificationLevelValue `json:"level"`
+ NotificationEmail string `json:"notification_email"`
+ Events *NotificationEvents `json:"events"`
+}
+
+// NotificationEvents represents the avialable notification setting events.
+//
+// GitLab API docs:
+// https://docs.gitlab.com/ce/api/notification_settings.html#notification-settings
+type NotificationEvents struct {
+ CloseIssue bool `json:"close_issue"`
+ CloseMergeRequest bool `json:"close_merge_request"`
+ FailedPipeline bool `json:"failed_pipeline"`
+ MergeMergeRequest bool `json:"merge_merge_request"`
+ NewIssue bool `json:"new_issue"`
+ NewMergeRequest bool `json:"new_merge_request"`
+ NewNote bool `json:"new_note"`
+ ReassignIssue bool `json:"reassign_issue"`
+ ReassignMergeRequest bool `json:"reassign_merge_request"`
+ ReopenIssue bool `json:"reopen_issue"`
+ ReopenMergeRequest bool `json:"reopen_merge_request"`
+ SuccessPipeline bool `json:"success_pipeline"`
+}
+
+func (ns NotificationSettings) String() string {
+ return Stringify(ns)
+}
+
+// GetGlobalSettings returns current notification settings and email address.
+//
+// GitLab API docs:
+// https://docs.gitlab.com/ce/api/notification_settings.html#global-notification-settings
+func (s *NotificationSettingsService) GetGlobalSettings(options ...OptionFunc) (*NotificationSettings, *Response, error) {
+ u := "notification_settings"
+
+ req, err := s.client.NewRequest("GET", u, nil, options)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ ns := new(NotificationSettings)
+ resp, err := s.client.Do(req, ns)
+ if err != nil {
+ return nil, resp, err
+ }
+
+ return ns, resp, err
+}
+
+// NotificationSettingsOptions represents the available options that can be passed
+// to the API when updating the notification settings.
+type NotificationSettingsOptions struct {
+ Level *NotificationLevelValue `url:"level,omitempty" json:"level,omitempty"`
+ NotificationEmail *string `url:"notification_email,omitempty" json:"notification_email,omitempty"`
+ CloseIssue *bool `url:"close_issue,omitempty" json:"close_issue,omitempty"`
+ CloseMergeRequest *bool `url:"close_merge_request,omitempty" json:"close_merge_request,omitempty"`
+ FailedPipeline *bool `url:"failed_pipeline,omitempty" json:"failed_pipeline,omitempty"`
+ MergeMergeRequest *bool `url:"merge_merge_request,omitempty" json:"merge_merge_request,omitempty"`
+ NewIssue *bool `url:"new_issue,omitempty" json:"new_issue,omitempty"`
+ NewMergeRequest *bool `url:"new_merge_request,omitempty" json:"new_merge_request,omitempty"`
+ NewNote *bool `url:"new_note,omitempty" json:"new_note,omitempty"`
+ ReassignIssue *bool `url:"reassign_issue,omitempty" json:"reassign_issue,omitempty"`
+ ReassignMergeRequest *bool `url:"reassign_merge_request,omitempty" json:"reassign_merge_request,omitempty"`
+ ReopenIssue *bool `url:"reopen_issue,omitempty" json:"reopen_issue,omitempty"`
+ ReopenMergeRequest *bool `url:"reopen_merge_request,omitempty" json:"reopen_merge_request,omitempty"`
+ SuccessPipeline *bool `url:"success_pipeline,omitempty" json:"success_pipeline,omitempty"`
+}
+
+// UpdateGlobalSettings updates current notification settings and email address.
+//
+// GitLab API docs:
+// https://docs.gitlab.com/ce/api/notification_settings.html#update-global-notification-settings
+func (s *NotificationSettingsService) UpdateGlobalSettings(opt *NotificationSettingsOptions, options ...OptionFunc) (*NotificationSettings, *Response, error) {
+ if opt.Level != nil && *opt.Level == GlobalNotificationLevel {
+ return nil, nil, errors.New(
+ "notification level 'global' is not valid for global notification settings")
+ }
+
+ u := "notification_settings"
+
+ req, err := s.client.NewRequest("PUT", u, opt, options)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ ns := new(NotificationSettings)
+ resp, err := s.client.Do(req, ns)
+ if err != nil {
+ return nil, resp, err
+ }
+
+ return ns, resp, err
+}
+
+// GetSettingsForGroup returns current group notification settings.
+//
+// GitLab API docs:
+// https://docs.gitlab.com/ce/api/notification_settings.html#group-project-level-notification-settings
+func (s *NotificationSettingsService) GetSettingsForGroup(gid interface{}, options ...OptionFunc) (*NotificationSettings, *Response, error) {
+ group, err := parseID(gid)
+ if err != nil {
+ return nil, nil, err
+ }
+ u := fmt.Sprintf("groups/%s/notification_settings", url.QueryEscape(group))
+
+ req, err := s.client.NewRequest("GET", u, nil, options)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ ns := new(NotificationSettings)
+ resp, err := s.client.Do(req, ns)
+ if err != nil {
+ return nil, resp, err
+ }
+
+ return ns, resp, err
+}
+
+// GetSettingsForProject returns current project notification settings.
+//
+// GitLab API docs:
+// https://docs.gitlab.com/ce/api/notification_settings.html#group-project-level-notification-settings
+func (s *NotificationSettingsService) GetSettingsForProject(pid interface{}, options ...OptionFunc) (*NotificationSettings, *Response, error) {
+ project, err := parseID(pid)
+ if err != nil {
+ return nil, nil, err
+ }
+ u := fmt.Sprintf("projects/%s/notification_settings", url.QueryEscape(project))
+
+ req, err := s.client.NewRequest("GET", u, nil, options)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ ns := new(NotificationSettings)
+ resp, err := s.client.Do(req, ns)
+ if err != nil {
+ return nil, resp, err
+ }
+
+ return ns, resp, err
+}
+
+// UpdateSettingsForGroup updates current group notification settings.
+//
+// GitLab API docs:
+// https://docs.gitlab.com/ce/api/notification_settings.html#update-group-project-level-notification-settings
+func (s *NotificationSettingsService) UpdateSettingsForGroup(gid interface{}, opt *NotificationSettingsOptions, options ...OptionFunc) (*NotificationSettings, *Response, error) {
+ group, err := parseID(gid)
+ if err != nil {
+ return nil, nil, err
+ }
+ u := fmt.Sprintf("groups/%s/notification_settings", url.QueryEscape(group))
+
+ req, err := s.client.NewRequest("PUT", u, opt, options)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ ns := new(NotificationSettings)
+ resp, err := s.client.Do(req, ns)
+ if err != nil {
+ return nil, resp, err
+ }
+
+ return ns, resp, err
+}
+
+// UpdateSettingsForProject updates current project notification settings.
+//
+// GitLab API docs:
+// https://docs.gitlab.com/ce/api/notification_settings.html#update-group-project-level-notification-settings
+func (s *NotificationSettingsService) UpdateSettingsForProject(pid interface{}, opt *NotificationSettingsOptions, options ...OptionFunc) (*NotificationSettings, *Response, error) {
+ project, err := parseID(pid)
+ if err != nil {
+ return nil, nil, err
+ }
+ u := fmt.Sprintf("projects/%s/notification_settings", url.QueryEscape(project))
+
+ req, err := s.client.NewRequest("PUT", u, opt, options)
+ if err != nil {
+ return nil, nil, err
+ }
+
+ ns := new(NotificationSettings)
+ resp, err := s.client.Do(req, ns)
+ if err != nil {
+ return nil, resp, err
+ }
+
+ return ns, resp, err
+}
diff --git a/vendor/github.com/xanzy/go-gitlab/pipelines.go b/vendor/github.com/xanzy/go-gitlab/pipelines.go
index 45ac968..4ade3fc 100644
--- a/vendor/github.com/xanzy/go-gitlab/pipelines.go
+++ b/vendor/github.com/xanzy/go-gitlab/pipelines.go
@@ -13,6 +13,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
+
package gitlab
import (
@@ -46,7 +47,7 @@ type Pipeline struct {
ID int `json:"id"`
State string `json:"state"`
AvatarURL string `json:"avatar_url"`
- WebUrl string `json:"web_url"`
+ WebURL string `json:"web_url"`
}
UpdatedAt *time.Time `json:"updated_at"`
CreatedAt *time.Time `json:"created_at"`
@@ -64,14 +65,14 @@ func (i Pipeline) String() string {
// ListProjectPipelines gets a list of project piplines.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/pipelines.html#list-project-pipelines
-func (s *PipelinesService) ListProjectPipelines(pid interface{}) ([]*Pipeline, *Response, error) {
+func (s *PipelinesService) ListProjectPipelines(pid interface{}, options ...OptionFunc) ([]*Pipeline, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/pipelines", url.QueryEscape(project))
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -87,14 +88,14 @@ func (s *PipelinesService) ListProjectPipelines(pid interface{}) ([]*Pipeline, *
// GetPipeline gets a single project pipeline.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/pipelines.html#get-a-single-pipeline
-func (s *PipelinesService) GetPipeline(pid interface{}, pipeline int) (*Pipeline, *Response, error) {
+func (s *PipelinesService) GetPipeline(pid interface{}, pipeline int, options ...OptionFunc) (*Pipeline, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/pipelines/%d", url.QueryEscape(project), pipeline)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -118,14 +119,14 @@ type CreatePipelineOptions struct {
// CreatePipeline creates a new project pipeline.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/pipelines.html#create-a-new-pipeline
-func (s *PipelinesService) CreatePipeline(pid interface{}, opt *CreatePipelineOptions) (*Pipeline, *Response, error) {
+func (s *PipelinesService) CreatePipeline(pid interface{}, opt *CreatePipelineOptions, options ...OptionFunc) (*Pipeline, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/pipeline", url.QueryEscape(project))
- req, err := s.client.NewRequest("POST", u, opt)
+ req, err := s.client.NewRequest("POST", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -143,14 +144,14 @@ func (s *PipelinesService) CreatePipeline(pid interface{}, opt *CreatePipelineOp
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/pipelines.html#retry-failed-builds-in-a-pipeline
-func (s *PipelinesService) RetryPipelineBuild(pid interface{}, pipelineID int) (*Pipeline, *Response, error) {
+func (s *PipelinesService) RetryPipelineBuild(pid interface{}, pipelineID int, options ...OptionFunc) (*Pipeline, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/pipelines/%d/retry", project, pipelineID)
- req, err := s.client.NewRequest("POST", u, nil)
+ req, err := s.client.NewRequest("POST", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -168,14 +169,14 @@ func (s *PipelinesService) RetryPipelineBuild(pid interface{}, pipelineID int) (
//
// GitLab API docs:
//https://docs.gitlab.com/ce/api/pipelines.html#cancel-a-pipelines-builds
-func (s *PipelinesService) CancelPipelineBuild(pid interface{}, pipelineID int) (*Pipeline, *Response, error) {
+func (s *PipelinesService) CancelPipelineBuild(pid interface{}, pipelineID int, options ...OptionFunc) (*Pipeline, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/pipelines/%d/cancel", project, pipelineID)
- req, err := s.client.NewRequest("POST", u, nil)
+ req, err := s.client.NewRequest("POST", u, nil, options)
if err != nil {
return nil, nil, err
}
diff --git a/vendor/github.com/xanzy/go-gitlab/project_snippets.go b/vendor/github.com/xanzy/go-gitlab/project_snippets.go
index 6716b5c..65dab67 100644
--- a/vendor/github.com/xanzy/go-gitlab/project_snippets.go
+++ b/vendor/github.com/xanzy/go-gitlab/project_snippets.go
@@ -65,16 +65,14 @@ type ListSnippetsOptions struct {
// ListSnippets gets a list of project snippets.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/project_snippets.html#list-snippets
-func (s *ProjectSnippetsService) ListSnippets(
- pid interface{},
- opt *ListSnippetsOptions) ([]*Snippet, *Response, error) {
+func (s *ProjectSnippetsService) ListSnippets(pid interface{}, opt *ListSnippetsOptions, options ...OptionFunc) ([]*Snippet, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/snippets", url.QueryEscape(project))
- req, err := s.client.NewRequest("GET", u, opt)
+ req, err := s.client.NewRequest("GET", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -92,16 +90,14 @@ func (s *ProjectSnippetsService) ListSnippets(
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/project_snippets.html#single-snippet
-func (s *ProjectSnippetsService) GetSnippet(
- pid interface{},
- snippet int) (*Snippet, *Response, error) {
+func (s *ProjectSnippetsService) GetSnippet(pid interface{}, snippet int, options ...OptionFunc) (*Snippet, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/snippets/%d", url.QueryEscape(project), snippet)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -131,16 +127,14 @@ type CreateSnippetOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/project_snippets.html#create-new-snippet
-func (s *ProjectSnippetsService) CreateSnippet(
- pid interface{},
- opt *CreateSnippetOptions) (*Snippet, *Response, error) {
+func (s *ProjectSnippetsService) CreateSnippet(pid interface{}, opt *CreateSnippetOptions, options ...OptionFunc) (*Snippet, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/snippets", url.QueryEscape(project))
- req, err := s.client.NewRequest("POST", u, opt)
+ req, err := s.client.NewRequest("POST", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -170,17 +164,14 @@ type UpdateSnippetOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/project_snippets.html#update-snippet
-func (s *ProjectSnippetsService) UpdateSnippet(
- pid interface{},
- snippet int,
- opt *UpdateSnippetOptions) (*Snippet, *Response, error) {
+func (s *ProjectSnippetsService) UpdateSnippet(pid interface{}, snippet int, opt *UpdateSnippetOptions, options ...OptionFunc) (*Snippet, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/snippets/%d", url.QueryEscape(project), snippet)
- req, err := s.client.NewRequest("PUT", u, opt)
+ req, err := s.client.NewRequest("PUT", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -200,14 +191,14 @@ func (s *ProjectSnippetsService) UpdateSnippet(
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/project_snippets.html#delete-snippet
-func (s *ProjectSnippetsService) DeleteSnippet(pid interface{}, snippet int) (*Response, error) {
+func (s *ProjectSnippetsService) DeleteSnippet(pid interface{}, snippet int, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, err
}
u := fmt.Sprintf("projects/%s/snippets/%d", url.QueryEscape(project), snippet)
- req, err := s.client.NewRequest("DELETE", u, nil)
+ req, err := s.client.NewRequest("DELETE", u, nil, options)
if err != nil {
return nil, err
}
@@ -219,16 +210,14 @@ func (s *ProjectSnippetsService) DeleteSnippet(pid interface{}, snippet int) (*R
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/project_snippets.html#snippet-content
-func (s *ProjectSnippetsService) SnippetContent(
- pid interface{},
- snippet int) ([]byte, *Response, error) {
+func (s *ProjectSnippetsService) SnippetContent(pid interface{}, snippet int, options ...OptionFunc) ([]byte, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/snippets/%d/raw", url.QueryEscape(project), snippet)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
diff --git a/vendor/github.com/xanzy/go-gitlab/projects.go b/vendor/github.com/xanzy/go-gitlab/projects.go
index c0a64d8..86cd0d3 100644
--- a/vendor/github.com/xanzy/go-gitlab/projects.go
+++ b/vendor/github.com/xanzy/go-gitlab/projects.go
@@ -146,8 +146,8 @@ type ListProjectsOptions struct {
// ListProjects gets a list of projects accessible by the authenticated user.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#list-projects
-func (s *ProjectsService) ListProjects(opt *ListProjectsOptions) ([]*Project, *Response, error) {
- req, err := s.client.NewRequest("GET", "projects", opt)
+func (s *ProjectsService) ListProjects(opt *ListProjectsOptions, options ...OptionFunc) ([]*Project, *Response, error) {
+ req, err := s.client.NewRequest("GET", "projects", opt, options)
if err != nil {
return nil, nil, err
}
@@ -166,9 +166,8 @@ func (s *ProjectsService) ListProjects(opt *ListProjectsOptions) ([]*Project, *R
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/projects.html#list-owned-projects
-func (s *ProjectsService) ListOwnedProjects(
- opt *ListProjectsOptions) ([]*Project, *Response, error) {
- req, err := s.client.NewRequest("GET", "projects/owned", opt)
+func (s *ProjectsService) ListOwnedProjects(opt *ListProjectsOptions, options ...OptionFunc) ([]*Project, *Response, error) {
+ req, err := s.client.NewRequest("GET", "projects/owned", opt, options)
if err != nil {
return nil, nil, err
}
@@ -187,9 +186,8 @@ func (s *ProjectsService) ListOwnedProjects(
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/projects.html#list-starred-projects
-func (s *ProjectsService) ListStarredProjects(
- opt *ListProjectsOptions) ([]*Project, *Response, error) {
- req, err := s.client.NewRequest("GET", "projects/starred", opt)
+func (s *ProjectsService) ListStarredProjects(opt *ListProjectsOptions, options ...OptionFunc) ([]*Project, *Response, error) {
+ req, err := s.client.NewRequest("GET", "projects/starred", opt, options)
if err != nil {
return nil, nil, err
}
@@ -207,8 +205,8 @@ func (s *ProjectsService) ListStarredProjects(
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/projects.html#list-all-projects
-func (s *ProjectsService) ListAllProjects(opt *ListProjectsOptions) ([]*Project, *Response, error) {
- req, err := s.client.NewRequest("GET", "projects/all", opt)
+func (s *ProjectsService) ListAllProjects(opt *ListProjectsOptions, options ...OptionFunc) ([]*Project, *Response, error) {
+ req, err := s.client.NewRequest("GET", "projects/all", opt, options)
if err != nil {
return nil, nil, err
}
@@ -227,14 +225,14 @@ func (s *ProjectsService) ListAllProjects(opt *ListProjectsOptions) ([]*Project,
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/projects.html#get-single-project
-func (s *ProjectsService) GetProject(pid interface{}) (*Project, *Response, error) {
+func (s *ProjectsService) GetProject(pid interface{}, options ...OptionFunc) (*Project, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s", url.QueryEscape(project))
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -263,12 +261,10 @@ type SearchProjectsOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/projects.html#search-for-projects-by-name
-func (s *ProjectsService) SearchProjects(
- query string,
- opt *SearchProjectsOptions) ([]*Project, *Response, error) {
+func (s *ProjectsService) SearchProjects(query string, opt *SearchProjectsOptions, options ...OptionFunc) ([]*Project, *Response, error) {
u := fmt.Sprintf("projects/search/%s", query)
- req, err := s.client.NewRequest("GET", u, opt)
+ req, err := s.client.NewRequest("GET", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -324,16 +320,14 @@ type GetProjectEventsOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/projects.html#get-project-events
-func (s *ProjectsService) GetProjectEvents(
- pid interface{},
- opt *GetProjectEventsOptions) ([]*ProjectEvent, *Response, error) {
+func (s *ProjectsService) GetProjectEvents(pid interface{}, opt *GetProjectEventsOptions, options ...OptionFunc) ([]*ProjectEvent, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/events", url.QueryEscape(project))
- req, err := s.client.NewRequest("GET", u, opt)
+ req, err := s.client.NewRequest("GET", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -374,9 +368,8 @@ type CreateProjectOptions struct {
// CreateProject creates a new project owned by the authenticated user.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#create-project
-func (s *ProjectsService) CreateProject(
- opt *CreateProjectOptions) (*Project, *Response, error) {
- req, err := s.client.NewRequest("POST", "projects", opt)
+func (s *ProjectsService) CreateProject(opt *CreateProjectOptions, options ...OptionFunc) (*Project, *Response, error) {
+ req, err := s.client.NewRequest("POST", "projects", opt, options)
if err != nil {
return nil, nil, err
}
@@ -413,12 +406,10 @@ type CreateProjectForUserOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/projects.html#create-project-for-user
-func (s *ProjectsService) CreateProjectForUser(
- user int,
- opt *CreateProjectForUserOptions) (*Project, *Response, error) {
+func (s *ProjectsService) CreateProjectForUser(user int, opt *CreateProjectForUserOptions, options ...OptionFunc) (*Project, *Response, error) {
u := fmt.Sprintf("projects/user/%d", user)
- req, err := s.client.NewRequest("POST", u, opt)
+ req, err := s.client.NewRequest("POST", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -461,16 +452,14 @@ type EditProjectOptions struct {
// EditProject updates an existing project.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#edit-project
-func (s *ProjectsService) EditProject(
- pid interface{},
- opt *EditProjectOptions) (*Project, *Response, error) {
+func (s *ProjectsService) EditProject(pid interface{}, opt *EditProjectOptions, options ...OptionFunc) (*Project, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s", url.QueryEscape(project))
- req, err := s.client.NewRequest("PUT", u, opt)
+ req, err := s.client.NewRequest("PUT", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -488,14 +477,14 @@ func (s *ProjectsService) EditProject(
// user.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#fork-project
-func (s *ProjectsService) ForkProject(pid interface{}) (*Project, *Response, error) {
+func (s *ProjectsService) ForkProject(pid interface{}, options ...OptionFunc) (*Project, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/fork/%s", url.QueryEscape(project))
- req, err := s.client.NewRequest("POST", u, nil)
+ req, err := s.client.NewRequest("POST", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -513,14 +502,14 @@ func (s *ProjectsService) ForkProject(pid interface{}) (*Project, *Response, err
// (issues, merge requests etc.)
//
// GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#remove-project
-func (s *ProjectsService) DeleteProject(pid interface{}) (*Response, error) {
+func (s *ProjectsService) DeleteProject(pid interface{}, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, err
}
u := fmt.Sprintf("projects/%s", url.QueryEscape(project))
- req, err := s.client.NewRequest("DELETE", u, nil)
+ req, err := s.client.NewRequest("DELETE", u, nil, options)
if err != nil {
return nil, err
}
@@ -556,16 +545,14 @@ type ListProjectMembersOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/projects.html#list-project-team-members
-func (s *ProjectsService) ListProjectMembers(
- pid interface{},
- opt *ListProjectMembersOptions) ([]*ProjectMember, *Response, error) {
+func (s *ProjectsService) ListProjectMembers(pid interface{}, opt *ListProjectMembersOptions, options ...OptionFunc) ([]*ProjectMember, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/members", url.QueryEscape(project))
- req, err := s.client.NewRequest("GET", u, opt)
+ req, err := s.client.NewRequest("GET", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -583,16 +570,14 @@ func (s *ProjectsService) ListProjectMembers(
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/projects.html#get-project-team-member
-func (s *ProjectsService) GetProjectMember(
- pid interface{},
- user int) (*ProjectMember, *Response, error) {
+func (s *ProjectsService) GetProjectMember(pid interface{}, user int, options ...OptionFunc) (*ProjectMember, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/members/%d", url.QueryEscape(project), user)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -622,16 +607,14 @@ type AddProjectMemberOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/projects.html#add-project-team-member
-func (s *ProjectsService) AddProjectMember(
- pid interface{},
- opt *AddProjectMemberOptions) (*ProjectMember, *Response, error) {
+func (s *ProjectsService) AddProjectMember(pid interface{}, opt *AddProjectMemberOptions, options ...OptionFunc) (*ProjectMember, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/members", url.QueryEscape(project))
- req, err := s.client.NewRequest("POST", u, opt)
+ req, err := s.client.NewRequest("POST", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -657,17 +640,14 @@ type EditProjectMemberOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/projects.html#edit-project-team-member
-func (s *ProjectsService) EditProjectMember(
- pid interface{},
- user int,
- opt *EditProjectMemberOptions) (*ProjectMember, *Response, error) {
+func (s *ProjectsService) EditProjectMember(pid interface{}, user int, opt *EditProjectMemberOptions, options ...OptionFunc) (*ProjectMember, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/members/%d", url.QueryEscape(project), user)
- req, err := s.client.NewRequest("PUT", u, opt)
+ req, err := s.client.NewRequest("PUT", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -685,14 +665,14 @@ func (s *ProjectsService) EditProjectMember(
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/projects.html#remove-project-team-member
-func (s *ProjectsService) DeleteProjectMember(pid interface{}, user int) (*Response, error) {
+func (s *ProjectsService) DeleteProjectMember(pid interface{}, user int, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, err
}
u := fmt.Sprintf("projects/%s/members/%d", url.QueryEscape(project), user)
- req, err := s.client.NewRequest("DELETE", u, nil)
+ req, err := s.client.NewRequest("DELETE", u, nil, options)
if err != nil {
return nil, err
}
@@ -731,16 +711,14 @@ type ListProjectHooksOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/projects.html#list-project-hooks
-func (s *ProjectsService) ListProjectHooks(
- pid interface{},
- opt *ListProjectHooksOptions) ([]*ProjectHook, *Response, error) {
+func (s *ProjectsService) ListProjectHooks(pid interface{}, opt *ListProjectHooksOptions, options ...OptionFunc) ([]*ProjectHook, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/hooks", url.QueryEscape(project))
- req, err := s.client.NewRequest("GET", u, opt)
+ req, err := s.client.NewRequest("GET", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -758,16 +736,14 @@ func (s *ProjectsService) ListProjectHooks(
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/projects.html#get-project-hook
-func (s *ProjectsService) GetProjectHook(
- pid interface{},
- hook int) (*ProjectHook, *Response, error) {
+func (s *ProjectsService) GetProjectHook(pid interface{}, hook int, options ...OptionFunc) (*ProjectHook, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/hooks/%d", url.QueryEscape(project), hook)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -803,16 +779,14 @@ type AddProjectHookOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/projects.html#add-project-hook
-func (s *ProjectsService) AddProjectHook(
- pid interface{},
- opt *AddProjectHookOptions) (*ProjectHook, *Response, error) {
+func (s *ProjectsService) AddProjectHook(pid interface{}, opt *AddProjectHookOptions, options ...OptionFunc) (*ProjectHook, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/hooks", url.QueryEscape(project))
- req, err := s.client.NewRequest("POST", u, opt)
+ req, err := s.client.NewRequest("POST", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -848,17 +822,14 @@ type EditProjectHookOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/projects.html#edit-project-hook
-func (s *ProjectsService) EditProjectHook(
- pid interface{},
- hook int,
- opt *EditProjectHookOptions) (*ProjectHook, *Response, error) {
+func (s *ProjectsService) EditProjectHook(pid interface{}, hook int, opt *EditProjectHookOptions, options ...OptionFunc) (*ProjectHook, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/hooks/%d", url.QueryEscape(project), hook)
- req, err := s.client.NewRequest("PUT", u, opt)
+ req, err := s.client.NewRequest("PUT", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -877,14 +848,14 @@ func (s *ProjectsService) EditProjectHook(
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/projects.html#delete-project-hook
-func (s *ProjectsService) DeleteProjectHook(pid interface{}, hook int) (*Response, error) {
+func (s *ProjectsService) DeleteProjectHook(pid interface{}, hook int, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, err
}
u := fmt.Sprintf("projects/%s/hooks/%d", url.QueryEscape(project), hook)
- req, err := s.client.NewRequest("DELETE", u, nil)
+ req, err := s.client.NewRequest("DELETE", u, nil, options)
if err != nil {
return nil, err
}
@@ -909,12 +880,10 @@ type ProjectForkRelation struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/projects.html#create-a-forked-fromto-relation-between-existing-projects.
-func (s *ProjectsService) CreateProjectForkRelation(
- pid int,
- fork int) (*ProjectForkRelation, *Response, error) {
+func (s *ProjectsService) CreateProjectForkRelation(pid int, fork int, options ...OptionFunc) (*ProjectForkRelation, *Response, error) {
u := fmt.Sprintf("projects/%d/fork/%d", pid, fork)
- req, err := s.client.NewRequest("POST", u, nil)
+ req, err := s.client.NewRequest("POST", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -932,10 +901,10 @@ func (s *ProjectsService) CreateProjectForkRelation(
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/projects.html#delete-an-existing-forked-from-relationship
-func (s *ProjectsService) DeleteProjectForkRelation(pid int) (*Response, error) {
+func (s *ProjectsService) DeleteProjectForkRelation(pid int, options ...OptionFunc) (*Response, error) {
u := fmt.Sprintf("projects/%d/fork", pid)
- req, err := s.client.NewRequest("DELETE", u, nil)
+ req, err := s.client.NewRequest("DELETE", u, nil, options)
if err != nil {
return nil, err
}
@@ -948,14 +917,14 @@ func (s *ProjectsService) DeleteProjectForkRelation(pid int) (*Response, error)
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/projects.html#archive-a-project
-func (s *ProjectsService) ArchiveProject(pid interface{}) (*Project, *Response, error) {
+func (s *ProjectsService) ArchiveProject(pid interface{}, options ...OptionFunc) (*Project, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/archive", url.QueryEscape(project))
- req, err := s.client.NewRequest("POST", u, nil)
+ req, err := s.client.NewRequest("POST", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -974,14 +943,14 @@ func (s *ProjectsService) ArchiveProject(pid interface{}) (*Project, *Response,
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/projects.html#unarchive-a-project
-func (s *ProjectsService) UnarchiveProject(pid interface{}) (*Project, *Response, error) {
+func (s *ProjectsService) UnarchiveProject(pid interface{}, options ...OptionFunc) (*Project, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/unarchive", url.QueryEscape(project))
- req, err := s.client.NewRequest("POST", u, nil)
+ req, err := s.client.NewRequest("POST", u, nil, options)
if err != nil {
return nil, nil, err
}
diff --git a/vendor/github.com/xanzy/go-gitlab/repositories.go b/vendor/github.com/xanzy/go-gitlab/repositories.go
index df2d10c..aa1052f 100644
--- a/vendor/github.com/xanzy/go-gitlab/repositories.go
+++ b/vendor/github.com/xanzy/go-gitlab/repositories.go
@@ -57,16 +57,14 @@ type ListTreeOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/repositories.html#list-repository-tree
-func (s *RepositoriesService) ListTree(
- pid interface{},
- opt *ListTreeOptions) ([]*TreeNode, *Response, error) {
+func (s *RepositoriesService) ListTree(pid interface{}, opt *ListTreeOptions, options ...OptionFunc) ([]*TreeNode, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/repository/tree", url.QueryEscape(project))
- req, err := s.client.NewRequest("GET", u, opt)
+ req, err := s.client.NewRequest("GET", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -92,17 +90,14 @@ type RawFileContentOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/repositories.html#raw-file-content
-func (s *RepositoriesService) RawFileContent(
- pid interface{},
- sha string,
- opt *RawFileContentOptions) ([]byte, *Response, error) {
+func (s *RepositoriesService) RawFileContent(pid interface{}, sha string, opt *RawFileContentOptions, options ...OptionFunc) ([]byte, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/repository/blobs/%s", url.QueryEscape(project), sha)
- req, err := s.client.NewRequest("GET", u, opt)
+ req, err := s.client.NewRequest("GET", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -120,16 +115,14 @@ func (s *RepositoriesService) RawFileContent(
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/repositories.html#raw-blob-content
-func (s *RepositoriesService) RawBlobContent(
- pid interface{},
- sha string) ([]byte, *Response, error) {
+func (s *RepositoriesService) RawBlobContent(pid interface{}, sha string, options ...OptionFunc) ([]byte, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/repository/raw_blobs/%s", url.QueryEscape(project), sha)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -155,16 +148,14 @@ type ArchiveOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/repositories.html#get-file-archive
-func (s *RepositoriesService) Archive(
- pid interface{},
- opt *ArchiveOptions) ([]byte, *Response, error) {
+func (s *RepositoriesService) Archive(pid interface{}, opt *ArchiveOptions, options ...OptionFunc) ([]byte, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/repository/archive", url.QueryEscape(project))
- req, err := s.client.NewRequest("GET", u, opt)
+ req, err := s.client.NewRequest("GET", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -207,16 +198,14 @@ type CompareOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/repositories.html#compare-branches-tags-or-commits
-func (s *RepositoriesService) Compare(
- pid interface{},
- opt *CompareOptions) (*Compare, *Response, error) {
+func (s *RepositoriesService) Compare(pid interface{}, opt *CompareOptions, options ...OptionFunc) (*Compare, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/repository/compare", url.QueryEscape(project))
- req, err := s.client.NewRequest("GET", u, opt)
+ req, err := s.client.NewRequest("GET", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -248,14 +237,14 @@ func (c Contributor) String() string {
// Contributors gets the repository contributors list.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/repositories.html#contributer
-func (s *RepositoriesService) Contributors(pid interface{}) ([]*Contributor, *Response, error) {
+func (s *RepositoriesService) Contributors(pid interface{}, options ...OptionFunc) ([]*Contributor, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/repository/contributors", url.QueryEscape(project))
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
diff --git a/vendor/github.com/xanzy/go-gitlab/repository_files.go b/vendor/github.com/xanzy/go-gitlab/repository_files.go
index dbd77f4..21e5f65 100644
--- a/vendor/github.com/xanzy/go-gitlab/repository_files.go
+++ b/vendor/github.com/xanzy/go-gitlab/repository_files.go
@@ -61,16 +61,14 @@ type GetFileOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/repository_files.html#get-file-from-respository
-func (s *RepositoryFilesService) GetFile(
- pid interface{},
- opt *GetFileOptions) (*File, *Response, error) {
+func (s *RepositoryFilesService) GetFile(pid interface{}, opt *GetFileOptions, options ...OptionFunc) (*File, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/repository/files", url.QueryEscape(project))
- req, err := s.client.NewRequest("GET", u, opt)
+ req, err := s.client.NewRequest("GET", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -114,16 +112,14 @@ type CreateFileOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/repository_files.html#create-new-file-in-repository
-func (s *RepositoryFilesService) CreateFile(
- pid interface{},
- opt *CreateFileOptions) (*FileInfo, *Response, error) {
+func (s *RepositoryFilesService) CreateFile(pid interface{}, opt *CreateFileOptions, options ...OptionFunc) (*FileInfo, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/repository/files", url.QueryEscape(project))
- req, err := s.client.NewRequest("POST", u, opt)
+ req, err := s.client.NewRequest("POST", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -155,16 +151,14 @@ type UpdateFileOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/repository_files.html#update-existing-file-in-repository
-func (s *RepositoryFilesService) UpdateFile(
- pid interface{},
- opt *UpdateFileOptions) (*FileInfo, *Response, error) {
+func (s *RepositoryFilesService) UpdateFile(pid interface{}, opt *UpdateFileOptions, options ...OptionFunc) (*FileInfo, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/repository/files", url.QueryEscape(project))
- req, err := s.client.NewRequest("PUT", u, opt)
+ req, err := s.client.NewRequest("PUT", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -194,16 +188,14 @@ type DeleteFileOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/repository_files.html#delete-existing-file-in-repository
-func (s *RepositoryFilesService) DeleteFile(
- pid interface{},
- opt *DeleteFileOptions) (*FileInfo, *Response, error) {
+func (s *RepositoryFilesService) DeleteFile(pid interface{}, opt *DeleteFileOptions, options ...OptionFunc) (*FileInfo, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/repository/files", url.QueryEscape(project))
- req, err := s.client.NewRequest("DELETE", u, opt)
+ req, err := s.client.NewRequest("DELETE", u, opt, options)
if err != nil {
return nil, nil, err
}
diff --git a/vendor/github.com/xanzy/go-gitlab/services.go b/vendor/github.com/xanzy/go-gitlab/services.go
index a2a80ac..dbcdf84 100644
--- a/vendor/github.com/xanzy/go-gitlab/services.go
+++ b/vendor/github.com/xanzy/go-gitlab/services.go
@@ -60,16 +60,14 @@ type SetGitLabCIServiceOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/services.html#edit-gitlab-ci-service
-func (s *ServicesService) SetGitLabCIService(
- pid interface{},
- opt *SetGitLabCIServiceOptions) (*Response, error) {
+func (s *ServicesService) SetGitLabCIService(pid interface{}, opt *SetGitLabCIServiceOptions, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, err
}
u := fmt.Sprintf("projects/%s/services/gitlab-ci", url.QueryEscape(project))
- req, err := s.client.NewRequest("PUT", u, opt)
+ req, err := s.client.NewRequest("PUT", u, opt, options)
if err != nil {
return nil, err
}
@@ -81,14 +79,14 @@ func (s *ServicesService) SetGitLabCIService(
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/services.html#delete-gitlab-ci-service
-func (s *ServicesService) DeleteGitLabCIService(pid interface{}) (*Response, error) {
+func (s *ServicesService) DeleteGitLabCIService(pid interface{}, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, err
}
u := fmt.Sprintf("projects/%s/services/gitlab-ci", url.QueryEscape(project))
- req, err := s.client.NewRequest("DELETE", u, nil)
+ req, err := s.client.NewRequest("DELETE", u, nil, options)
if err != nil {
return nil, err
}
@@ -110,16 +108,14 @@ type SetHipChatServiceOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/services.html#edit-hipchat-service
-func (s *ServicesService) SetHipChatService(
- pid interface{},
- opt *SetHipChatServiceOptions) (*Response, error) {
+func (s *ServicesService) SetHipChatService(pid interface{}, opt *SetHipChatServiceOptions, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, err
}
u := fmt.Sprintf("projects/%s/services/hipchat", url.QueryEscape(project))
- req, err := s.client.NewRequest("PUT", u, opt)
+ req, err := s.client.NewRequest("PUT", u, opt, options)
if err != nil {
return nil, err
}
@@ -131,14 +127,14 @@ func (s *ServicesService) SetHipChatService(
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/services.html#delete-hipchat-service
-func (s *ServicesService) DeleteHipChatService(pid interface{}) (*Response, error) {
+func (s *ServicesService) DeleteHipChatService(pid interface{}, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, err
}
u := fmt.Sprintf("projects/%s/services/hipchat", url.QueryEscape(project))
- req, err := s.client.NewRequest("DELETE", u, nil)
+ req, err := s.client.NewRequest("DELETE", u, nil, options)
if err != nil {
return nil, err
}
@@ -161,16 +157,14 @@ type SetDroneCIServiceOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/services.html#createedit-drone-ci-service
-func (s *ServicesService) SetDroneCIService(
- pid interface{},
- opt *SetDroneCIServiceOptions) (*Response, error) {
+func (s *ServicesService) SetDroneCIService(pid interface{}, opt *SetDroneCIServiceOptions, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, err
}
u := fmt.Sprintf("projects/%s/services/drone-ci", url.QueryEscape(project))
- req, err := s.client.NewRequest("PUT", u, opt)
+ req, err := s.client.NewRequest("PUT", u, opt, options)
if err != nil {
return nil, err
}
@@ -182,14 +176,14 @@ func (s *ServicesService) SetDroneCIService(
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/services.html#delete-drone-ci-service
-func (s *ServicesService) DeleteDroneCIService(pid interface{}) (*Response, error) {
+func (s *ServicesService) DeleteDroneCIService(pid interface{}, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, err
}
u := fmt.Sprintf("projects/%s/services/drone-ci", url.QueryEscape(project))
- req, err := s.client.NewRequest("DELETE", u, nil)
+ req, err := s.client.NewRequest("DELETE", u, nil, options)
if err != nil {
return nil, err
}
@@ -214,14 +208,14 @@ type DroneCIService struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/services.html#get-drone-ci-service-settings
-func (s *ServicesService) GetDroneCIService(pid interface{}) (*DroneCIService, *Response, error) {
+func (s *ServicesService) GetDroneCIService(pid interface{}, options ...OptionFunc) (*DroneCIService, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/services/drone-ci", url.QueryEscape(project))
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -250,16 +244,14 @@ type SetSlackServiceOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/services.html#edit-slack-service
-func (s *ServicesService) SetSlackService(
- pid interface{},
- opt *SetSlackServiceOptions) (*Response, error) {
+func (s *ServicesService) SetSlackService(pid interface{}, opt *SetSlackServiceOptions, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, err
}
u := fmt.Sprintf("projects/%s/services/slack", url.QueryEscape(project))
- req, err := s.client.NewRequest("PUT", u, opt)
+ req, err := s.client.NewRequest("PUT", u, opt, options)
if err != nil {
return nil, err
}
@@ -271,14 +263,14 @@ func (s *ServicesService) SetSlackService(
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/services.html#delete-slack-service
-func (s *ServicesService) DeleteSlackService(pid interface{}) (*Response, error) {
+func (s *ServicesService) DeleteSlackService(pid interface{}, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, err
}
u := fmt.Sprintf("projects/%s/services/slack", url.QueryEscape(project))
- req, err := s.client.NewRequest("DELETE", u, nil)
+ req, err := s.client.NewRequest("DELETE", u, nil, options)
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/xanzy/go-gitlab/session.go b/vendor/github.com/xanzy/go-gitlab/session.go
index efe0169..571483c 100644
--- a/vendor/github.com/xanzy/go-gitlab/session.go
+++ b/vendor/github.com/xanzy/go-gitlab/session.go
@@ -62,8 +62,8 @@ type GetSessionOptions struct {
// GetSession logs in to get private token.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/session.html#session
-func (s *SessionService) GetSession(opt *GetSessionOptions) (*Session, *Response, error) {
- req, err := s.client.NewRequest("POST", "session", opt)
+func (s *SessionService) GetSession(opt *GetSessionOptions, options ...OptionFunc) (*Session, *Response, error) {
+ req, err := s.client.NewRequest("POST", "session", opt, options)
if err != nil {
return nil, nil, err
}
diff --git a/vendor/github.com/xanzy/go-gitlab/settings.go b/vendor/github.com/xanzy/go-gitlab/settings.go
index cbb5523..41e9c9d 100644
--- a/vendor/github.com/xanzy/go-gitlab/settings.go
+++ b/vendor/github.com/xanzy/go-gitlab/settings.go
@@ -59,8 +59,8 @@ func (s Settings) String() string {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/settings.html#get-current-application.settings
-func (s *SettingsService) GetSettings() (*Settings, *Response, error) {
- req, err := s.client.NewRequest("GET", "application/settings", nil)
+func (s *SettingsService) GetSettings(options ...OptionFunc) (*Settings, *Response, error) {
+ req, err := s.client.NewRequest("GET", "application/settings", nil, options)
if err != nil {
return nil, nil, err
}
@@ -101,8 +101,8 @@ type UpdateSettingsOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/settings.html#change-application.settings
-func (s *SettingsService) UpdateSettings(opt *UpdateSettingsOptions) (*Settings, *Response, error) {
- req, err := s.client.NewRequest("PUT", "application/settings", opt)
+func (s *SettingsService) UpdateSettings(opt *UpdateSettingsOptions, options ...OptionFunc) (*Settings, *Response, error) {
+ req, err := s.client.NewRequest("PUT", "application/settings", opt, options)
if err != nil {
return nil, nil, err
}
diff --git a/vendor/github.com/xanzy/go-gitlab/system_hooks.go b/vendor/github.com/xanzy/go-gitlab/system_hooks.go
index 48e052a..20277a9 100644
--- a/vendor/github.com/xanzy/go-gitlab/system_hooks.go
+++ b/vendor/github.com/xanzy/go-gitlab/system_hooks.go
@@ -46,8 +46,8 @@ func (h Hook) String() string {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/system_hooks.html#list-system-hooks
-func (s *SystemHooksService) ListHooks() ([]*Hook, *Response, error) {
- req, err := s.client.NewRequest("GET", "hooks", nil)
+func (s *SystemHooksService) ListHooks(options ...OptionFunc) ([]*Hook, *Response, error) {
+ req, err := s.client.NewRequest("GET", "hooks", nil, options)
if err != nil {
return nil, nil, err
}
@@ -73,8 +73,8 @@ type AddHookOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/system_hooks.html#add-new-system-hook-hook
-func (s *SystemHooksService) AddHook(opt *AddHookOptions) (*Hook, *Response, error) {
- req, err := s.client.NewRequest("POST", "hooks", opt)
+func (s *SystemHooksService) AddHook(opt *AddHookOptions, options ...OptionFunc) (*Hook, *Response, error) {
+ req, err := s.client.NewRequest("POST", "hooks", opt, options)
if err != nil {
return nil, nil, err
}
@@ -108,10 +108,10 @@ func (h HookEvent) String() string {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/system_hooks.html#test-system-hook
-func (s *SystemHooksService) TestHook(hook int) (*HookEvent, *Response, error) {
+func (s *SystemHooksService) TestHook(hook int, options ...OptionFunc) (*HookEvent, *Response, error) {
u := fmt.Sprintf("hooks/%d", hook)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -131,10 +131,10 @@ func (s *SystemHooksService) TestHook(hook int) (*HookEvent, *Response, error) {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/system_hooks.html#delete-system-hook
-func (s *SystemHooksService) DeleteHook(hook int) (*Response, error) {
+func (s *SystemHooksService) DeleteHook(hook int, options ...OptionFunc) (*Response, error) {
u := fmt.Sprintf("hooks/%d", hook)
- req, err := s.client.NewRequest("DELETE", u, nil)
+ req, err := s.client.NewRequest("DELETE", u, nil, options)
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/xanzy/go-gitlab/tags.go b/vendor/github.com/xanzy/go-gitlab/tags.go
index 759cd7a..196f6d4 100644
--- a/vendor/github.com/xanzy/go-gitlab/tags.go
+++ b/vendor/github.com/xanzy/go-gitlab/tags.go
@@ -47,14 +47,14 @@ func (r Tag) String() string {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/tags.html#list-project-repository-tags
-func (s *TagsService) ListTags(pid interface{}) ([]*Tag, *Response, error) {
+func (s *TagsService) ListTags(pid interface{}, options ...OptionFunc) ([]*Tag, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/repository/tags", url.QueryEscape(project))
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -73,14 +73,14 @@ func (s *TagsService) ListTags(pid interface{}) ([]*Tag, *Response, error) {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/tags.html#get-a-single-repository-tag
-func (s *TagsService) GetTag(pid interface{}, tag string) (*Tag, *Response, error) {
+func (s *TagsService) GetTag(pid interface{}, tag string, options ...OptionFunc) (*Tag, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/repository/tags/%s", url.QueryEscape(project), tag)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -108,14 +108,14 @@ type CreateTagOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/tags.html#create-a-new-tag
-func (s *TagsService) CreateTag(pid interface{}, opt *CreateTagOptions) (*Tag, *Response, error) {
+func (s *TagsService) CreateTag(pid interface{}, opt *CreateTagOptions, options ...OptionFunc) (*Tag, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/repository/tags", url.QueryEscape(project))
- req, err := s.client.NewRequest("POST", u, opt)
+ req, err := s.client.NewRequest("POST", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -133,14 +133,14 @@ func (s *TagsService) CreateTag(pid interface{}, opt *CreateTagOptions) (*Tag, *
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/tags.html#delete-a-tag
-func (s *TagsService) DeleteTag(pid interface{}, tag string) (*Response, error) {
+func (s *TagsService) DeleteTag(pid interface{}, tag string, options ...OptionFunc) (*Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, err
}
u := fmt.Sprintf("projects/%s/repository/tags/%s", url.QueryEscape(project), tag)
- req, err := s.client.NewRequest("DELETE", u, nil)
+ req, err := s.client.NewRequest("DELETE", u, nil, options)
if err != nil {
return nil, err
}
diff --git a/vendor/github.com/xanzy/go-gitlab/time_stats.go b/vendor/github.com/xanzy/go-gitlab/time_stats.go
index a346389..c4a4ad4 100644
--- a/vendor/github.com/xanzy/go-gitlab/time_stats.go
+++ b/vendor/github.com/xanzy/go-gitlab/time_stats.go
@@ -41,17 +41,14 @@ type SetTimeEstimateOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/issues.html#set-a-time-estimate-for-an-issue
-func (s *TimeStatsService) SetTimeEstimate(
- pid interface{},
- issue int,
- opt *SetTimeEstimateOptions) (*TimeStats, *Response, error) {
+func (s *TimeStatsService) SetTimeEstimate(pid interface{}, issue int, opt *SetTimeEstimateOptions, options ...OptionFunc) (*TimeStats, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/issues/%d/time_estimate", url.QueryEscape(project), issue)
- req, err := s.client.NewRequest("POST", u, opt)
+ req, err := s.client.NewRequest("POST", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -69,16 +66,14 @@ func (s *TimeStatsService) SetTimeEstimate(
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/issues.html#reset-the-time-estimate-for-an-issue
-func (s *TimeStatsService) ResetTimeEstimate(
- pid interface{},
- issue int) (*TimeStats, *Response, error) {
+func (s *TimeStatsService) ResetTimeEstimate(pid interface{}, issue int, options ...OptionFunc) (*TimeStats, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/issues/%d/reset_time_estimate", url.QueryEscape(project), issue)
- req, err := s.client.NewRequest("POST", u, nil)
+ req, err := s.client.NewRequest("POST", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -104,17 +99,14 @@ type AddSpentTimeOptions struct {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/issues.html#add-spent-time-for-an-issue
-func (s *TimeStatsService) AddSpentTime(
- pid interface{},
- issue int,
- opt *AddSpentTimeOptions) (*TimeStats, *Response, error) {
+func (s *TimeStatsService) AddSpentTime(pid interface{}, issue int, opt *AddSpentTimeOptions, options ...OptionFunc) (*TimeStats, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/issues/%d/add_spent_time", url.QueryEscape(project), issue)
- req, err := s.client.NewRequest("POST", u, opt)
+ req, err := s.client.NewRequest("POST", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -132,16 +124,14 @@ func (s *TimeStatsService) AddSpentTime(
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/issues.html#reset-spent-time-for-an-issue
-func (s *TimeStatsService) ResetSpentTime(
- pid interface{},
- issue int) (*TimeStats, *Response, error) {
+func (s *TimeStatsService) ResetSpentTime(pid interface{}, issue int, options ...OptionFunc) (*TimeStats, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/issues/%d/reset_spent_time", url.QueryEscape(project), issue)
- req, err := s.client.NewRequest("POST", u, nil)
+ req, err := s.client.NewRequest("POST", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -159,16 +149,14 @@ func (s *TimeStatsService) ResetSpentTime(
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/issues.html#get-time-tracking-stats
-func (s *TimeStatsService) GetTimeSpent(
- pid interface{},
- issue int) (*TimeStats, *Response, error) {
+func (s *TimeStatsService) GetTimeSpent(pid interface{}, issue int, options ...OptionFunc) (*TimeStats, *Response, error) {
project, err := parseID(pid)
if err != nil {
return nil, nil, err
}
u := fmt.Sprintf("projects/%s/issues/%d/time_stats", url.QueryEscape(project), issue)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
diff --git a/vendor/github.com/xanzy/go-gitlab/users.go b/vendor/github.com/xanzy/go-gitlab/users.go
index 13ae2ae..ba955a8 100644
--- a/vendor/github.com/xanzy/go-gitlab/users.go
+++ b/vendor/github.com/xanzy/go-gitlab/users.go
@@ -79,8 +79,8 @@ type ListUsersOptions struct {
// ListUsers gets a list of users.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/users.html#list-users
-func (s *UsersService) ListUsers(opt *ListUsersOptions) ([]*User, *Response, error) {
- req, err := s.client.NewRequest("GET", "users", opt)
+func (s *UsersService) ListUsers(opt *ListUsersOptions, options ...OptionFunc) ([]*User, *Response, error) {
+ req, err := s.client.NewRequest("GET", "users", opt, options)
if err != nil {
return nil, nil, err
}
@@ -97,10 +97,10 @@ func (s *UsersService) ListUsers(opt *ListUsersOptions) ([]*User, *Response, err
// GetUser gets a single user.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/users.html#single-user
-func (s *UsersService) GetUser(user int) (*User, *Response, error) {
+func (s *UsersService) GetUser(user int, options ...OptionFunc) (*User, *Response, error) {
u := fmt.Sprintf("users/%d", user)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -138,8 +138,8 @@ type CreateUserOptions struct {
// CreateUser creates a new user. Note only administrators can create new users.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/users.html#user-creation
-func (s *UsersService) CreateUser(opt *CreateUserOptions) (*User, *Response, error) {
- req, err := s.client.NewRequest("POST", "users", opt)
+func (s *UsersService) CreateUser(opt *CreateUserOptions, options ...OptionFunc) (*User, *Response, error) {
+ req, err := s.client.NewRequest("POST", "users", opt, options)
if err != nil {
return nil, nil, err
}
@@ -177,10 +177,10 @@ type ModifyUserOptions struct {
// of a user.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/users.html#user-modification
-func (s *UsersService) ModifyUser(user int, opt *ModifyUserOptions) (*User, *Response, error) {
+func (s *UsersService) ModifyUser(user int, opt *ModifyUserOptions, options ...OptionFunc) (*User, *Response, error) {
u := fmt.Sprintf("users/%d", user)
- req, err := s.client.NewRequest("PUT", u, opt)
+ req, err := s.client.NewRequest("PUT", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -201,10 +201,10 @@ func (s *UsersService) ModifyUser(user int, opt *ModifyUserOptions) (*User, *Res
// latter not.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/users.html#user-deletion
-func (s *UsersService) DeleteUser(user int) (*Response, error) {
+func (s *UsersService) DeleteUser(user int, options ...OptionFunc) (*Response, error) {
u := fmt.Sprintf("users/%d", user)
- req, err := s.client.NewRequest("DELETE", u, nil)
+ req, err := s.client.NewRequest("DELETE", u, nil, options)
if err != nil {
return nil, err
}
@@ -215,8 +215,8 @@ func (s *UsersService) DeleteUser(user int) (*Response, error) {
// CurrentUser gets currently authenticated user.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/users.html#current-user
-func (s *UsersService) CurrentUser() (*User, *Response, error) {
- req, err := s.client.NewRequest("GET", "user", nil)
+func (s *UsersService) CurrentUser(options ...OptionFunc) (*User, *Response, error) {
+ req, err := s.client.NewRequest("GET", "user", nil, options)
if err != nil {
return nil, nil, err
}
@@ -243,8 +243,8 @@ type SSHKey struct {
// ListSSHKeys gets a list of currently authenticated user's SSH keys.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/users.html#list-ssh-keys
-func (s *UsersService) ListSSHKeys() ([]*SSHKey, *Response, error) {
- req, err := s.client.NewRequest("GET", "user/keys", nil)
+func (s *UsersService) ListSSHKeys(options ...OptionFunc) ([]*SSHKey, *Response, error) {
+ req, err := s.client.NewRequest("GET", "user/keys", nil, options)
if err != nil {
return nil, nil, err
}
@@ -263,10 +263,10 @@ func (s *UsersService) ListSSHKeys() ([]*SSHKey, *Response, error) {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/users.html#list-ssh-keys-for-user
-func (s *UsersService) ListSSHKeysForUser(user int) ([]*SSHKey, *Response, error) {
+func (s *UsersService) ListSSHKeysForUser(user int, options ...OptionFunc) ([]*SSHKey, *Response, error) {
u := fmt.Sprintf("users/%d/keys", user)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -283,10 +283,10 @@ func (s *UsersService) ListSSHKeysForUser(user int) ([]*SSHKey, *Response, error
// GetSSHKey gets a single key.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/users.html#single-ssh-key
-func (s *UsersService) GetSSHKey(kid int) (*SSHKey, *Response, error) {
+func (s *UsersService) GetSSHKey(kid int, options ...OptionFunc) (*SSHKey, *Response, error) {
u := fmt.Sprintf("user/keys/%d", kid)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -311,8 +311,8 @@ type AddSSHKeyOptions struct {
// AddSSHKey creates a new key owned by the currently authenticated user.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/users.html#add-ssh-key
-func (s *UsersService) AddSSHKey(opt *AddSSHKeyOptions) (*SSHKey, *Response, error) {
- req, err := s.client.NewRequest("POST", "user/keys", opt)
+func (s *UsersService) AddSSHKey(opt *AddSSHKeyOptions, options ...OptionFunc) (*SSHKey, *Response, error) {
+ req, err := s.client.NewRequest("POST", "user/keys", opt, options)
if err != nil {
return nil, nil, err
}
@@ -330,12 +330,10 @@ func (s *UsersService) AddSSHKey(opt *AddSSHKeyOptions) (*SSHKey, *Response, err
// admin.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/users.html#add-ssh-key-for-user
-func (s *UsersService) AddSSHKeyForUser(
- user int,
- opt *AddSSHKeyOptions) (*SSHKey, *Response, error) {
+func (s *UsersService) AddSSHKeyForUser(user int, opt *AddSSHKeyOptions, options ...OptionFunc) (*SSHKey, *Response, error) {
u := fmt.Sprintf("users/%d/keys", user)
- req, err := s.client.NewRequest("POST", u, opt)
+ req, err := s.client.NewRequest("POST", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -355,10 +353,10 @@ func (s *UsersService) AddSSHKeyForUser(
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/users.html#delete-ssh-key-for-current-owner
-func (s *UsersService) DeleteSSHKey(kid int) (*Response, error) {
+func (s *UsersService) DeleteSSHKey(kid int, options ...OptionFunc) (*Response, error) {
u := fmt.Sprintf("user/keys/%d", kid)
- req, err := s.client.NewRequest("DELETE", u, nil)
+ req, err := s.client.NewRequest("DELETE", u, nil, options)
if err != nil {
return nil, err
}
@@ -371,10 +369,10 @@ func (s *UsersService) DeleteSSHKey(kid int) (*Response, error) {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/users.html#delete-ssh-key-for-given-user
-func (s *UsersService) DeleteSSHKeyForUser(user int, kid int) (*Response, error) {
+func (s *UsersService) DeleteSSHKeyForUser(user int, kid int, options ...OptionFunc) (*Response, error) {
u := fmt.Sprintf("users/%d/keys/%d", user, kid)
- req, err := s.client.NewRequest("DELETE", u, nil)
+ req, err := s.client.NewRequest("DELETE", u, nil, options)
if err != nil {
return nil, err
}
@@ -385,10 +383,10 @@ func (s *UsersService) DeleteSSHKeyForUser(user int, kid int) (*Response, error)
// BlockUser blocks the specified user. Available only for admin.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/users.html#block-user
-func (s *UsersService) BlockUser(user int) error {
+func (s *UsersService) BlockUser(user int, options ...OptionFunc) error {
u := fmt.Sprintf("users/%d/block", user)
- req, err := s.client.NewRequest("PUT", u, nil)
+ req, err := s.client.NewRequest("PUT", u, nil, options)
if err != nil {
return err
}
@@ -413,10 +411,10 @@ func (s *UsersService) BlockUser(user int) error {
// UnblockUser unblocks the specified user. Available only for admin.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/users.html#unblock-user
-func (s *UsersService) UnblockUser(user int) error {
+func (s *UsersService) UnblockUser(user int, options ...OptionFunc) error {
u := fmt.Sprintf("users/%d/unblock", user)
- req, err := s.client.NewRequest("PUT", u, nil)
+ req, err := s.client.NewRequest("PUT", u, nil, options)
if err != nil {
return err
}
@@ -449,8 +447,8 @@ type Email struct {
// ListEmails gets a list of currently authenticated user's Emails.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/users.html#list-emails
-func (s *UsersService) ListEmails() ([]*Email, *Response, error) {
- req, err := s.client.NewRequest("GET", "user/emails", nil)
+func (s *UsersService) ListEmails(options ...OptionFunc) ([]*Email, *Response, error) {
+ req, err := s.client.NewRequest("GET", "user/emails", nil, options)
if err != nil {
return nil, nil, err
}
@@ -469,10 +467,10 @@ func (s *UsersService) ListEmails() ([]*Email, *Response, error) {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/users.html#list-emails-for-user
-func (s *UsersService) ListEmailsForUser(uid int) ([]*Email, *Response, error) {
+func (s *UsersService) ListEmailsForUser(uid int, options ...OptionFunc) ([]*Email, *Response, error) {
u := fmt.Sprintf("users/%d/emails", uid)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -489,10 +487,10 @@ func (s *UsersService) ListEmailsForUser(uid int) ([]*Email, *Response, error) {
// GetEmail gets a single email.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/users.html#single-email
-func (s *UsersService) GetEmail(eid int) (*Email, *Response, error) {
+func (s *UsersService) GetEmail(eid int, options ...OptionFunc) (*Email, *Response, error) {
u := fmt.Sprintf("user/emails/%d", eid)
- req, err := s.client.NewRequest("GET", u, nil)
+ req, err := s.client.NewRequest("GET", u, nil, options)
if err != nil {
return nil, nil, err
}
@@ -516,8 +514,8 @@ type AddEmailOptions struct {
// AddEmail creates a new email owned by the currently authenticated user.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/users.html#add-email
-func (s *UsersService) AddEmail(opt *AddEmailOptions) (*Email, *Response, error) {
- req, err := s.client.NewRequest("POST", "user/emails", opt)
+func (s *UsersService) AddEmail(opt *AddEmailOptions, options ...OptionFunc) (*Email, *Response, error) {
+ req, err := s.client.NewRequest("POST", "user/emails", opt, options)
if err != nil {
return nil, nil, err
}
@@ -535,12 +533,10 @@ func (s *UsersService) AddEmail(opt *AddEmailOptions) (*Email, *Response, error)
// admin.
//
// GitLab API docs: https://docs.gitlab.com/ce/api/users.html#add-email-for-user
-func (s *UsersService) AddEmailForUser(
- uid int,
- opt *AddEmailOptions) (*Email, *Response, error) {
+func (s *UsersService) AddEmailForUser(uid int, opt *AddEmailOptions, options ...OptionFunc) (*Email, *Response, error) {
u := fmt.Sprintf("users/%d/emails", uid)
- req, err := s.client.NewRequest("POST", u, opt)
+ req, err := s.client.NewRequest("POST", u, opt, options)
if err != nil {
return nil, nil, err
}
@@ -560,10 +556,10 @@ func (s *UsersService) AddEmailForUser(
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/users.html#delete-email-for-current-owner
-func (s *UsersService) DeleteEmail(eid int) (*Response, error) {
+func (s *UsersService) DeleteEmail(eid int, options ...OptionFunc) (*Response, error) {
u := fmt.Sprintf("user/emails/%d", eid)
- req, err := s.client.NewRequest("DELETE", u, nil)
+ req, err := s.client.NewRequest("DELETE", u, nil, options)
if err != nil {
return nil, err
}
@@ -576,10 +572,10 @@ func (s *UsersService) DeleteEmail(eid int) (*Response, error) {
//
// GitLab API docs:
// https://docs.gitlab.com/ce/api/users.html#delete-email-for-given-user
-func (s *UsersService) DeleteEmailForUser(uid int, eid int) (*Response, error) {
+func (s *UsersService) DeleteEmailForUser(uid int, eid int, options ...OptionFunc) (*Response, error) {
u := fmt.Sprintf("users/%d/emails/%d", uid, eid)
- req, err := s.client.NewRequest("DELETE", u, nil)
+ req, err := s.client.NewRequest("DELETE", u, nil, options)
if err != nil {
return nil, err
}
diff --git a/vendor/golang.org/x/oauth2/internal/oauth2.go b/vendor/golang.org/x/oauth2/internal/oauth2.go
index fbe1028..e31541b 100644
--- a/vendor/golang.org/x/oauth2/internal/oauth2.go
+++ b/vendor/golang.org/x/oauth2/internal/oauth2.go
@@ -42,7 +42,7 @@ func ParseKey(key []byte) (*rsa.PrivateKey, error) {
func ParseINI(ini io.Reader) (map[string]map[string]string, error) {
result := map[string]map[string]string{
- "": map[string]string{}, // root section
+ "": {}, // root section
}
scanner := bufio.NewScanner(ini)
currentSection := ""
diff --git a/vendor/golang.org/x/sys/unix/asm.s b/vendor/golang.org/x/sys/unix/asm.s
deleted file mode 100644
index 8ed2fdb..0000000
--- a/vendor/golang.org/x/sys/unix/asm.s
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2014 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// +build !gccgo
-
-#include "textflag.h"
-
-TEXT ·use(SB),NOSPLIT,$0
- RET
diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh
index 7e6276b..374c052 100755
--- a/vendor/golang.org/x/sys/unix/mkerrors.sh
+++ b/vendor/golang.org/x/sys/unix/mkerrors.sh
@@ -114,11 +114,13 @@ includes_Linux='
#include <sys/time.h>
#include <sys/socket.h>
#include <linux/if.h>
+#include <linux/if_alg.h>
#include <linux/if_arp.h>
#include <linux/if_ether.h>
#include <linux/if_tun.h>
#include <linux/if_packet.h>
#include <linux/if_addr.h>
+#include <linux/falloc.h>
#include <linux/filter.h>
#include <linux/netlink.h>
#include <linux/reboot.h>
@@ -312,6 +314,7 @@ ccflags="$@"
$2 ~ /^IN_/ ||
$2 ~ /^LOCK_(SH|EX|NB|UN)$/ ||
$2 ~ /^(AF|SOCK|SO|SOL|IPPROTO|IP|IPV6|ICMP6|TCP|EVFILT|NOTE|EV|SHUT|PROT|MAP|PACKET|MSG|SCM|MCL|DT|MADV|PR)_/ ||
+ $2 ~ /^FALLOC_/ ||
$2 == "ICMPV6_FILTER" ||
$2 == "SOMAXCONN" ||
$2 == "NAME_MAX" ||
@@ -341,6 +344,8 @@ ccflags="$@"
$2 ~ /^(BPF|DLT)_/ ||
$2 ~ /^CLOCK_/ ||
$2 ~ /^CAN_/ ||
+ $2 ~ /^ALG_/ ||
+ $2 ~ /^SPLICE_/ ||
$2 !~ "WMESGLEN" &&
$2 ~ /^W[A-Z0-9]+$/ {printf("\t%s = C.%s\n", $2, $2)}
$2 ~ /^__WCOREFLAG$/ {next}
@@ -456,7 +461,7 @@ main(void)
printf("\t%d: \"%s\",\n", e, buf);
}
printf("}\n\n");
-
+
printf("\n\n// Signal table\n");
printf("var signals = [...]string {\n");
qsort(signals, nelem(signals), sizeof signals[0], intcmp);
diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go
index 01c569a..326be81 100644
--- a/vendor/golang.org/x/sys/unix/syscall_linux.go
+++ b/vendor/golang.org/x/sys/unix/syscall_linux.go
@@ -452,6 +452,105 @@ func (sa *SockaddrCAN) sockaddr() (unsafe.Pointer, _Socklen, error) {
return unsafe.Pointer(&sa.raw), SizeofSockaddrCAN, nil
}
+// SockaddrALG implements the Sockaddr interface for AF_ALG type sockets.
+// SockaddrALG enables userspace access to the Linux kernel's cryptography
+// subsystem. The Type and Name fields specify which type of hash or cipher
+// should be used with a given socket.
+//
+// To create a file descriptor that provides access to a hash or cipher, both
+// Bind and Accept must be used. Once the setup process is complete, input
+// data can be written to the socket, processed by the kernel, and then read
+// back as hash output or ciphertext.
+//
+// Here is an example of using an AF_ALG socket with SHA1 hashing.
+// The initial socket setup process is as follows:
+//
+// // Open a socket to perform SHA1 hashing.
+// fd, _ := unix.Socket(unix.AF_ALG, unix.SOCK_SEQPACKET, 0)
+// addr := &unix.SockaddrALG{Type: "hash", Name: "sha1"}
+// unix.Bind(fd, addr)
+// // Note: unix.Accept does not work at this time; must invoke accept()
+// // manually using unix.Syscall.
+// hashfd, _, _ := unix.Syscall(unix.SYS_ACCEPT, uintptr(fd), 0, 0)
+//
+// Once a file descriptor has been returned from Accept, it may be used to
+// perform SHA1 hashing. The descriptor is not safe for concurrent use, but
+// may be re-used repeatedly with subsequent Write and Read operations.
+//
+// When hashing a small byte slice or string, a single Write and Read may
+// be used:
+//
+// // Assume hashfd is already configured using the setup process.
+// hash := os.NewFile(hashfd, "sha1")
+// // Hash an input string and read the results. Each Write discards
+// // previous hash state. Read always reads the current state.
+// b := make([]byte, 20)
+// for i := 0; i < 2; i++ {
+// io.WriteString(hash, "Hello, world.")
+// hash.Read(b)
+// fmt.Println(hex.EncodeToString(b))
+// }
+// // Output:
+// // 2ae01472317d1935a84797ec1983ae243fc6aa28
+// // 2ae01472317d1935a84797ec1983ae243fc6aa28
+//
+// For hashing larger byte slices, or byte streams such as those read from
+// a file or socket, use Sendto with MSG_MORE to instruct the kernel to update
+// the hash digest instead of creating a new one for a given chunk and finalizing it.
+//
+// // Assume hashfd and addr are already configured using the setup process.
+// hash := os.NewFile(hashfd, "sha1")
+// // Hash the contents of a file.
+// f, _ := os.Open("/tmp/linux-4.10-rc7.tar.xz")
+// b := make([]byte, 4096)
+// for {
+// n, err := f.Read(b)
+// if err == io.EOF {
+// break
+// }
+// unix.Sendto(hashfd, b[:n], unix.MSG_MORE, addr)
+// }
+// hash.Read(b)
+// fmt.Println(hex.EncodeToString(b))
+// // Output: 85cdcad0c06eef66f805ecce353bec9accbeecc5
+//
+// For more information, see: http://www.chronox.de/crypto-API/crypto/userspace-if.html.
+type SockaddrALG struct {
+ Type string
+ Name string
+ Feature uint32
+ Mask uint32
+ raw RawSockaddrALG
+}
+
+func (sa *SockaddrALG) sockaddr() (unsafe.Pointer, _Socklen, error) {
+ // Leave room for NUL byte terminator.
+ if len(sa.Type) > 13 {
+ return nil, 0, EINVAL
+ }
+ if len(sa.Name) > 63 {
+ return nil, 0, EINVAL
+ }
+
+ sa.raw.Family = AF_ALG
+ sa.raw.Feat = sa.Feature
+ sa.raw.Mask = sa.Mask
+
+ typ, err := ByteSliceFromString(sa.Type)
+ if err != nil {
+ return nil, 0, err
+ }
+ name, err := ByteSliceFromString(sa.Name)
+ if err != nil {
+ return nil, 0, err
+ }
+
+ copy(sa.raw.Type[:], typ)
+ copy(sa.raw.Name[:], name)
+
+ return unsafe.Pointer(&sa.raw), SizeofSockaddrALG, nil
+}
+
func anyToSockaddr(rsa *RawSockaddrAny) (Sockaddr, error) {
switch rsa.Addr.Family {
case AF_NETLINK:
@@ -1019,6 +1118,25 @@ func Munmap(b []byte) (err error) {
//sys Mlockall(flags int) (err error)
//sys Munlockall() (err error)
+// Vmsplice splices user pages from a slice of Iovecs into a pipe specified by fd,
+// using the specified flags.
+func Vmsplice(fd int, iovs []Iovec, flags int) (int, error) {
+ n, _, errno := Syscall6(
+ SYS_VMSPLICE,
+ uintptr(fd),
+ uintptr(unsafe.Pointer(&iovs[0])),
+ uintptr(len(iovs)),
+ uintptr(flags),
+ 0,
+ 0,
+ )
+ if errno != 0 {
+ return 0, syscall.Errno(errno)
+ }
+
+ return int(n), nil
+}
+
/*
* Unimplemented
*/
@@ -1146,7 +1264,6 @@ func Munmap(b []byte) (err error) {
// Utimensat
// Vfork
// Vhangup
-// Vmsplice
// Vserver
// Waitid
// _Sysctl
diff --git a/vendor/golang.org/x/sys/unix/types_linux.go b/vendor/golang.org/x/sys/unix/types_linux.go
index f3d8f90..a08f7fb 100644
--- a/vendor/golang.org/x/sys/unix/types_linux.go
+++ b/vendor/golang.org/x/sys/unix/types_linux.go
@@ -59,6 +59,7 @@ package unix
#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
#include <linux/can.h>
+#include <linux/if_alg.h>
#ifdef TCSETS2
// On systems that have "struct termios2" use this as type Termios.
@@ -221,6 +222,8 @@ type RawSockaddrHCI C.struct_sockaddr_hci
type RawSockaddrCAN C.struct_sockaddr_can
+type RawSockaddrALG C.struct_sockaddr_alg
+
type RawSockaddr C.struct_sockaddr
type RawSockaddrAny C.struct_sockaddr_any
@@ -262,6 +265,7 @@ const (
SizeofSockaddrNetlink = C.sizeof_struct_sockaddr_nl
SizeofSockaddrHCI = C.sizeof_struct_sockaddr_hci
SizeofSockaddrCAN = C.sizeof_struct_sockaddr_can
+ SizeofSockaddrALG = C.sizeof_struct_sockaddr_alg
SizeofLinger = C.sizeof_struct_linger
SizeofIPMreq = C.sizeof_struct_ip_mreq
SizeofIPMreqn = C.sizeof_struct_ip_mreqn
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
index b40d029..5759f79 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go
@@ -53,6 +53,13 @@ const (
AF_UNSPEC = 0x0
AF_WANPIPE = 0x19
AF_X25 = 0x9
+ ALG_OP_DECRYPT = 0x0
+ ALG_OP_ENCRYPT = 0x1
+ ALG_SET_AEAD_ASSOCLEN = 0x4
+ ALG_SET_AEAD_AUTHSIZE = 0x5
+ ALG_SET_IV = 0x2
+ ALG_SET_KEY = 0x1
+ ALG_SET_OP = 0x3
ARPHRD_ADAPT = 0x108
ARPHRD_APPLETLK = 0x8
ARPHRD_ARCNET = 0x7
@@ -385,6 +392,12 @@ const (
EXTA = 0xe
EXTB = 0xf
EXTPROC = 0x10000
+ FALLOC_FL_COLLAPSE_RANGE = 0x8
+ FALLOC_FL_INSERT_RANGE = 0x20
+ FALLOC_FL_KEEP_SIZE = 0x1
+ FALLOC_FL_NO_HIDE_STALE = 0x4
+ FALLOC_FL_PUNCH_HOLE = 0x2
+ FALLOC_FL_ZERO_RANGE = 0x10
FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400
FF0 = 0x0
@@ -1292,6 +1305,10 @@ const (
SO_TIMESTAMPING = 0x25
SO_TIMESTAMPNS = 0x23
SO_TYPE = 0x3
+ SPLICE_F_GIFT = 0x8
+ SPLICE_F_MORE = 0x4
+ SPLICE_F_MOVE = 0x1
+ SPLICE_F_NONBLOCK = 0x2
S_BLKSIZE = 0x200
S_IEXEC = 0x40
S_IFBLK = 0x6000
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
index 9f0600c..88c6ac6 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go
@@ -53,6 +53,13 @@ const (
AF_UNSPEC = 0x0
AF_WANPIPE = 0x19
AF_X25 = 0x9
+ ALG_OP_DECRYPT = 0x0
+ ALG_OP_ENCRYPT = 0x1
+ ALG_SET_AEAD_ASSOCLEN = 0x4
+ ALG_SET_AEAD_AUTHSIZE = 0x5
+ ALG_SET_IV = 0x2
+ ALG_SET_KEY = 0x1
+ ALG_SET_OP = 0x3
ARPHRD_ADAPT = 0x108
ARPHRD_APPLETLK = 0x8
ARPHRD_ARCNET = 0x7
@@ -385,6 +392,12 @@ const (
EXTA = 0xe
EXTB = 0xf
EXTPROC = 0x10000
+ FALLOC_FL_COLLAPSE_RANGE = 0x8
+ FALLOC_FL_INSERT_RANGE = 0x20
+ FALLOC_FL_KEEP_SIZE = 0x1
+ FALLOC_FL_NO_HIDE_STALE = 0x4
+ FALLOC_FL_PUNCH_HOLE = 0x2
+ FALLOC_FL_ZERO_RANGE = 0x10
FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400
FF0 = 0x0
@@ -1293,6 +1306,10 @@ const (
SO_TIMESTAMPING = 0x25
SO_TIMESTAMPNS = 0x23
SO_TYPE = 0x3
+ SPLICE_F_GIFT = 0x8
+ SPLICE_F_MORE = 0x4
+ SPLICE_F_MOVE = 0x1
+ SPLICE_F_NONBLOCK = 0x2
S_BLKSIZE = 0x200
S_IEXEC = 0x40
S_IFBLK = 0x6000
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
index 647a796..2ee1536 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go
@@ -52,6 +52,13 @@ const (
AF_UNSPEC = 0x0
AF_WANPIPE = 0x19
AF_X25 = 0x9
+ ALG_OP_DECRYPT = 0x0
+ ALG_OP_ENCRYPT = 0x1
+ ALG_SET_AEAD_ASSOCLEN = 0x4
+ ALG_SET_AEAD_AUTHSIZE = 0x5
+ ALG_SET_IV = 0x2
+ ALG_SET_KEY = 0x1
+ ALG_SET_OP = 0x3
ARPHRD_ADAPT = 0x108
ARPHRD_APPLETLK = 0x8
ARPHRD_ARCNET = 0x7
@@ -370,6 +377,12 @@ const (
EXTA = 0xe
EXTB = 0xf
EXTPROC = 0x10000
+ FALLOC_FL_COLLAPSE_RANGE = 0x8
+ FALLOC_FL_INSERT_RANGE = 0x20
+ FALLOC_FL_KEEP_SIZE = 0x1
+ FALLOC_FL_NO_HIDE_STALE = 0x4
+ FALLOC_FL_PUNCH_HOLE = 0x2
+ FALLOC_FL_ZERO_RANGE = 0x10
FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400
FF0 = 0x0
@@ -1216,6 +1229,10 @@ const (
SO_TIMESTAMPING = 0x25
SO_TIMESTAMPNS = 0x23
SO_TYPE = 0x3
+ SPLICE_F_GIFT = 0x8
+ SPLICE_F_MORE = 0x4
+ SPLICE_F_MOVE = 0x1
+ SPLICE_F_NONBLOCK = 0x2
S_BLKSIZE = 0x200
S_IEXEC = 0x40
S_IFBLK = 0x6000
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
index a6d1e1f..767b166 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go
@@ -54,6 +54,13 @@ const (
AF_VSOCK = 0x28
AF_WANPIPE = 0x19
AF_X25 = 0x9
+ ALG_OP_DECRYPT = 0x0
+ ALG_OP_ENCRYPT = 0x1
+ ALG_SET_AEAD_ASSOCLEN = 0x4
+ ALG_SET_AEAD_AUTHSIZE = 0x5
+ ALG_SET_IV = 0x2
+ ALG_SET_KEY = 0x1
+ ALG_SET_OP = 0x3
ARPHRD_ADAPT = 0x108
ARPHRD_APPLETLK = 0x8
ARPHRD_ARCNET = 0x7
@@ -399,6 +406,12 @@ const (
EXTA = 0xe
EXTB = 0xf
EXTPROC = 0x10000
+ FALLOC_FL_COLLAPSE_RANGE = 0x8
+ FALLOC_FL_INSERT_RANGE = 0x20
+ FALLOC_FL_KEEP_SIZE = 0x1
+ FALLOC_FL_NO_HIDE_STALE = 0x4
+ FALLOC_FL_PUNCH_HOLE = 0x2
+ FALLOC_FL_ZERO_RANGE = 0x10
FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400
FF0 = 0x0
@@ -1348,6 +1361,10 @@ const (
SO_TIMESTAMPNS = 0x23
SO_TYPE = 0x3
SO_WIFI_STATUS = 0x29
+ SPLICE_F_GIFT = 0x8
+ SPLICE_F_MORE = 0x4
+ SPLICE_F_MOVE = 0x1
+ SPLICE_F_NONBLOCK = 0x2
S_BLKSIZE = 0x200
S_IEXEC = 0x40
S_IFBLK = 0x6000
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
index e4fb9ad..677abd1 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go
@@ -52,6 +52,13 @@ const (
AF_UNSPEC = 0x0
AF_WANPIPE = 0x19
AF_X25 = 0x9
+ ALG_OP_DECRYPT = 0x0
+ ALG_OP_ENCRYPT = 0x1
+ ALG_SET_AEAD_ASSOCLEN = 0x4
+ ALG_SET_AEAD_AUTHSIZE = 0x5
+ ALG_SET_IV = 0x2
+ ALG_SET_KEY = 0x1
+ ALG_SET_OP = 0x3
ARPHRD_ADAPT = 0x108
ARPHRD_APPLETLK = 0x8
ARPHRD_ARCNET = 0x7
@@ -375,6 +382,12 @@ const (
EXTA = 0xe
EXTB = 0xf
EXTPROC = 0x10000
+ FALLOC_FL_COLLAPSE_RANGE = 0x8
+ FALLOC_FL_INSERT_RANGE = 0x20
+ FALLOC_FL_KEEP_SIZE = 0x1
+ FALLOC_FL_NO_HIDE_STALE = 0x4
+ FALLOC_FL_PUNCH_HOLE = 0x2
+ FALLOC_FL_ZERO_RANGE = 0x10
FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400
FF0 = 0x0
@@ -1267,6 +1280,10 @@ const (
SO_TIMESTAMPING = 0x25
SO_TIMESTAMPNS = 0x23
SO_TYPE = 0x1008
+ SPLICE_F_GIFT = 0x8
+ SPLICE_F_MORE = 0x4
+ SPLICE_F_MOVE = 0x1
+ SPLICE_F_NONBLOCK = 0x2
S_BLKSIZE = 0x200
S_IEXEC = 0x40
S_IFBLK = 0x6000
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
index 36535b2..46dba95 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go
@@ -56,6 +56,13 @@ const (
AF_VSOCK = 0x28
AF_WANPIPE = 0x19
AF_X25 = 0x9
+ ALG_OP_DECRYPT = 0x0
+ ALG_OP_ENCRYPT = 0x1
+ ALG_SET_AEAD_ASSOCLEN = 0x4
+ ALG_SET_AEAD_AUTHSIZE = 0x5
+ ALG_SET_IV = 0x2
+ ALG_SET_KEY = 0x1
+ ALG_SET_OP = 0x3
ARPHRD_6LOWPAN = 0x339
ARPHRD_ADAPT = 0x108
ARPHRD_APPLETLK = 0x8
@@ -374,6 +381,12 @@ const (
EXTA = 0xe
EXTB = 0xf
EXTPROC = 0x10000
+ FALLOC_FL_COLLAPSE_RANGE = 0x8
+ FALLOC_FL_INSERT_RANGE = 0x20
+ FALLOC_FL_KEEP_SIZE = 0x1
+ FALLOC_FL_NO_HIDE_STALE = 0x4
+ FALLOC_FL_PUNCH_HOLE = 0x2
+ FALLOC_FL_ZERO_RANGE = 0x10
FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400
FLUSHO = 0x2000
@@ -1363,6 +1376,10 @@ const (
SO_TIMESTAMPNS = 0x23
SO_TYPE = 0x1008
SO_WIFI_STATUS = 0x29
+ SPLICE_F_GIFT = 0x8
+ SPLICE_F_MORE = 0x4
+ SPLICE_F_MOVE = 0x1
+ SPLICE_F_NONBLOCK = 0x2
S_BLKSIZE = 0x200
S_IEXEC = 0x40
S_IFBLK = 0x6000
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
index 112f05d..ee94a6e 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go
@@ -56,6 +56,13 @@ const (
AF_VSOCK = 0x28
AF_WANPIPE = 0x19
AF_X25 = 0x9
+ ALG_OP_DECRYPT = 0x0
+ ALG_OP_ENCRYPT = 0x1
+ ALG_SET_AEAD_ASSOCLEN = 0x4
+ ALG_SET_AEAD_AUTHSIZE = 0x5
+ ALG_SET_IV = 0x2
+ ALG_SET_KEY = 0x1
+ ALG_SET_OP = 0x3
ARPHRD_6LOWPAN = 0x339
ARPHRD_ADAPT = 0x108
ARPHRD_APPLETLK = 0x8
@@ -374,6 +381,12 @@ const (
EXTA = 0xe
EXTB = 0xf
EXTPROC = 0x10000
+ FALLOC_FL_COLLAPSE_RANGE = 0x8
+ FALLOC_FL_INSERT_RANGE = 0x20
+ FALLOC_FL_KEEP_SIZE = 0x1
+ FALLOC_FL_NO_HIDE_STALE = 0x4
+ FALLOC_FL_PUNCH_HOLE = 0x2
+ FALLOC_FL_ZERO_RANGE = 0x10
FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400
FLUSHO = 0x2000
@@ -1363,6 +1376,10 @@ const (
SO_TIMESTAMPNS = 0x23
SO_TYPE = 0x1008
SO_WIFI_STATUS = 0x29
+ SPLICE_F_GIFT = 0x8
+ SPLICE_F_MORE = 0x4
+ SPLICE_F_MOVE = 0x1
+ SPLICE_F_NONBLOCK = 0x2
S_BLKSIZE = 0x200
S_IEXEC = 0x40
S_IFBLK = 0x6000
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
index 0f5ee22..974b375 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go
@@ -57,6 +57,13 @@ const (
AF_VSOCK = 0x28
AF_WANPIPE = 0x19
AF_X25 = 0x9
+ ALG_OP_DECRYPT = 0x0
+ ALG_OP_ENCRYPT = 0x1
+ ALG_SET_AEAD_ASSOCLEN = 0x4
+ ALG_SET_AEAD_AUTHSIZE = 0x5
+ ALG_SET_IV = 0x2
+ ALG_SET_KEY = 0x1
+ ALG_SET_OP = 0x3
ARPHRD_6LOWPAN = 0x339
ARPHRD_ADAPT = 0x108
ARPHRD_APPLETLK = 0x8
@@ -411,6 +418,12 @@ const (
EXTA = 0xe
EXTB = 0xf
EXTPROC = 0x10000
+ FALLOC_FL_COLLAPSE_RANGE = 0x8
+ FALLOC_FL_INSERT_RANGE = 0x20
+ FALLOC_FL_KEEP_SIZE = 0x1
+ FALLOC_FL_NO_HIDE_STALE = 0x4
+ FALLOC_FL_PUNCH_HOLE = 0x2
+ FALLOC_FL_ZERO_RANGE = 0x10
FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400
FF0 = 0x0
@@ -1438,6 +1451,10 @@ const (
SO_TIMESTAMPNS = 0x23
SO_TYPE = 0x1008
SO_WIFI_STATUS = 0x29
+ SPLICE_F_GIFT = 0x8
+ SPLICE_F_MORE = 0x4
+ SPLICE_F_MOVE = 0x1
+ SPLICE_F_NONBLOCK = 0x2
S_BLKSIZE = 0x200
S_IEXEC = 0x40
S_IFBLK = 0x6000
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
index 4e41939..ce4607d 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go
@@ -54,6 +54,13 @@ const (
AF_VSOCK = 0x28
AF_WANPIPE = 0x19
AF_X25 = 0x9
+ ALG_OP_DECRYPT = 0x0
+ ALG_OP_ENCRYPT = 0x1
+ ALG_SET_AEAD_ASSOCLEN = 0x4
+ ALG_SET_AEAD_AUTHSIZE = 0x5
+ ALG_SET_IV = 0x2
+ ALG_SET_KEY = 0x1
+ ALG_SET_OP = 0x3
ARPHRD_6LOWPAN = 0x339
ARPHRD_ADAPT = 0x108
ARPHRD_APPLETLK = 0x8
@@ -401,6 +408,12 @@ const (
EXTA = 0xe
EXTB = 0xf
EXTPROC = 0x10000000
+ FALLOC_FL_COLLAPSE_RANGE = 0x8
+ FALLOC_FL_INSERT_RANGE = 0x20
+ FALLOC_FL_KEEP_SIZE = 0x1
+ FALLOC_FL_NO_HIDE_STALE = 0x4
+ FALLOC_FL_PUNCH_HOLE = 0x2
+ FALLOC_FL_ZERO_RANGE = 0x10
FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400
FF0 = 0x0
@@ -1416,6 +1429,10 @@ const (
SO_TIMESTAMPNS = 0x23
SO_TYPE = 0x3
SO_WIFI_STATUS = 0x29
+ SPLICE_F_GIFT = 0x8
+ SPLICE_F_MORE = 0x4
+ SPLICE_F_MOVE = 0x1
+ SPLICE_F_NONBLOCK = 0x2
S_BLKSIZE = 0x200
S_IEXEC = 0x40
S_IFBLK = 0x6000
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
index 407e6b5..729ef75 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go
@@ -54,6 +54,13 @@ const (
AF_VSOCK = 0x28
AF_WANPIPE = 0x19
AF_X25 = 0x9
+ ALG_OP_DECRYPT = 0x0
+ ALG_OP_ENCRYPT = 0x1
+ ALG_SET_AEAD_ASSOCLEN = 0x4
+ ALG_SET_AEAD_AUTHSIZE = 0x5
+ ALG_SET_IV = 0x2
+ ALG_SET_KEY = 0x1
+ ALG_SET_OP = 0x3
ARPHRD_ADAPT = 0x108
ARPHRD_APPLETLK = 0x8
ARPHRD_ARCNET = 0x7
@@ -397,6 +404,12 @@ const (
EXTA = 0xe
EXTB = 0xf
EXTPROC = 0x10000000
+ FALLOC_FL_COLLAPSE_RANGE = 0x8
+ FALLOC_FL_INSERT_RANGE = 0x20
+ FALLOC_FL_KEEP_SIZE = 0x1
+ FALLOC_FL_NO_HIDE_STALE = 0x4
+ FALLOC_FL_PUNCH_HOLE = 0x2
+ FALLOC_FL_ZERO_RANGE = 0x10
FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400
FF0 = 0x0
@@ -1415,6 +1428,10 @@ const (
SO_TIMESTAMPNS = 0x23
SO_TYPE = 0x3
SO_WIFI_STATUS = 0x29
+ SPLICE_F_GIFT = 0x8
+ SPLICE_F_MORE = 0x4
+ SPLICE_F_MOVE = 0x1
+ SPLICE_F_NONBLOCK = 0x2
S_BLKSIZE = 0x200
S_IEXEC = 0x40
S_IFBLK = 0x6000
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
index 40c9b87..68c9ec6 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go
@@ -56,6 +56,13 @@ const (
AF_VSOCK = 0x28
AF_WANPIPE = 0x19
AF_X25 = 0x9
+ ALG_OP_DECRYPT = 0x0
+ ALG_OP_ENCRYPT = 0x1
+ ALG_SET_AEAD_ASSOCLEN = 0x4
+ ALG_SET_AEAD_AUTHSIZE = 0x5
+ ALG_SET_IV = 0x2
+ ALG_SET_KEY = 0x1
+ ALG_SET_OP = 0x3
ARPHRD_6LOWPAN = 0x339
ARPHRD_ADAPT = 0x108
ARPHRD_APPLETLK = 0x8
@@ -407,6 +414,12 @@ const (
EXTA = 0xe
EXTB = 0xf
EXTPROC = 0x10000
+ FALLOC_FL_COLLAPSE_RANGE = 0x8
+ FALLOC_FL_INSERT_RANGE = 0x20
+ FALLOC_FL_KEEP_SIZE = 0x1
+ FALLOC_FL_NO_HIDE_STALE = 0x4
+ FALLOC_FL_PUNCH_HOLE = 0x2
+ FALLOC_FL_ZERO_RANGE = 0x10
FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400
FF0 = 0x0
@@ -1470,6 +1483,10 @@ const (
SO_TIMESTAMPNS = 0x23
SO_TYPE = 0x3
SO_WIFI_STATUS = 0x29
+ SPLICE_F_GIFT = 0x8
+ SPLICE_F_MORE = 0x4
+ SPLICE_F_MOVE = 0x1
+ SPLICE_F_NONBLOCK = 0x2
S_BLKSIZE = 0x200
S_IEXEC = 0x40
S_IFBLK = 0x6000
diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
index 62680ed..4c56e2f 100644
--- a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go
@@ -57,6 +57,13 @@ const (
AF_VSOCK = 0x28
AF_WANPIPE = 0x19
AF_X25 = 0x9
+ ALG_OP_DECRYPT = 0x0
+ ALG_OP_ENCRYPT = 0x1
+ ALG_SET_AEAD_ASSOCLEN = 0x4
+ ALG_SET_AEAD_AUTHSIZE = 0x5
+ ALG_SET_IV = 0x2
+ ALG_SET_KEY = 0x1
+ ALG_SET_OP = 0x3
ARPHRD_6LOWPAN = 0x339
ARPHRD_ADAPT = 0x108
ARPHRD_APPLETLK = 0x8
@@ -415,6 +422,12 @@ const (
EXTA = 0xe
EXTB = 0xf
EXTPROC = 0x10000
+ FALLOC_FL_COLLAPSE_RANGE = 0x8
+ FALLOC_FL_INSERT_RANGE = 0x20
+ FALLOC_FL_KEEP_SIZE = 0x1
+ FALLOC_FL_NO_HIDE_STALE = 0x4
+ FALLOC_FL_PUNCH_HOLE = 0x2
+ FALLOC_FL_ZERO_RANGE = 0x10
FD_CLOEXEC = 0x1
FD_SETSIZE = 0x400
FF0 = 0x0
@@ -1511,6 +1524,10 @@ const (
SO_TIMESTAMPNS = 0x21
SO_TYPE = 0x1008
SO_WIFI_STATUS = 0x25
+ SPLICE_F_GIFT = 0x8
+ SPLICE_F_MORE = 0x4
+ SPLICE_F_MOVE = 0x1
+ SPLICE_F_NONBLOCK = 0x2
S_BLKSIZE = 0x200
S_IEXEC = 0x40
S_IFBLK = 0x6000
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
index a363105..29b9bf3 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
@@ -210,6 +210,14 @@ type RawSockaddrCAN struct {
Addr [8]byte
}
+type RawSockaddrALG struct {
+ Family uint16
+ Type [14]uint8
+ Feat uint32
+ Mask uint32
+ Name [64]uint8
+}
+
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -334,6 +342,7 @@ const (
SizeofSockaddrNetlink = 0xc
SizeofSockaddrHCI = 0x6
SizeofSockaddrCAN = 0x10
+ SizeofSockaddrALG = 0x58
SizeofLinger = 0x8
SizeofIPMreq = 0x8
SizeofIPMreqn = 0xc
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
index 0573e6c..b72cf8e 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
@@ -212,6 +212,14 @@ type RawSockaddrCAN struct {
Addr [8]byte
}
+type RawSockaddrALG struct {
+ Family uint16
+ Type [14]uint8
+ Feat uint32
+ Mask uint32
+ Name [64]uint8
+}
+
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -338,6 +346,7 @@ const (
SizeofSockaddrNetlink = 0xc
SizeofSockaddrHCI = 0x6
SizeofSockaddrCAN = 0x10
+ SizeofSockaddrALG = 0x58
SizeofLinger = 0x8
SizeofIPMreq = 0x8
SizeofIPMreqn = 0xc
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
index 0578b53..d5c8bb6 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
@@ -214,6 +214,14 @@ type RawSockaddrCAN struct {
Addr [8]byte
}
+type RawSockaddrALG struct {
+ Family uint16
+ Type [14]uint8
+ Feat uint32
+ Mask uint32
+ Name [64]uint8
+}
+
type RawSockaddr struct {
Family uint16
Data [14]uint8
@@ -338,6 +346,7 @@ const (
SizeofSockaddrNetlink = 0xc
SizeofSockaddrHCI = 0x6
SizeofSockaddrCAN = 0x10
+ SizeofSockaddrALG = 0x58
SizeofLinger = 0x8
SizeofIPMreq = 0x8
SizeofIPMreqn = 0xc
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
index 808e046..24bd089 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
@@ -213,6 +213,14 @@ type RawSockaddrCAN struct {
Addr [8]byte
}
+type RawSockaddrALG struct {
+ Family uint16
+ Type [14]uint8
+ Feat uint32
+ Mask uint32
+ Name [64]uint8
+}
+
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -339,6 +347,7 @@ const (
SizeofSockaddrNetlink = 0xc
SizeofSockaddrHCI = 0x6
SizeofSockaddrCAN = 0x10
+ SizeofSockaddrALG = 0x58
SizeofLinger = 0x8
SizeofIPMreq = 0x8
SizeofIPMreqn = 0xc
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
index 2eaff57..c5a41ab 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
@@ -213,6 +213,14 @@ type RawSockaddrCAN struct {
Addr [8]byte
}
+type RawSockaddrALG struct {
+ Family uint16
+ Type [14]uint8
+ Feat uint32
+ Mask uint32
+ Name [64]uint8
+}
+
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -336,6 +344,7 @@ const (
SizeofSockaddrNetlink = 0xc
SizeofSockaddrHCI = 0x6
SizeofSockaddrCAN = 0x10
+ SizeofSockaddrALG = 0x58
SizeofLinger = 0x8
SizeofIPMreq = 0x8
SizeofIPMreqn = 0xc
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
index 73e4b76..3947c44 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
@@ -213,6 +213,14 @@ type RawSockaddrCAN struct {
Addr [8]byte
}
+type RawSockaddrALG struct {
+ Family uint16
+ Type [14]uint8
+ Feat uint32
+ Mask uint32
+ Name [64]uint8
+}
+
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -338,6 +346,7 @@ const (
SizeofSockaddrNetlink = 0xc
SizeofSockaddrHCI = 0x6
SizeofSockaddrCAN = 0x10
+ SizeofSockaddrALG = 0x58
SizeofLinger = 0x8
SizeofIPMreq = 0x8
SizeofIPMreqn = 0xc
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
index 479ca3e..de8f9c4 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
@@ -213,6 +213,14 @@ type RawSockaddrCAN struct {
Addr [8]byte
}
+type RawSockaddrALG struct {
+ Family uint16
+ Type [14]uint8
+ Feat uint32
+ Mask uint32
+ Name [64]uint8
+}
+
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -338,6 +346,7 @@ const (
SizeofSockaddrNetlink = 0xc
SizeofSockaddrHCI = 0x6
SizeofSockaddrCAN = 0x10
+ SizeofSockaddrALG = 0x58
SizeofLinger = 0x8
SizeofIPMreq = 0x8
SizeofIPMreqn = 0xc
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
index 7617a69..5a8957f 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
@@ -213,6 +213,14 @@ type RawSockaddrCAN struct {
Addr [8]byte
}
+type RawSockaddrALG struct {
+ Family uint16
+ Type [14]uint8
+ Feat uint32
+ Mask uint32
+ Name [64]uint8
+}
+
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -336,6 +344,7 @@ const (
SizeofSockaddrNetlink = 0xc
SizeofSockaddrHCI = 0x6
SizeofSockaddrCAN = 0x10
+ SizeofSockaddrALG = 0x58
SizeofLinger = 0x8
SizeofIPMreq = 0x8
SizeofIPMreqn = 0xc
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
index 2db548b..4b87529 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
@@ -214,6 +214,14 @@ type RawSockaddrCAN struct {
Addr [8]byte
}
+type RawSockaddrALG struct {
+ Family uint16
+ Type [14]uint8
+ Feat uint32
+ Mask uint32
+ Name [64]uint8
+}
+
type RawSockaddr struct {
Family uint16
Data [14]uint8
@@ -340,6 +348,7 @@ const (
SizeofSockaddrNetlink = 0xc
SizeofSockaddrHCI = 0x6
SizeofSockaddrCAN = 0x10
+ SizeofSockaddrALG = 0x58
SizeofLinger = 0x8
SizeofIPMreq = 0x8
SizeofIPMreqn = 0xc
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
index 4bfdcc0..40d51d9 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
@@ -214,6 +214,14 @@ type RawSockaddrCAN struct {
Addr [8]byte
}
+type RawSockaddrALG struct {
+ Family uint16
+ Type [14]uint8
+ Feat uint32
+ Mask uint32
+ Name [64]uint8
+}
+
type RawSockaddr struct {
Family uint16
Data [14]uint8
@@ -340,6 +348,7 @@ const (
SizeofSockaddrNetlink = 0xc
SizeofSockaddrHCI = 0x6
SizeofSockaddrCAN = 0x10
+ SizeofSockaddrALG = 0x58
SizeofLinger = 0x8
SizeofIPMreq = 0x8
SizeofIPMreqn = 0xc
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
index 435cd79..13f6ea0 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
@@ -213,6 +213,14 @@ type RawSockaddrCAN struct {
Addr [8]byte
}
+type RawSockaddrALG struct {
+ Family uint16
+ Type [14]uint8
+ Feat uint32
+ Mask uint32
+ Name [64]uint8
+}
+
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -338,6 +346,7 @@ const (
SizeofSockaddrNetlink = 0xc
SizeofSockaddrHCI = 0x6
SizeofSockaddrCAN = 0x10
+ SizeofSockaddrALG = 0x58
SizeofLinger = 0x8
SizeofIPMreq = 0x8
SizeofIPMreqn = 0xc
diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
index 439f969..31a97b3 100644
--- a/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
+++ b/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
@@ -218,6 +218,14 @@ type RawSockaddrCAN struct {
Addr [8]byte
}
+type RawSockaddrALG struct {
+ Family uint16
+ Type [14]uint8
+ Feat uint32
+ Mask uint32
+ Name [64]uint8
+}
+
type RawSockaddr struct {
Family uint16
Data [14]int8
@@ -343,6 +351,7 @@ const (
SizeofSockaddrNetlink = 0xc
SizeofSockaddrHCI = 0x6
SizeofSockaddrCAN = 0x10
+ SizeofSockaddrALG = 0x58
SizeofLinger = 0x8
SizeofIPMreq = 0x8
SizeofIPMreqn = 0xc
diff --git a/vendor/google.golang.org/api/oauth2/v2/oauth2-gen.go b/vendor/google.golang.org/api/oauth2/v2/oauth2-gen.go
index 7440468..c12d1e8 100644
--- a/vendor/google.golang.org/api/oauth2/v2/oauth2-gen.go
+++ b/vendor/google.golang.org/api/oauth2/v2/oauth2-gen.go
@@ -70,9 +70,10 @@ func New(client *http.Client) (*Service, error) {
}
type Service struct {
- client *http.Client
- BasePath string // API endpoint base URL
- UserAgent string // optional additional User-Agent fragment
+ client *http.Client
+ BasePath string // API endpoint base URL
+ UserAgent string // optional additional User-Agent fragment
+ GoogleClientHeaderElement string // client header fragment, for Google use only
Userinfo *UserinfoService
}
@@ -84,6 +85,10 @@ func (s *Service) userAgent() string {
return googleapi.UserAgent + " " + s.UserAgent
}
+func (s *Service) clientHeader() string {
+ return gensupport.GoogleClientHeader("20170210", s.GoogleClientHeaderElement)
+}
+
func NewUserinfoService(s *Service) *UserinfoService {
rs := &UserinfoService{s: s}
rs.V2 = NewUserinfoV2Service(s)
@@ -367,6 +372,7 @@ func (c *GetCertForOpenIdConnectCall) doRequest(alt string) (*http.Response, err
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
+ reqHeaders.Set("x-goog-api-client", c.s.clientHeader())
if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
}
@@ -491,6 +497,7 @@ func (c *TokeninfoCall) doRequest(alt string) (*http.Response, error) {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
+ reqHeaders.Set("x-goog-api-client", c.s.clientHeader())
var body io.Reader = nil
c.urlParams_.Set("alt", alt)
urls := googleapi.ResolveRelative(c.s.BasePath, "oauth2/v2/tokeninfo")
@@ -619,6 +626,7 @@ func (c *UserinfoGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
+ reqHeaders.Set("x-goog-api-client", c.s.clientHeader())
if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
}
@@ -742,6 +750,7 @@ func (c *UserinfoV2MeGetCall) doRequest(alt string) (*http.Response, error) {
reqHeaders[k] = v
}
reqHeaders.Set("User-Agent", c.s.userAgent())
+ reqHeaders.Set("x-goog-api-client", c.s.clientHeader())
if c.ifNoneMatch_ != "" {
reqHeaders.Set("If-None-Match", c.ifNoneMatch_)
}
diff --git a/vendor/google.golang.org/grpc/clientconn.go b/vendor/google.golang.org/grpc/clientconn.go
index 146166a..459ce0b 100644
--- a/vendor/google.golang.org/grpc/clientconn.go
+++ b/vendor/google.golang.org/grpc/clientconn.go
@@ -263,6 +263,15 @@ func WithStreamInterceptor(f StreamClientInterceptor) DialOption {
}
}
+// WithAuthority returns a DialOption that specifies the value to be used as
+// the :authority pseudo-header. This value only works with WithInsecure and
+// has no effect if TransportCredentials are present.
+func WithAuthority(a string) DialOption {
+ return func(o *dialOptions) {
+ o.copts.Authority = a
+ }
+}
+
// Dial creates a client connection to the given target.
func Dial(target string, opts ...DialOption) (*ClientConn, error) {
return DialContext(context.Background(), target, opts...)
@@ -321,6 +330,8 @@ func DialContext(ctx context.Context, target string, opts ...DialOption) (conn *
creds := cc.dopts.copts.TransportCredentials
if creds != nil && creds.Info().ServerName != "" {
cc.authority = creds.Info().ServerName
+ } else if cc.dopts.insecure && cc.dopts.copts.Authority != "" {
+ cc.authority = cc.dopts.copts.Authority
} else {
colonPos := strings.LastIndex(target, ":")
if colonPos == -1 {
diff --git a/vendor/google.golang.org/grpc/metadata/metadata.go b/vendor/google.golang.org/grpc/metadata/metadata.go
index 65dc5af..7332395 100644
--- a/vendor/google.golang.org/grpc/metadata/metadata.go
+++ b/vendor/google.golang.org/grpc/metadata/metadata.go
@@ -32,6 +32,7 @@
*/
// Package metadata define the structure of the metadata supported by gRPC library.
+// Please refer to http://www.grpc.io/docs/guides/wire.html for more information about custom-metadata.
package metadata // import "google.golang.org/grpc/metadata"
import (
@@ -82,6 +83,7 @@ func DecodeKeyValue(k, v string) (string, string, error) {
type MD map[string][]string
// New creates a MD from given key-value map.
+// Keys are automatically converted to lowercase. And for keys having "-bin" as suffix, their values will be applied Base64 encoding.
func New(m map[string]string) MD {
md := MD{}
for k, v := range m {
@@ -93,6 +95,7 @@ func New(m map[string]string) MD {
// Pairs returns an MD formed by the mapping of key, value ...
// Pairs panics if len(kv) is odd.
+// Keys are automatically converted to lowercase. And for keys having "-bin" as suffix, their values will be appplied Base64 encoding.
func Pairs(kv ...string) MD {
if len(kv)%2 == 1 {
panic(fmt.Sprintf("metadata: Pairs got the odd number of input pairs for metadata: %d", len(kv)))
diff --git a/vendor/google.golang.org/grpc/rpc_util.go b/vendor/google.golang.org/grpc/rpc_util.go
index da88dad..d98a883 100644
--- a/vendor/google.golang.org/grpc/rpc_util.go
+++ b/vendor/google.golang.org/grpc/rpc_util.go
@@ -198,7 +198,7 @@ func Peer(peer *peer.Peer) CallOption {
// immediately. Otherwise, the RPC client will block the call until a
// connection is available (or the call is canceled or times out) and will retry
// the call if it fails due to a transient error. Please refer to
-// https://github.com/grpc/grpc/blob/master/doc/fail_fast.md
+// https://github.com/grpc/grpc/blob/master/doc/fail_fast.md. Note: failFast is default to true.
func FailFast(failFast bool) CallOption {
return beforeCall(func(c *callInfo) error {
c.failFast = failFast
diff --git a/vendor/google.golang.org/grpc/transport/transport.go b/vendor/google.golang.org/grpc/transport/transport.go
index d465991..caee54a 100644
--- a/vendor/google.golang.org/grpc/transport/transport.go
+++ b/vendor/google.golang.org/grpc/transport/transport.go
@@ -374,6 +374,9 @@ func NewServerTransport(protocol string, conn net.Conn, config *ServerConfig) (S
type ConnectOptions struct {
// UserAgent is the application user agent.
UserAgent string
+ // Authority is the :authority pseudo-header to use. This field has no effect if
+ // TransportCredentials is set.
+ Authority string
// Dialer specifies how to dial a network address.
Dialer func(context.Context, string) (net.Conn, error)
// FailOnNonTempDialError specifies if gRPC fails on non-temporary dial errors.
diff --git a/vendor/vendor.json b/vendor/vendor.json
index 32ee9ed..fd15266 100644
--- a/vendor/vendor.json
+++ b/vendor/vendor.json
@@ -5,176 +5,176 @@
{
"checksumSHA1": "ZLRh6zW4/DnVsGpgtt+ZiIaEFKc=",
"path": "cloud.google.com/go/compute/metadata",
- "revision": "513b07bb7468fa6d8c59519f35b66456bce959b5",
- "revisionTime": "2017-02-09T18:59:30Z"
+ "revision": "65216237311a9cfc641e2ec8188df94c0e05ddf4",
+ "revisionTime": "2017-02-17T01:53:35Z"
},
{
"checksumSHA1": "4iounbuF7SMZdx/MlKSUuhnV848=",
"path": "cloud.google.com/go/internal",
- "revision": "513b07bb7468fa6d8c59519f35b66456bce959b5",
- "revisionTime": "2017-02-09T18:59:30Z"
+ "revision": "65216237311a9cfc641e2ec8188df94c0e05ddf4",
+ "revisionTime": "2017-02-17T01:53:35Z"
},
{
"checksumSHA1": "W2xJ0+fvugRhRi1PMi64bYofBbU=",
"path": "cloud.google.com/go/internal/optional",
- "revision": "513b07bb7468fa6d8c59519f35b66456bce959b5",
- "revisionTime": "2017-02-09T18:59:30Z"
+ "revision": "65216237311a9cfc641e2ec8188df94c0e05ddf4",
+ "revisionTime": "2017-02-17T01:53:35Z"
},
{
- "checksumSHA1": "qBDDOQVU1mGqC4sbqo9AEtj5lRc=",
+ "checksumSHA1": "MJSEDjd8OT7lz9wIemq8zz7R4ok=",
"path": "cloud.google.com/go/storage",
- "revision": "513b07bb7468fa6d8c59519f35b66456bce959b5",
- "revisionTime": "2017-02-09T18:59:30Z"
+ "revision": "65216237311a9cfc641e2ec8188df94c0e05ddf4",
+ "revisionTime": "2017-02-17T01:53:35Z"
},
{
- "checksumSHA1": "atMFQwixRHu+pCBYVsUvQMVk4t0=",
+ "checksumSHA1": "BZ0q3wrp8jDPgdvCNchvPQAAlPw=",
"path": "github.com/aws/aws-sdk-go/aws",
- "revision": "0bba0f7f68dc6317b2715daf5b4e4815889b1d73",
- "revisionTime": "2017-02-11T21:41:47Z"
+ "revision": "e43e7ed87a3584fd820402855e7ff990fb10239f",
+ "revisionTime": "2017-02-17T18:44:25Z"
},
{
"checksumSHA1": "Y9W+4GimK4Fuxq+vyIskVYFRnX4=",
"path": "github.com/aws/aws-sdk-go/aws/awserr",
- "revision": "0bba0f7f68dc6317b2715daf5b4e4815889b1d73",
- "revisionTime": "2017-02-11T21:41:47Z"
+ "revision": "e43e7ed87a3584fd820402855e7ff990fb10239f",
+ "revisionTime": "2017-02-17T18:44:25Z"
},
{
"checksumSHA1": "yyYr41HZ1Aq0hWc3J5ijXwYEcac=",
"path": "github.com/aws/aws-sdk-go/aws/awsutil",
- "revision": "0bba0f7f68dc6317b2715daf5b4e4815889b1d73",
- "revisionTime": "2017-02-11T21:41:47Z"
+ "revision": "e43e7ed87a3584fd820402855e7ff990fb10239f",
+ "revisionTime": "2017-02-17T18:44:25Z"
},
{
"checksumSHA1": "iThCyNRL/oQFD9CF2SYgBGl+aww=",
"path": "github.com/aws/aws-sdk-go/aws/client",
- "revision": "0bba0f7f68dc6317b2715daf5b4e4815889b1d73",
- "revisionTime": "2017-02-11T21:41:47Z"
+ "revision": "e43e7ed87a3584fd820402855e7ff990fb10239f",
+ "revisionTime": "2017-02-17T18:44:25Z"
},
{
"checksumSHA1": "ieAJ+Cvp/PKv1LpUEnUXpc3OI6E=",
"path": "github.com/aws/aws-sdk-go/aws/client/metadata",
- "revision": "0bba0f7f68dc6317b2715daf5b4e4815889b1d73",
- "revisionTime": "2017-02-11T21:41:47Z"
+ "revision": "e43e7ed87a3584fd820402855e7ff990fb10239f",
+ "revisionTime": "2017-02-17T18:44:25Z"
},
{
"checksumSHA1": "Fl8vRSCY0MbM04cmiz/0MID+goA=",
"path": "github.com/aws/aws-sdk-go/aws/corehandlers",
- "revision": "0bba0f7f68dc6317b2715daf5b4e4815889b1d73",
- "revisionTime": "2017-02-11T21:41:47Z"
+ "revision": "e43e7ed87a3584fd820402855e7ff990fb10239f",
+ "revisionTime": "2017-02-17T18:44:25Z"
},
{
"checksumSHA1": "zu5C95rmCZff6NYZb62lEaT5ibE=",
"path": "github.com/aws/aws-sdk-go/aws/credentials",
- "revision": "0bba0f7f68dc6317b2715daf5b4e4815889b1d73",
- "revisionTime": "2017-02-11T21:41:47Z"
+ "revision": "e43e7ed87a3584fd820402855e7ff990fb10239f",
+ "revisionTime": "2017-02-17T18:44:25Z"
},
{
"checksumSHA1": "u3GOAJLmdvbuNUeUEcZSEAOeL/0=",
"path": "github.com/aws/aws-sdk-go/aws/credentials/ec2rolecreds",
- "revision": "0bba0f7f68dc6317b2715daf5b4e4815889b1d73",
- "revisionTime": "2017-02-11T21:41:47Z"
+ "revision": "e43e7ed87a3584fd820402855e7ff990fb10239f",
+ "revisionTime": "2017-02-17T18:44:25Z"
},
{
"checksumSHA1": "NUJUTWlc1sV8b7WjfiYc4JZbXl0=",
"path": "github.com/aws/aws-sdk-go/aws/credentials/endpointcreds",
- "revision": "0bba0f7f68dc6317b2715daf5b4e4815889b1d73",
- "revisionTime": "2017-02-11T21:41:47Z"
+ "revision": "e43e7ed87a3584fd820402855e7ff990fb10239f",
+ "revisionTime": "2017-02-17T18:44:25Z"
},
{
"checksumSHA1": "4Ipx+5xN0gso+cENC2MHMWmQlR4=",
"path": "github.com/aws/aws-sdk-go/aws/credentials/stscreds",
- "revision": "0bba0f7f68dc6317b2715daf5b4e4815889b1d73",
- "revisionTime": "2017-02-11T21:41:47Z"
+ "revision": "e43e7ed87a3584fd820402855e7ff990fb10239f",
+ "revisionTime": "2017-02-17T18:44:25Z"
},
{
"checksumSHA1": "lqh3fG7wCochvB4iHAZJuhhEJW0=",
"path": "github.com/aws/aws-sdk-go/aws/defaults",
- "revision": "0bba0f7f68dc6317b2715daf5b4e4815889b1d73",
- "revisionTime": "2017-02-11T21:41:47Z"
+ "revision": "e43e7ed87a3584fd820402855e7ff990fb10239f",
+ "revisionTime": "2017-02-17T18:44:25Z"
},
{
"checksumSHA1": "/EXbk/z2TWjWc1Hvb4QYs3Wmhb8=",
"path": "github.com/aws/aws-sdk-go/aws/ec2metadata",
- "revision": "0bba0f7f68dc6317b2715daf5b4e4815889b1d73",
- "revisionTime": "2017-02-11T21:41:47Z"
+ "revision": "e43e7ed87a3584fd820402855e7ff990fb10239f",
+ "revisionTime": "2017-02-17T18:44:25Z"
},
{
"checksumSHA1": "JTrzEDPXL3pUUH+dMCixz9T9rLY=",
"path": "github.com/aws/aws-sdk-go/aws/endpoints",
- "revision": "0bba0f7f68dc6317b2715daf5b4e4815889b1d73",
- "revisionTime": "2017-02-11T21:41:47Z"
+ "revision": "e43e7ed87a3584fd820402855e7ff990fb10239f",
+ "revisionTime": "2017-02-17T18:44:25Z"
},
{
"checksumSHA1": "M78rTxU55Qagqr3MYj91im2031E=",
"path": "github.com/aws/aws-sdk-go/aws/request",
- "revision": "0bba0f7f68dc6317b2715daf5b4e4815889b1d73",
- "revisionTime": "2017-02-11T21:41:47Z"
+ "revision": "e43e7ed87a3584fd820402855e7ff990fb10239f",
+ "revisionTime": "2017-02-17T18:44:25Z"
},
{
"checksumSHA1": "bYywgCKzqJQtFsL+XpuVRELYsgw=",
"path": "github.com/aws/aws-sdk-go/aws/session",
- "revision": "0bba0f7f68dc6317b2715daf5b4e4815889b1d73",
- "revisionTime": "2017-02-11T21:41:47Z"
+ "revision": "e43e7ed87a3584fd820402855e7ff990fb10239f",
+ "revisionTime": "2017-02-17T18:44:25Z"
},
{
"checksumSHA1": "0FvPLvkBUpTElfUc/FZtPsJfuV0=",
"path": "github.com/aws/aws-sdk-go/aws/signer/v4",
- "revision": "0bba0f7f68dc6317b2715daf5b4e4815889b1d73",
- "revisionTime": "2017-02-11T21:41:47Z"
+ "revision": "e43e7ed87a3584fd820402855e7ff990fb10239f",
+ "revisionTime": "2017-02-17T18:44:25Z"
},
{
"checksumSHA1": "wk7EyvDaHwb5qqoOP/4d3cV0708=",
"path": "github.com/aws/aws-sdk-go/private/protocol",
- "revision": "0bba0f7f68dc6317b2715daf5b4e4815889b1d73",
- "revisionTime": "2017-02-11T21:41:47Z"
+ "revision": "e43e7ed87a3584fd820402855e7ff990fb10239f",
+ "revisionTime": "2017-02-17T18:44:25Z"
},
{
"checksumSHA1": "ZqY5RWavBLWTo6j9xqdyBEaNFRk=",
"path": "github.com/aws/aws-sdk-go/private/protocol/query",
- "revision": "0bba0f7f68dc6317b2715daf5b4e4815889b1d73",
- "revisionTime": "2017-02-11T21:41:47Z"
+ "revision": "e43e7ed87a3584fd820402855e7ff990fb10239f",
+ "revisionTime": "2017-02-17T18:44:25Z"
},
{
"checksumSHA1": "hqTEmgtchF9SwVTW0IQId2eLUKM=",
"path": "github.com/aws/aws-sdk-go/private/protocol/query/queryutil",
- "revision": "0bba0f7f68dc6317b2715daf5b4e4815889b1d73",
- "revisionTime": "2017-02-11T21:41:47Z"
+ "revision": "e43e7ed87a3584fd820402855e7ff990fb10239f",
+ "revisionTime": "2017-02-17T18:44:25Z"
},
{
"checksumSHA1": "szZSLm3BlYkL3vqlZhNAlYk8iwM=",
"path": "github.com/aws/aws-sdk-go/private/protocol/rest",
- "revision": "0bba0f7f68dc6317b2715daf5b4e4815889b1d73",
- "revisionTime": "2017-02-11T21:41:47Z"
+ "revision": "e43e7ed87a3584fd820402855e7ff990fb10239f",
+ "revisionTime": "2017-02-17T18:44:25Z"
},
{
"checksumSHA1": "ODo+ko8D6unAxZuN1jGzMcN4QCc=",
"path": "github.com/aws/aws-sdk-go/private/protocol/restxml",
- "revision": "0bba0f7f68dc6317b2715daf5b4e4815889b1d73",
- "revisionTime": "2017-02-11T21:41:47Z"
+ "revision": "e43e7ed87a3584fd820402855e7ff990fb10239f",
+ "revisionTime": "2017-02-17T18:44:25Z"
},
{
"checksumSHA1": "lZ1z4xAbT8euCzKoAsnEYic60VE=",
"path": "github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil",
- "revision": "0bba0f7f68dc6317b2715daf5b4e4815889b1d73",
- "revisionTime": "2017-02-11T21:41:47Z"
+ "revision": "e43e7ed87a3584fd820402855e7ff990fb10239f",
+ "revisionTime": "2017-02-17T18:44:25Z"
},
{
"checksumSHA1": "Eo9yODN5U99BK0pMzoqnBm7PCrY=",
"path": "github.com/aws/aws-sdk-go/private/waiter",
- "revision": "0bba0f7f68dc6317b2715daf5b4e4815889b1d73",
- "revisionTime": "2017-02-11T21:41:47Z"
+ "revision": "e43e7ed87a3584fd820402855e7ff990fb10239f",
+ "revisionTime": "2017-02-17T18:44:25Z"
},
{
"checksumSHA1": "eEWM4wKzVbRqAwIy3MdMCDUGs2s=",
"path": "github.com/aws/aws-sdk-go/service/s3",
- "revision": "0bba0f7f68dc6317b2715daf5b4e4815889b1d73",
- "revisionTime": "2017-02-11T21:41:47Z"
+ "revision": "e43e7ed87a3584fd820402855e7ff990fb10239f",
+ "revisionTime": "2017-02-17T18:44:25Z"
},
{
"checksumSHA1": "Knj17ZMPWkGYTm2hZxEgnuboMM4=",
"path": "github.com/aws/aws-sdk-go/service/sts",
- "revision": "0bba0f7f68dc6317b2715daf5b4e4815889b1d73",
- "revisionTime": "2017-02-11T21:41:47Z"
+ "revision": "e43e7ed87a3584fd820402855e7ff990fb10239f",
+ "revisionTime": "2017-02-17T18:44:25Z"
},
{
"checksumSHA1": "spyv5/YFBjYyZLZa1U2LBfDR8PM=",
@@ -243,10 +243,10 @@
"revisionTime": "2017-02-17T23:44:32Z"
},
{
- "checksumSHA1": "9Qfs+Inw01bIOhsXfKCmNSueXLk=",
+ "checksumSHA1": "4xL1Xu1hr+W5jJR0x3guQPH3SHM=",
"path": "github.com/google/go-github/github",
- "revision": "9cb398ca482c8f7e59eecc0f6caf669a6256b01a",
- "revisionTime": "2017-02-12T16:27:23Z"
+ "revision": "2ec691a35b10b8c1471955a96d0f182a572e1cad",
+ "revisionTime": "2017-02-18T23:40:47Z"
},
{
"checksumSHA1": "p3IB18uJRs4dL2K5yx24MrLYE9A=",
@@ -281,8 +281,8 @@
{
"checksumSHA1": "F5dR3/i70EhSIMZfeIV+H8/PtvM=",
"path": "github.com/gorilla/mux",
- "revision": "392c28fe23e1c45ddba891b0320b3b5df220beea",
- "revisionTime": "2017-01-18T13:43:44Z"
+ "revision": "94e7d24fd285520f3d12ae998f7fdd6b5393d453",
+ "revisionTime": "2017-02-17T19:26:16Z"
},
{
"checksumSHA1": "veX5bpYOBjZZWMyWxXxys8EH9d8=",
@@ -323,74 +323,74 @@
{
"checksumSHA1": "Ok3Csn6Voou7pQT6Dv2mkwpqFtw=",
"path": "github.com/hashicorp/hcl",
- "revision": "372e8ddaa16fd67e371e9323807d056b799360af",
- "revisionTime": "2017-02-02T00:05:34Z"
+ "revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b",
+ "revisionTime": "2017-02-17T16:47:38Z"
},
{
"checksumSHA1": "XQmjDva9JCGGkIecOgwtBEMCJhU=",
"path": "github.com/hashicorp/hcl/hcl/ast",
- "revision": "372e8ddaa16fd67e371e9323807d056b799360af",
- "revisionTime": "2017-02-02T00:05:34Z"
+ "revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b",
+ "revisionTime": "2017-02-17T16:47:38Z"
},
{
"checksumSHA1": "MGYzZActhzSs9AnCx3wrEYVbKFg=",
"path": "github.com/hashicorp/hcl/hcl/parser",
- "revision": "372e8ddaa16fd67e371e9323807d056b799360af",
- "revisionTime": "2017-02-02T00:05:34Z"
+ "revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b",
+ "revisionTime": "2017-02-17T16:47:38Z"
},
{
"checksumSHA1": "z6wdP4mRw4GVjShkNHDaOWkbxS0=",
"path": "github.com/hashicorp/hcl/hcl/scanner",
- "revision": "372e8ddaa16fd67e371e9323807d056b799360af",
- "revisionTime": "2017-02-02T00:05:34Z"
+ "revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b",
+ "revisionTime": "2017-02-17T16:47:38Z"
},
{
"checksumSHA1": "oS3SCN9Wd6D8/LG0Yx1fu84a7gI=",
"path": "github.com/hashicorp/hcl/hcl/strconv",
- "revision": "372e8ddaa16fd67e371e9323807d056b799360af",
- "revisionTime": "2017-02-02T00:05:34Z"
+ "revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b",
+ "revisionTime": "2017-02-17T16:47:38Z"
},
{
"checksumSHA1": "c6yprzj06ASwCo18TtbbNNBHljA=",
"path": "github.com/hashicorp/hcl/hcl/token",
- "revision": "372e8ddaa16fd67e371e9323807d056b799360af",
- "revisionTime": "2017-02-02T00:05:34Z"
+ "revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b",
+ "revisionTime": "2017-02-17T16:47:38Z"
},
{
"checksumSHA1": "138aCV5n8n7tkGYMsMVQQnnLq+0=",
"path": "github.com/hashicorp/hcl/json/parser",
- "revision": "372e8ddaa16fd67e371e9323807d056b799360af",
- "revisionTime": "2017-02-02T00:05:34Z"
+ "revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b",
+ "revisionTime": "2017-02-17T16:47:38Z"
},
{
"checksumSHA1": "YdvFsNOMSWMLnY6fcliWQa0O5Fw=",
"path": "github.com/hashicorp/hcl/json/scanner",
- "revision": "372e8ddaa16fd67e371e9323807d056b799360af",
- "revisionTime": "2017-02-02T00:05:34Z"
+ "revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b",
+ "revisionTime": "2017-02-17T16:47:38Z"
},
{
"checksumSHA1": "fNlXQCQEnb+B3k5UDL/r15xtSJY=",
"path": "github.com/hashicorp/hcl/json/token",
- "revision": "372e8ddaa16fd67e371e9323807d056b799360af",
- "revisionTime": "2017-02-02T00:05:34Z"
+ "revision": "630949a3c5fa3c613328e1b8256052cbc2327c9b",
+ "revisionTime": "2017-02-17T16:47:38Z"
},
{
- "checksumSHA1": "l0levVQE5+zSaiOCPbU12rYgRyE=",
+ "checksumSHA1": "Uv/n9cHABTFDFoxNkO8DUaVCgpY=",
"path": "github.com/hashicorp/vault/api",
- "revision": "5f6c4a9696c563135793d569c0e6b2aa23691556",
- "revisionTime": "2017-02-11T00:57:53Z"
+ "revision": "de87216a04d2d444df3c3d7f643f23d186f10fe2",
+ "revisionTime": "2017-02-18T18:53:23Z"
},
{
"checksumSHA1": "ft77GtqeZEeCXioGpF/s6DlGm/U=",
"path": "github.com/hashicorp/vault/helper/compressutil",
- "revision": "5f6c4a9696c563135793d569c0e6b2aa23691556",
- "revisionTime": "2017-02-11T00:57:53Z"
+ "revision": "de87216a04d2d444df3c3d7f643f23d186f10fe2",
+ "revisionTime": "2017-02-18T18:53:23Z"
},
{
"checksumSHA1": "yUiSTPf0QUuL2r/81sjuytqBoeQ=",
"path": "github.com/hashicorp/vault/helper/jsonutil",
- "revision": "5f6c4a9696c563135793d569c0e6b2aa23691556",
- "revisionTime": "2017-02-11T00:57:53Z"
+ "revision": "de87216a04d2d444df3c3d7f643f23d186f10fe2",
+ "revisionTime": "2017-02-18T18:53:23Z"
},
{
"checksumSHA1": "1kyuVsFZJgHR7KZ2inXSo2RMzsk=",
@@ -423,10 +423,10 @@
"revisionTime": "2017-01-13T09:48:12Z"
},
{
- "checksumSHA1": "07f2TGgPsNaohoNTLQxeF7tw5lY=",
+ "checksumSHA1": "H2xCX/zhPFw9CY3jo2UBOzQPIU0=",
"path": "github.com/mattn/go-sqlite3",
- "revision": "588cd3292ba03bb748befd607cc5c72e13204533",
- "revisionTime": "2017-02-11T12:47:11Z"
+ "revision": "2acfafad5870400156f6fceb12852c281cbba4d5",
+ "revisionTime": "2017-02-16T06:57:29Z"
},
{
"checksumSHA1": "bKMZjd2wPw13VwoE7mBeSv5djFA=",
@@ -467,8 +467,8 @@
{
"checksumSHA1": "nt7BOOwTv0OJNSi3R05uk+LLmcU=",
"path": "github.com/pelletier/go-toml",
- "revision": "c9506ee96398e7571356462217b9e24d6a628d71",
- "revisionTime": "2017-02-09T21:38:35Z"
+ "revision": "22139eb5469018e7374b3e7ef653de37ffb44f72",
+ "revisionTime": "2017-02-17T01:27:36Z"
},
{
"checksumSHA1": "MkvL3qMX3uO1HOeKc8QRiE1onwg=",
@@ -489,46 +489,52 @@
"revisionTime": "2016-01-10T10:55:54Z"
},
{
- "checksumSHA1": "rILQFeC64+uX7CVKL23a9ACt6fU=",
+ "checksumSHA1": "j1fbARQhG39dZ7Xugg8vGmaVBG0=",
"path": "github.com/prometheus/client_golang/prometheus",
- "revision": "c317fb74746eac4fc65fe3909195f4cf67c5562a",
- "revisionTime": "2017-01-25T12:09:23Z"
+ "revision": "6ab3432d241cbe3cb7543da7e7e9a934c7e9fe76",
+ "revisionTime": "2017-02-17T08:31:07Z"
},
{
"checksumSHA1": "lG3//eDlwqA4IOuAPrNtLh9G0TA=",
"path": "github.com/prometheus/client_golang/prometheus/promhttp",
- "revision": "c317fb74746eac4fc65fe3909195f4cf67c5562a",
- "revisionTime": "2017-01-25T12:09:23Z"
+ "revision": "6ab3432d241cbe3cb7543da7e7e9a934c7e9fe76",
+ "revisionTime": "2017-02-17T08:31:07Z"
},
{
"checksumSHA1": "DvwvOlPNAgRntBzt3b3OSRMS2N4=",
"path": "github.com/prometheus/client_model/go",
- "revision": "fa8ad6fec33561be4280a8f0514318c79d7f6cb6",
- "revisionTime": "2015-02-12T10:17:44Z"
+ "revision": "6f3806018612930941127f2a7c6c453ba2c527d2",
+ "revisionTime": "2017-02-16T18:52:47Z"
},
{
"checksumSHA1": "Wtpzndm/+bdwwNU5PCTfb4oUhc8=",
"path": "github.com/prometheus/common/expfmt",
- "revision": "dd2f054febf4a6c00f2343686efb775948a8bff4",
- "revisionTime": "2017-01-08T23:12:12Z"
+ "revision": "3007b6072c17c8d985734e6e19b1dea9174e13d3",
+ "revisionTime": "2017-02-18T23:35:58Z"
},
{
"checksumSHA1": "GWlM3d2vPYyNATtTFgftS10/A9w=",
"path": "github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg",
- "revision": "dd2f054febf4a6c00f2343686efb775948a8bff4",
- "revisionTime": "2017-01-08T23:12:12Z"
+ "revision": "3007b6072c17c8d985734e6e19b1dea9174e13d3",
+ "revisionTime": "2017-02-18T23:35:58Z"
},
{
- "checksumSHA1": "vopCLXHzYm+3l5fPKOf4/fQwrCM=",
+ "checksumSHA1": "0LL9u9tfv1KPBjNEiMDP6q7lpog=",
"path": "github.com/prometheus/common/model",
- "revision": "dd2f054febf4a6c00f2343686efb775948a8bff4",
- "revisionTime": "2017-01-08T23:12:12Z"
+ "revision": "3007b6072c17c8d985734e6e19b1dea9174e13d3",
+ "revisionTime": "2017-02-18T23:35:58Z"
},
{
- "checksumSHA1": "usUy/UxFXpMusOWgLNDNp4+s/ks=",
+ "checksumSHA1": "cD4xn1qxbkiuXqUExpdnDroCTrY=",
"path": "github.com/prometheus/procfs",
- "revision": "1878d9fbb537119d24b21ca07effd591627cd160",
- "revisionTime": "2017-01-28T16:01:23Z"
+ "revision": "a1dba9ce8baed984a2495b658c82687f8157b98f",
+ "revisionTime": "2017-02-16T22:32:56Z"
+ },
+ {
+ "checksumSHA1": "kOWRcAHWFkId0aCIOSOyjzC0Zfc=",
+ "path": "github.com/prometheus/procfs/xfs",
+ "revision": "a1dba9ce8baed984a2495b658c82687f8157b98f",
+ "revisionTime": "2017-02-16T22:32:56Z"
},
{
"checksumSHA1": "A8ptzv+SqJ1dAEwFZ2EDp+bwOeg=",
@@ -557,14 +563,14 @@
{
"checksumSHA1": "lBehULzb2/kIK3wZ0gz2yNmHq9s=",
"path": "github.com/spf13/afero",
- "revision": "72b31426848c6ef12a7a8e216708cb0d1530f074",
- "revisionTime": "2017-01-09T22:53:20Z"
+ "revision": "9be650865eab0c12963d8753212f4f9c66cdcf12",
+ "revisionTime": "2017-02-17T16:41:46Z"
},
{
"checksumSHA1": "5KRbEQ28dDaQmKwAYTD0if/aEvg=",
"path": "github.com/spf13/afero/mem",
- "revision": "72b31426848c6ef12a7a8e216708cb0d1530f074",
- "revisionTime": "2017-01-09T22:53:20Z"
+ "revision": "9be650865eab0c12963d8753212f4f9c66cdcf12",
+ "revisionTime": "2017-02-17T16:41:46Z"
},
{
"checksumSHA1": "6O3g4Dgt5zkgPcccYK73YvzKfWI=",
@@ -585,10 +591,10 @@
"revisionTime": "2017-01-30T21:42:45Z"
},
{
- "checksumSHA1": "Ru5RGygreAp5OW9B6kO5Zawjt08=",
+ "checksumSHA1": "cNe3MKwsFLDRzRjKEtOduUiG344=",
"path": "github.com/spf13/viper",
- "revision": "5ed0fc31f7f453625df314d8e66b9791e8d13003",
- "revisionTime": "2016-12-13T09:38:49Z"
+ "revision": "7538d73b4eb9511d85a9f1dfef202eeb8ac260f4",
+ "revisionTime": "2017-02-17T16:38:17Z"
},
{
"checksumSHA1": "JXUVA1jky8ZX8w09p2t5KLs97Nc=",
@@ -603,10 +609,10 @@
"revisionTime": "2016-07-21T22:16:07Z"
},
{
- "checksumSHA1": "W1lwDIvT/MwN5FdfS7j3LMypoGQ=",
+ "checksumSHA1": "gRNgT0FF84YFe7bWtLMMel/bKjc=",
"path": "github.com/xanzy/go-gitlab",
- "revision": "726289beb12ec90d327f778901ef6259339f6312",
- "revisionTime": "2017-02-04T12:15:04Z"
+ "revision": "189ae0a841d3d0b3999ee2ae5d53203c3809a2bc",
+ "revisionTime": "2017-02-16T09:42:16Z"
},
{
"checksumSHA1": "RBe0HvUoZ1JL4XXPxslcvt+E6AI=",
@@ -665,14 +671,14 @@
{
"checksumSHA1": "Y+HGqEkYM15ir+J93MEaHdyFy0c=",
"path": "golang.org/x/net/context",
- "revision": "61557ac0112b576429a0df080e1c2cef5dfbb642",
- "revisionTime": "2017-01-26T11:54:58Z"
+ "revision": "6b27048ae5e6ad1ef927e72e437531493de612fe",
+ "revisionTime": "2017-02-17T08:49:01Z"
},
{
"checksumSHA1": "WHc3uByvGaMcnSoI21fhzYgbOgg=",
"path": "golang.org/x/net/context/ctxhttp",
- "revision": "61557ac0112b576429a0df080e1c2cef5dfbb642",
- "revisionTime": "2017-01-26T11:54:58Z"
+ "revision": "6b27048ae5e6ad1ef927e72e437531493de612fe",
+ "revisionTime": "2017-02-17T08:49:01Z"
},
{
"checksumSHA1": "LC+mzxnIrUS9Kr4s7shpY+A9J2o=",
@@ -695,8 +701,8 @@
{
"checksumSHA1": "UxahDzW2v4mf/+aFxruuupaoIwo=",
"path": "golang.org/x/net/internal/timeseries",
- "revision": "61557ac0112b576429a0df080e1c2cef5dfbb642",
- "revisionTime": "2017-01-26T11:54:58Z"
+ "revision": "6b27048ae5e6ad1ef927e72e437531493de612fe",
+ "revisionTime": "2017-02-17T08:49:01Z"
},
{
"checksumSHA1": "3xyuaSNmClqG4YWC7g0isQIbUTc=",
@@ -707,146 +713,146 @@
{
"checksumSHA1": "GQHKESPeCcAsnerZPtHadvKUIzs=",
"path": "golang.org/x/net/trace",
- "revision": "61557ac0112b576429a0df080e1c2cef5dfbb642",
- "revisionTime": "2017-01-26T11:54:58Z"
+ "revision": "6b27048ae5e6ad1ef927e72e437531493de612fe",
+ "revisionTime": "2017-02-17T08:49:01Z"
},
{
"checksumSHA1": "nJGYSAwWAjkslNuv7w6yvmjf2K8=",
"path": "golang.org/x/oauth2",
- "revision": "de0725b330ab43c1a3d6c84d961cf01183783f1e",
- "revisionTime": "2017-02-08T23:51:47Z"
+ "revision": "b9780ec78894ab900c062d58ee3076cd9b2a4501",
+ "revisionTime": "2017-02-14T22:24:16Z"
},
{
"checksumSHA1": "Yokz/Wl4zeuOZG2ev8LuaLtMotE=",
"path": "golang.org/x/oauth2/github",
- "revision": "de0725b330ab43c1a3d6c84d961cf01183783f1e",
- "revisionTime": "2017-02-08T23:51:47Z"
+ "revision": "b9780ec78894ab900c062d58ee3076cd9b2a4501",
+ "revisionTime": "2017-02-14T22:24:16Z"
},
{
"checksumSHA1": "rEzA1cW2NdfF9ndGQHTNzE5+mF4=",
"path": "golang.org/x/oauth2/google",
- "revision": "de0725b330ab43c1a3d6c84d961cf01183783f1e",
- "revisionTime": "2017-02-08T23:51:47Z"
+ "revision": "b9780ec78894ab900c062d58ee3076cd9b2a4501",
+ "revisionTime": "2017-02-14T22:24:16Z"
},
{
- "checksumSHA1": "O8Y5cMmHqBfPH2i7qxTufl0bdII=",
+ "checksumSHA1": "gChvVZYdb6Bw/vjIpfYJfNvXPoU=",
"path": "golang.org/x/oauth2/internal",
- "revision": "de0725b330ab43c1a3d6c84d961cf01183783f1e",
- "revisionTime": "2017-02-08T23:51:47Z"
+ "revision": "b9780ec78894ab900c062d58ee3076cd9b2a4501",
+ "revisionTime": "2017-02-14T22:24:16Z"
},
{
"checksumSHA1": "huVltYnXdRFDJLgp/ZP9IALzG7g=",
"path": "golang.org/x/oauth2/jws",
- "revision": "de0725b330ab43c1a3d6c84d961cf01183783f1e",
- "revisionTime": "2017-02-08T23:51:47Z"
+ "revision": "b9780ec78894ab900c062d58ee3076cd9b2a4501",
+ "revisionTime": "2017-02-14T22:24:16Z"
},
{
"checksumSHA1": "/eV4E08BY+f1ZikiR7OOMJAj3m0=",
"path": "golang.org/x/oauth2/jwt",
- "revision": "de0725b330ab43c1a3d6c84d961cf01183783f1e",
- "revisionTime": "2017-02-08T23:51:47Z"
+ "revision": "b9780ec78894ab900c062d58ee3076cd9b2a4501",
+ "revisionTime": "2017-02-14T22:24:16Z"
},
{
- "checksumSHA1": "0SIHiKpZ7earBAzuyvWOQv93Kgc=",
+ "checksumSHA1": "ruEvGIBt119UK7KTkoNaYnYhZuI=",
"path": "golang.org/x/sys/unix",
- "revision": "aaabbdc969c3935a2a7f61efac801e7163c73a2a",
- "revisionTime": "2017-02-10T14:16:29Z"
+ "revision": "075e574b89e4c2d22f2286a7e2b919519c6f3547",
+ "revisionTime": "2017-02-16T21:06:26Z"
},
{
"checksumSHA1": "kv3jbPJGCczHVQ7g51am1MxlD1c=",
"path": "golang.org/x/text/internal/gen",
- "revision": "06d6eba81293389cafdff7fca90d75592194b2d9",
- "revisionTime": "2017-02-07T17:42:20Z"
+ "revision": "85c29909967d7f171f821e7a42e7b7af76fb9598",
+ "revisionTime": "2017-02-11T12:01:23Z"
},
{
"checksumSHA1": "47nwiUyVBY2RKoEGXmCSvusY4Js=",
"path": "golang.org/x/text/internal/triegen",
- "revision": "06d6eba81293389cafdff7fca90d75592194b2d9",
- "revisionTime": "2017-02-07T17:42:20Z"
+ "revision": "85c29909967d7f171f821e7a42e7b7af76fb9598",
+ "revisionTime": "2017-02-11T12:01:23Z"
},
{
"checksumSHA1": "Yd5wMObzagIfCiKLpZbtBIrOUA4=",
"path": "golang.org/x/text/internal/ucd",
- "revision": "06d6eba81293389cafdff7fca90d75592194b2d9",
- "revisionTime": "2017-02-07T17:42:20Z"
+ "revision": "85c29909967d7f171f821e7a42e7b7af76fb9598",
+ "revisionTime": "2017-02-11T12:01:23Z"
},
{
"checksumSHA1": "ziMb9+ANGRJSSIuxYdRbA+cDRBQ=",
"path": "golang.org/x/text/transform",
- "revision": "06d6eba81293389cafdff7fca90d75592194b2d9",
- "revisionTime": "2017-02-07T17:42:20Z"
+ "revision": "85c29909967d7f171f821e7a42e7b7af76fb9598",
+ "revisionTime": "2017-02-11T12:01:23Z"
},
{
"checksumSHA1": "i14IZXKECObKRUNvTr7xivSL1IU=",
"path": "golang.org/x/text/unicode/cldr",
- "revision": "06d6eba81293389cafdff7fca90d75592194b2d9",
- "revisionTime": "2017-02-07T17:42:20Z"
+ "revision": "85c29909967d7f171f821e7a42e7b7af76fb9598",
+ "revisionTime": "2017-02-11T12:01:23Z"
},
{
"checksumSHA1": "7Hjtgu1Yu+Ks0cKf2ldRhXAu/LE=",
"path": "golang.org/x/text/unicode/norm",
- "revision": "06d6eba81293389cafdff7fca90d75592194b2d9",
- "revisionTime": "2017-02-07T17:42:20Z"
+ "revision": "85c29909967d7f171f821e7a42e7b7af76fb9598",
+ "revisionTime": "2017-02-11T12:01:23Z"
},
{
"checksumSHA1": "C7k1pbU/WU4CBoBwA4EBUnV/iek=",
"path": "google.golang.org/api/gensupport",
- "revision": "2da5589ad30130b51fa58b5acbceaeb647ebe06e",
- "revisionTime": "2017-02-10T17:11:45Z"
+ "revision": "bc20c61134e1d25265dd60049f5735381e79b631",
+ "revisionTime": "2017-02-10T21:56:36Z"
},
{
"checksumSHA1": "BWKmb7kGYbfbvXO6E7tCpTh9zKE=",
"path": "google.golang.org/api/googleapi",
- "revision": "2da5589ad30130b51fa58b5acbceaeb647ebe06e",
- "revisionTime": "2017-02-10T17:11:45Z"
+ "revision": "bc20c61134e1d25265dd60049f5735381e79b631",
+ "revisionTime": "2017-02-10T21:56:36Z"
},
{
"checksumSHA1": "1K0JxrUfDqAB3MyRiU1LKjfHyf4=",
"path": "google.golang.org/api/googleapi/internal/uritemplates",
- "revision": "2da5589ad30130b51fa58b5acbceaeb647ebe06e",
- "revisionTime": "2017-02-10T17:11:45Z"
+ "revision": "bc20c61134e1d25265dd60049f5735381e79b631",
+ "revisionTime": "2017-02-10T21:56:36Z"
},
{
"checksumSHA1": "Mr2fXhMRzlQCgANFm91s536pG7E=",
"path": "google.golang.org/api/googleapi/transport",
- "revision": "2da5589ad30130b51fa58b5acbceaeb647ebe06e",
- "revisionTime": "2017-02-10T17:11:45Z"
+ "revision": "bc20c61134e1d25265dd60049f5735381e79b631",
+ "revisionTime": "2017-02-10T21:56:36Z"
},
{
"checksumSHA1": "GAKy8Id2Qx7BI0kZPRjGn1RjVQo=",
"path": "google.golang.org/api/internal",
- "revision": "2da5589ad30130b51fa58b5acbceaeb647ebe06e",
- "revisionTime": "2017-02-10T17:11:45Z"
+ "revision": "bc20c61134e1d25265dd60049f5735381e79b631",
+ "revisionTime": "2017-02-10T21:56:36Z"
},
{
"checksumSHA1": "slcGOTGSdukEPPSN81Q5WZGmhog=",
"path": "google.golang.org/api/iterator",
- "revision": "2da5589ad30130b51fa58b5acbceaeb647ebe06e",
- "revisionTime": "2017-02-10T17:11:45Z"
+ "revision": "bc20c61134e1d25265dd60049f5735381e79b631",
+ "revisionTime": "2017-02-10T21:56:36Z"
},
{
- "checksumSHA1": "H/eWxTktOkG5X/1JcIIwSi/DnFg=",
+ "checksumSHA1": "NOB5JGCRZzeuudvsNUtlD9Ri218=",
"path": "google.golang.org/api/oauth2/v2",
- "revision": "2da5589ad30130b51fa58b5acbceaeb647ebe06e",
- "revisionTime": "2017-02-10T17:11:45Z"
+ "revision": "bc20c61134e1d25265dd60049f5735381e79b631",
+ "revisionTime": "2017-02-10T21:56:36Z"
},
{
"checksumSHA1": "hZ9zds+/FPwSGEiti5lGaZL3e6w=",
"path": "google.golang.org/api/option",
- "revision": "2da5589ad30130b51fa58b5acbceaeb647ebe06e",
- "revisionTime": "2017-02-10T17:11:45Z"
+ "revision": "bc20c61134e1d25265dd60049f5735381e79b631",
+ "revisionTime": "2017-02-10T21:56:36Z"
},
{
"checksumSHA1": "fxbPUw1XvbSMz6Atx6OOMkRdJ0g=",
"path": "google.golang.org/api/storage/v1",
- "revision": "2da5589ad30130b51fa58b5acbceaeb647ebe06e",
- "revisionTime": "2017-02-10T17:11:45Z"
+ "revision": "bc20c61134e1d25265dd60049f5735381e79b631",
+ "revisionTime": "2017-02-10T21:56:36Z"
},
{
"checksumSHA1": "X0tDDr1hFxf9ahw7Nw2S994XD5M=",
"path": "google.golang.org/api/transport",
- "revision": "2da5589ad30130b51fa58b5acbceaeb647ebe06e",
- "revisionTime": "2017-02-10T17:11:45Z"
+ "revision": "bc20c61134e1d25265dd60049f5735381e79b631",
+ "revisionTime": "2017-02-10T21:56:36Z"
},
{
"checksumSHA1": "8K4KAebYh3WnPh0swPzOgl1pRD0=",
@@ -921,76 +927,76 @@
"revisionTime": "2017-02-06T20:30:24Z"
},
{
- "checksumSHA1": "qZxgld7hxGD9enA3Qygg08Mw06s=",
+ "checksumSHA1": "8Z43m+zNTbxHUHQPMUNirEp1BLg=",
"path": "google.golang.org/grpc",
- "revision": "4acc9108c18937815db3306a66990869d22aa980",
- "revisionTime": "2017-02-10T23:46:57Z"
+ "revision": "d0c32ee6a441117d49856d6120ca9552af413ee0",
+ "revisionTime": "2017-02-16T00:36:43Z"
},
{
"checksumSHA1": "08icuA15HRkdYCt6H+Cs90RPQsY=",
"path": "google.golang.org/grpc/codes",
- "revision": "4acc9108c18937815db3306a66990869d22aa980",
- "revisionTime": "2017-02-10T23:46:57Z"
+ "revision": "d0c32ee6a441117d49856d6120ca9552af413ee0",
+ "revisionTime": "2017-02-16T00:36:43Z"
},
{
"checksumSHA1": "AGkvu7gY1jWK7v5s9a8qLlH2gcQ=",
"path": "google.golang.org/grpc/credentials",
- "revision": "4acc9108c18937815db3306a66990869d22aa980",
- "revisionTime": "2017-02-10T23:46:57Z"
+ "revision": "d0c32ee6a441117d49856d6120ca9552af413ee0",
+ "revisionTime": "2017-02-16T00:36:43Z"
},
{
"checksumSHA1": "bg3wIPzajKt3QZfTG70EPaxDtpk=",
"path": "google.golang.org/grpc/credentials/oauth",
- "revision": "4acc9108c18937815db3306a66990869d22aa980",
- "revisionTime": "2017-02-10T23:46:57Z"
+ "revision": "d0c32ee6a441117d49856d6120ca9552af413ee0",
+ "revisionTime": "2017-02-16T00:36:43Z"
},
{
"checksumSHA1": "3Lt5hNAG8qJAYSsNghR5uA1zQns=",
"path": "google.golang.org/grpc/grpclog",
- "revision": "4acc9108c18937815db3306a66990869d22aa980",
- "revisionTime": "2017-02-10T23:46:57Z"
+ "revision": "d0c32ee6a441117d49856d6120ca9552af413ee0",
+ "revisionTime": "2017-02-16T00:36:43Z"
},
{
"checksumSHA1": "T3Q0p8kzvXFnRkMaK/G8mCv6mc0=",
"path": "google.golang.org/grpc/internal",
- "revision": "4acc9108c18937815db3306a66990869d22aa980",
- "revisionTime": "2017-02-10T23:46:57Z"
+ "revision": "d0c32ee6a441117d49856d6120ca9552af413ee0",
+ "revisionTime": "2017-02-16T00:36:43Z"
},
{
- "checksumSHA1": "XXpD8+S3gLrfmCLOf+RbxblOQkU=",
+ "checksumSHA1": "T05Mzg3hEv2Vxao9hZn0Kv+nwUQ=",
"path": "google.golang.org/grpc/metadata",
- "revision": "4acc9108c18937815db3306a66990869d22aa980",
- "revisionTime": "2017-02-10T23:46:57Z"
+ "revision": "d0c32ee6a441117d49856d6120ca9552af413ee0",
+ "revisionTime": "2017-02-16T00:36:43Z"
},
{
"checksumSHA1": "4GSUFhOQ0kdFlBH4D5OTeKy78z0=",
"path": "google.golang.org/grpc/naming",
- "revision": "4acc9108c18937815db3306a66990869d22aa980",
- "revisionTime": "2017-02-10T23:46:57Z"
+ "revision": "d0c32ee6a441117d49856d6120ca9552af413ee0",
+ "revisionTime": "2017-02-16T00:36:43Z"
},
{
"checksumSHA1": "3RRoLeH6X2//7tVClOVzxW2bY+E=",
"path": "google.golang.org/grpc/peer",
- "revision": "4acc9108c18937815db3306a66990869d22aa980",
- "revisionTime": "2017-02-10T23:46:57Z"
+ "revision": "d0c32ee6a441117d49856d6120ca9552af413ee0",
+ "revisionTime": "2017-02-16T00:36:43Z"
},
{
"checksumSHA1": "wzkOAxlah+y75EpH0QVgzb8hdfc=",
"path": "google.golang.org/grpc/stats",
- "revision": "4acc9108c18937815db3306a66990869d22aa980",
- "revisionTime": "2017-02-10T23:46:57Z"
+ "revision": "d0c32ee6a441117d49856d6120ca9552af413ee0",
+ "revisionTime": "2017-02-16T00:36:43Z"
},
{
"checksumSHA1": "N0TftT6/CyWqp6VRi2DqDx60+Fo=",
"path": "google.golang.org/grpc/tap",
- "revision": "4acc9108c18937815db3306a66990869d22aa980",
- "revisionTime": "2017-02-10T23:46:57Z"
+ "revision": "d0c32ee6a441117d49856d6120ca9552af413ee0",
+ "revisionTime": "2017-02-16T00:36:43Z"
},
{
- "checksumSHA1": "yHpUeGwKoqqwd3cbEp3lkcnvft0=",
+ "checksumSHA1": "b9RDUPOmWBfHe9cM8UVilfyF/vE=",
"path": "google.golang.org/grpc/transport",
- "revision": "4acc9108c18937815db3306a66990869d22aa980",
- "revisionTime": "2017-02-10T23:46:57Z"
+ "revision": "d0c32ee6a441117d49856d6120ca9552af413ee0",
+ "revisionTime": "2017-02-16T00:36:43Z"
},
{
"checksumSHA1": "0KwOlQV1dNUh9X8t+5s7nX5bqfk=",