forked from etcinit/gonduit
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathdiffusion.go
74 lines (64 loc) · 2.62 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
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
69
70
71
72
73
74
package gonduit
import (
"github.com/thought-machine/gonduit/requests"
"github.com/thought-machine/gonduit/responses"
)
// DiffusionQueryCommits performs a call to diffusion.querycommits.
// Deprecated: This method is frozen and will eventually be deprecated. New code should use "diffusion.commit.search" instead.
func (c *Conn) DiffusionQueryCommits(
req requests.DiffusionQueryCommitsRequest,
) (*responses.DiffusionQueryCommitsResponse, error) {
var res responses.DiffusionQueryCommitsResponse
if err := c.Call("diffusion.querycommits", &req, &res); err != nil {
return nil, err
}
return &res, nil
}
// DiffusionCommitSearch performs a call to diffusion.commit.search
func (c *Conn) DiffusionCommitSearch(req requests.SearchRequest) (*responses.SearchResponse, error) {
var res responses.SearchResponse
if err := c.Call("diffusion.commit.search", &req, &res); err != nil {
return nil, err
}
return &res, nil
}
// DiffusionRepositorySearch performs a call to diffusion.repository.search
func (c *Conn) DiffusionRepositorySearch(req requests.SearchRequest) (*responses.SearchResponse, error) {
var res responses.SearchResponse
if err := c.Call("diffusion.repository.search", &req, &res); err != nil {
return nil, err
}
return &res, nil
}
// DiffusionCommitParentsQuery performs a call to diffusion.commitparentsquery
func (c *Conn) DiffusionCommitParentsQuery(req requests.CommitParentsQueryRequest) (*responses.CommitParentsQueryResponse, error) {
var res responses.CommitParentsQueryResponse
if err := c.Call("diffusion.commitparentsquery", &req, &res); err != nil {
return nil, err
}
return &res, nil
}
// DiffusionResolveRefs performs a call to diffusion.resolverefs
func (c *Conn) DiffusionResolveRefs(req requests.ResolveRefsRequest) (*responses.ResolveRefsResponse, error) {
var res responses.ResolveRefsResponse
if err := c.Call("diffusion.resolverefs", &req, &res); err != nil {
return nil, err
}
return &res, nil
}
// DiffusionFileContentQuery performs a call to diffusion.filecontentquery
func (c *Conn) DiffusionFileContentQuery(req requests.FileContentQueryRequest) (*responses.FileContentQueryResponse, error) {
var res responses.FileContentQueryResponse
if err := c.Call("diffusion.filecontentquery", &req, &res); err != nil {
return nil, err
}
return &res, nil
}
// DiffusionBranchQuery performs a call to diffusion.branchquery
func (c *Conn) DiffusionBranchQuery(req requests.DiffusionBranchQueryRequest) (*responses.DiffusionBranchQueryResponse, error) {
var res responses.DiffusionBranchQueryResponse
if err := c.Call("diffusion.branchquery", &req, &res); err != nil {
return nil, err
}
return &res, nil
}