-
Notifications
You must be signed in to change notification settings - Fork 785
/
sourcerepository_interface.go
25 lines (19 loc) · 1.24 KB
/
sourcerepository_interface.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
package kube
import "github.com/jenkins-x/jx/pkg/apis/jenkins.io/v1"
// SourceRepoer is responsible for storing information about Source Repositories (aka Applications, Projects)
//go:generate pegomock generate github.com/jenkins-x/jx/pkg/kube SourceRepoer -o mocks/sourcerepoer.
// go --generate-matchers
// FIXME - note. At the moment, repos are only referred to by their name (ie, not the organisation) meaning you
// can't import both github.com/org1/myawesomeapp and github.com/org2/myawesomeapp.
type SourceRepoer interface {
// CreateOrUpdateSourceRepository creates or updates a source repository
CreateOrUpdateSourceRepository(name, organisation, providerUrl string) error
// CreateSourceRepository creates an source repository. If a source repository already exists, it will return an error
CreateSourceRepository(name, organisation, providerUrl string) error
// DeleteSourceRepository deletes a source repository
DeleteSourceRepository(name string) error
// GetSourceRepository gets an source repository, if it exists and returns an error otherwise
GetSourceRepository(name string) (*v1.SourceRepository, error)
// ListSourceRepositories gets a list of all the source repositorys
ListSourceRepositories() (*v1.SourceRepositoryList, error)
}