aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/xanzy/go-gitlab/search.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/xanzy/go-gitlab/search.go')
-rw-r--r--vendor/github.com/xanzy/go-gitlab/search.go29
1 files changed, 29 insertions, 0 deletions
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}