forked from etcinit/gonduit
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathharbormaster.go
38 lines (30 loc) · 1.09 KB
/
harbormaster.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package gonduit
import (
"github.com/uber/gonduit/requests"
"github.com/uber/gonduit/responses"
)
// HarbormasterBuildableSearchMethod is method name on Phabricator API.
const (
HarbormasterBuildSearchMethod = "harbormaster.build.search"
HarbormasterBuildableSearchMethod = "harbormaster.buildable.search"
)
// HarbormasterBuildableSearch performs a call to harbormaster.builable.search.
func (c *Conn) HarbormasterBuildableSearch(
req requests.HarbormasterBuildableSearchRequest,
) (*responses.HarbormasterBuildableSearchResponse, error) {
var res responses.HarbormasterBuildableSearchResponse
if err := c.Call(HarbormasterBuildableSearchMethod, &req, &res); err != nil {
return nil, err
}
return &res, nil
}
// HarbormasterBuildSearch performs a call to harbormaster.builable.search.
func (c *Conn) HarbormasterBuildSearch(
req requests.HarbormasterBuildSearchRequest,
) (*responses.HarbormasterBuildSearchResponse, error) {
var res responses.HarbormasterBuildSearchResponse
if err := c.Call(HarbormasterBuildSearchMethod, &req, &res); err != nil {
return nil, err
}
return &res, nil
}