-
Notifications
You must be signed in to change notification settings - Fork 115
/
builds_mock.go
52 lines (41 loc) · 2.2 KB
/
builds_mock.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
package sourcegraph
type MockBuildsService struct {
Get_ func(build BuildSpec, opt *BuildGetOptions) (*Build, Response, error)
List_ func(opt *BuildListOptions) ([]*Build, Response, error)
Create_ func(repoRev RepoRevSpec, opt *BuildCreateOptions) (*Build, Response, error)
Update_ func(build BuildSpec, info BuildUpdate) (*Build, Response, error)
ListBuildTasks_ func(build BuildSpec, opt *BuildTaskListOptions) ([]*BuildTask, Response, error)
CreateTasks_ func(build BuildSpec, tasks []*BuildTask) ([]*BuildTask, Response, error)
UpdateTask_ func(task TaskSpec, info TaskUpdate) (*BuildTask, Response, error)
GetLog_ func(build BuildSpec, opt *BuildGetLogOptions) (*LogEntries, Response, error)
GetTaskLog_ func(task TaskSpec, opt *BuildGetLogOptions) (*LogEntries, Response, error)
DequeueNext_ func() (*Build, Response, error)
}
func (s MockBuildsService) Get(build BuildSpec, opt *BuildGetOptions) (*Build, Response, error) {
return s.Get_(build, opt)
}
func (s MockBuildsService) List(opt *BuildListOptions) ([]*Build, Response, error) {
return s.List_(opt)
}
func (s MockBuildsService) Create(repoRev RepoRevSpec, opt *BuildCreateOptions) (*Build, Response, error) {
return s.Create_(repoRev, opt)
}
func (s MockBuildsService) Update(build BuildSpec, info BuildUpdate) (*Build, Response, error) {
return s.Update_(build, info)
}
func (s MockBuildsService) ListBuildTasks(build BuildSpec, opt *BuildTaskListOptions) ([]*BuildTask, Response, error) {
return s.ListBuildTasks_(build, opt)
}
func (s MockBuildsService) CreateTasks(build BuildSpec, tasks []*BuildTask) ([]*BuildTask, Response, error) {
return s.CreateTasks_(build, tasks)
}
func (s MockBuildsService) UpdateTask(task TaskSpec, info TaskUpdate) (*BuildTask, Response, error) {
return s.UpdateTask_(task, info)
}
func (s MockBuildsService) GetLog(build BuildSpec, opt *BuildGetLogOptions) (*LogEntries, Response, error) {
return s.GetLog_(build, opt)
}
func (s MockBuildsService) GetTaskLog(task TaskSpec, opt *BuildGetLogOptions) (*LogEntries, Response, error) {
return s.GetTaskLog_(task, opt)
}
func (s MockBuildsService) DequeueNext() (*Build, Response, error) { return s.DequeueNext_() }