forked from projectatomic/atomic-enterprise
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.go
41 lines (32 loc) · 1.09 KB
/
build.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
package test
import (
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
"github.com/GoogleCloudPlatform/kubernetes/pkg/watch"
buildapi "github.com/openshift/origin/pkg/build/api"
)
type BuildRegistry struct {
Err error
Builds *buildapi.BuildList
Build *buildapi.Build
DeletedBuildID string
}
func (r *BuildRegistry) ListBuilds(ctx kapi.Context, labels labels.Selector) (*buildapi.BuildList, error) {
return r.Builds, r.Err
}
func (r *BuildRegistry) GetBuild(ctx kapi.Context, id string) (*buildapi.Build, error) {
return r.Build, r.Err
}
func (r *BuildRegistry) CreateBuild(ctx kapi.Context, build *buildapi.Build) error {
return r.Err
}
func (r *BuildRegistry) UpdateBuild(ctx kapi.Context, build *buildapi.Build) error {
return r.Err
}
func (r *BuildRegistry) DeleteBuild(ctx kapi.Context, id string) error {
r.DeletedBuildID = id
return r.Err
}
func (r *BuildRegistry) WatchBuilds(ctx kapi.Context, label, field labels.Selector, resourceVersion string) (watch.Interface, error) {
return nil, r.Err
}