forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildconfig.go
40 lines (32 loc) · 1.18 KB
/
buildconfig.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
package test
import (
kapi "github.com/GoogleCloudPlatform/kubernetes/pkg/api"
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
"github.com/GoogleCloudPlatform/kubernetes/pkg/watch"
"github.com/openshift/origin/pkg/build/api"
)
type BuildConfigRegistry struct {
Err error
BuildConfigs *api.BuildConfigList
BuildConfig *api.BuildConfig
DeletedConfigID string
}
func (r *BuildConfigRegistry) ListBuildConfigs(ctx kapi.Context, labels labels.Selector) (*api.BuildConfigList, error) {
return r.BuildConfigs, r.Err
}
func (r *BuildConfigRegistry) GetBuildConfig(ctx kapi.Context, id string) (*api.BuildConfig, error) {
return r.BuildConfig, r.Err
}
func (r *BuildConfigRegistry) CreateBuildConfig(ctx kapi.Context, config *api.BuildConfig) error {
return r.Err
}
func (r *BuildConfigRegistry) UpdateBuildConfig(ctx kapi.Context, config *api.BuildConfig) error {
return r.Err
}
func (r *BuildConfigRegistry) DeleteBuildConfig(ctx kapi.Context, id string) error {
r.DeletedConfigID = id
return r.Err
}
func (r *BuildConfigRegistry) WatchBuildConfigs(ctx kapi.Context, label, field labels.Selector, resourceVersion string) (watch.Interface, error) {
return nil, r.Err
}