forked from openshift/origin
/
registry.go
24 lines (22 loc) · 1.11 KB
/
registry.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
package buildconfig
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"
)
// Registry is an interface for things that know how to store BuildConfigs.
type Registry interface {
// ListBuildConfigs obtains list of buildConfigs that match a selector.
ListBuildConfigs(ctx kapi.Context, labels labels.Selector) (*api.BuildConfigList, error)
// GetBuildConfig retrieves a specific buildConfig.
GetBuildConfig(ctx kapi.Context, id string) (*api.BuildConfig, error)
// CreateBuildConfig creates a new buildConfig.
CreateBuildConfig(ctx kapi.Context, buildConfig *api.BuildConfig) error
// UpdateBuildConfig updates a buildConfig.
UpdateBuildConfig(ctx kapi.Context, buildConfig *api.BuildConfig) error
// DeleteBuildConfig deletes a buildConfig.
DeleteBuildConfig(ctx kapi.Context, id string) error
// WatchBuildConfigs watches buildConfigs.
WatchBuildConfigs(ctx kapi.Context, label, field labels.Selector, resourceVersion string) (watch.Interface, error)
}