diff options
Diffstat (limited to 'vendor/github.com/xanzy/go-gitlab/system_hooks.go')
-rw-r--r-- | vendor/github.com/xanzy/go-gitlab/system_hooks.go | 16 |
1 files changed, 8 insertions, 8 deletions
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 } |