From a3a431edac978e20ab1887b902ee7240683f7d95 Mon Sep 17 00:00:00 2001 From: amine Date: Thu, 24 Oct 2019 20:45:02 +0200 Subject: vendors: upgrade github.com/xanzy/go-gitlab dependencies to 0.21.0 --- vendor/github.com/xanzy/go-gitlab/search.go | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'vendor/github.com/xanzy/go-gitlab/search.go') diff --git a/vendor/github.com/xanzy/go-gitlab/search.go b/vendor/github.com/xanzy/go-gitlab/search.go index 708db063..de3ad362 100644 --- a/vendor/github.com/xanzy/go-gitlab/search.go +++ b/vendor/github.com/xanzy/go-gitlab/search.go @@ -279,6 +279,35 @@ func (s *SearchService) BlobsByProject(pid interface{}, query string, opt *Searc return bs, resp, err } +// Users searches the expression within all users +// +// GitLab API docs: https://docs.gitlab.com/ee/api/search.html#scope-users +func (s *SearchService) Users(query string, opt *SearchOptions, options ...OptionFunc) ([]*User, *Response, error) { + var ret []*User + resp, err := s.search("users", query, &ret, opt, options...) + return ret, resp, err +} + +// UsersByGroup searches the expression within users for the specified +// group +// +// GitLab API docs: https://docs.gitlab.com/ee/api/search.html#scope-users-1 +func (s *SearchService) UsersByGroup(gid interface{}, query string, opt *SearchOptions, options ...OptionFunc) ([]*User, *Response, error) { + var ret []*User + resp, err := s.searchByGroup(gid, "users", query, &ret, opt, options...) + return ret, resp, err +} + +// UsersByProject searches the expression within users for the +// specified project +// +// GitLab API docs: https://docs.gitlab.com/ee/api/search.html#scope-users-2 +func (s *SearchService) UsersByProject(pid interface{}, query string, opt *SearchOptions, options ...OptionFunc) ([]*User, *Response, error) { + var ret []*User + resp, err := s.searchByProject(pid, "users", query, &ret, opt, options...) + return ret, resp, err +} + func (s *SearchService) search(scope, query string, result interface{}, opt *SearchOptions, options ...OptionFunc) (*Response, error) { opts := &searchOptions{SearchOptions: *opt, Scope: scope, Search: query} -- cgit