forked from etcinit/gonduit
-
Notifications
You must be signed in to change notification settings - Fork 11
/
differential.go
68 lines (57 loc) · 2.38 KB
/
differential.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
package gonduit
import (
"github.com/thought-machine/gonduit/requests"
"github.com/thought-machine/gonduit/responses"
)
// DifferentialQuery performs a call to differential.query.
// Deprecated: This method is frozen and will eventually be deprecated. New code should use "differential.revision.search" instead.
func (c *Conn) DifferentialQuery(
req requests.DifferentialQueryRequest,
) (*responses.DifferentialQueryResponse, error) {
var res responses.DifferentialQueryResponse
if err := c.Call("differential.query", &req, &res); err != nil {
return nil, err
}
return &res, nil
}
// DifferentialQueryDiffs performs a call to differential.querydiffs.
// Deprecated: This method is frozen and will eventually be deprecated. New code should use "differential.diff.search" instead.
func (c *Conn) DifferentialQueryDiffs(req requests.DifferentialQueryDiffsRequest) (responses.DifferentialQueryDiffsResponse, error) {
var res responses.DifferentialQueryDiffsResponse
if err := c.Call("differential.querydiffs", &req, &res); err != nil {
return nil, err
}
return res, nil
}
// DifferentialDiffSearch performs a call to differential.diff.search
func (c *Conn) DifferentialDiffSearch(req requests.SearchRequest) (*responses.SearchResponse, error) {
var res responses.SearchResponse
if err := c.Call("differential.diff.search", &req, &res); err != nil {
return nil, err
}
return &res, nil
}
// DifferentialRevisionSearch performs a call to differential.revision.search
func (c *Conn) DifferentialRevisionSearch(req requests.SearchRequest) (*responses.SearchResponse, error) {
var res responses.SearchResponse
if err := c.Call("differential.revision.search", &req, &res); err != nil {
return nil, err
}
return &res, nil
}
// DifferentialRevisionEdit performs a call to differential.revision.edit
func (c *Conn) DifferentialRevisionEdit(req requests.EditRequest) (*responses.EditResponse, error) {
var res responses.EditResponse
if err := c.Call("differential.revision.edit", &req, &res); err != nil {
return nil, err
}
return &res, nil
}
// DifferentialGetRawDiff performs a call to differential.getrawdiff
func (c *Conn) DifferentialGetRawDiff(req requests.DifferentialGetRawDiffRequest) (*responses.DifferentialGetRawDiffResponse, error) {
var res responses.DifferentialGetRawDiffResponse
if err := c.Call("differential.getrawdiff", &req, &res); err != nil {
return nil, err
}
return &res, nil
}