forked from etcinit/gonduit
-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathdiffusion.go
37 lines (30 loc) · 1.11 KB
/
diffusion.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
package gonduit
import (
"github.com/uber/gonduit/requests"
"github.com/uber/gonduit/responses"
)
// DiffusionQueryCommitsMethod is the method name on API.
const DiffusionQueryCommitsMethod = "diffusion.querycommits"
// DiffusionQueryCommits performs a call to diffusion.querycommits.
func (c *Conn) DiffusionQueryCommits(
req requests.DiffusionQueryCommitsRequest,
) (*responses.DiffusionQueryCommitsResponse, error) {
var res responses.DiffusionQueryCommitsResponse
if err := c.Call(DiffusionQueryCommitsMethod, &req, &res); err != nil {
return nil, err
}
return &res, nil
}
// DiffusionRepositorySearchMethod is the method name on API.
const DiffusionRepositorySearchMethod = "diffusion.repository.search"
// DiffusionRepositorySearch calls "diffusion.repository.search" Conduit API
// method.
func (c *Conn) DiffusionRepositorySearch(
req requests.DiffusionRepositorySearchRequest,
) (*responses.DiffusionRepositorySearchResponse, error) {
var resp responses.DiffusionRepositorySearchResponse
if err := c.Call(DiffusionRepositorySearchMethod, &req, &resp); err != nil {
return nil, err
}
return &resp, nil
}