Documentation ¶
Overview ¶
Package store is a generated GoMock package.
Index ¶
- func GenerateClusterName(base string) string
- func RegisterFactory(storeType string, factoryFunc Factory)
- type Cluster
- type ClusterList
- type ClusterStore
- type Factory
- type MockClusterStore
- func (m *MockClusterStore) AddCluster(arg0 context.Context, arg1 *Cluster) error
- func (m *MockClusterStore) DeleteCluster(arg0 context.Context, arg1 string) error
- func (m *MockClusterStore) EXPECT() *MockClusterStoreMockRecorder
- func (m *MockClusterStore) GetCluster(arg0 context.Context, arg1 string) (*Cluster, error)
- func (m *MockClusterStore) ListClusters(arg0 context.Context) (*ClusterList, error)
- func (m *MockClusterStore) ListNamespaces(arg0 context.Context, arg1 string) (*NamespaceList, error)
- func (m *MockClusterStore) UpdateCluster(arg0 context.Context, arg1 *Cluster) error
- type MockClusterStoreMockRecorder
- func (mr *MockClusterStoreMockRecorder) AddCluster(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockClusterStoreMockRecorder) DeleteCluster(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockClusterStoreMockRecorder) GetCluster(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockClusterStoreMockRecorder) ListClusters(arg0 interface{}) *gomock.Call
- func (mr *MockClusterStoreMockRecorder) ListNamespaces(arg0, arg1 interface{}) *gomock.Call
- func (mr *MockClusterStoreMockRecorder) UpdateCluster(arg0, arg1 interface{}) *gomock.Call
- type MockStore
- type MockStoreMockRecorder
- type NamespaceList
- type Store
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateClusterName ¶ added in v0.4.0
func RegisterFactory ¶
Types ¶
type Cluster ¶
type Cluster struct { // Cluster Id must be unique Id string `json:"id"` // Cluster name Name string `json:"name"` // Crane server url in the cluster CraneUrl string `json:"craneUrl"` // Grafana url in the cluster GrafanaUrl string `json:"grafanaUrl"` }
Cluster define the craned endpoint and information about the cluster the craned deployed in
type ClusterList ¶
type ClusterStore ¶
type ClusterStore interface { AddCluster(ctx context.Context, cluster *Cluster) error DeleteCluster(ctx context.Context, clusterid string) error UpdateCluster(ctx context.Context, cluster *Cluster) error GetCluster(ctx context.Context, clusterid string) (*Cluster, error) ListClusters(ctx context.Context) (*ClusterList, error) ListNamespaces(ctx context.Context, clusterid string) (*NamespaceList, error) }
ClusterStore define the cluster store CURD interface
type MockClusterStore ¶
type MockClusterStore struct {
// contains filtered or unexported fields
}
MockClusterStore is a mock of ClusterStore interface.
func NewMockClusterStore ¶
func NewMockClusterStore(ctrl *gomock.Controller) *MockClusterStore
NewMockClusterStore creates a new mock instance.
func (*MockClusterStore) AddCluster ¶
func (m *MockClusterStore) AddCluster(arg0 context.Context, arg1 *Cluster) error
AddCluster mocks base method.
func (*MockClusterStore) DeleteCluster ¶
func (m *MockClusterStore) DeleteCluster(arg0 context.Context, arg1 string) error
DeleteCluster mocks base method.
func (*MockClusterStore) EXPECT ¶
func (m *MockClusterStore) EXPECT() *MockClusterStoreMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockClusterStore) GetCluster ¶
GetCluster mocks base method.
func (*MockClusterStore) ListClusters ¶
func (m *MockClusterStore) ListClusters(arg0 context.Context) (*ClusterList, error)
ListClusters mocks base method.
func (*MockClusterStore) ListNamespaces ¶ added in v0.5.0
func (m *MockClusterStore) ListNamespaces(arg0 context.Context, arg1 string) (*NamespaceList, error)
ListNamespaces mocks base method.
func (*MockClusterStore) UpdateCluster ¶
func (m *MockClusterStore) UpdateCluster(arg0 context.Context, arg1 *Cluster) error
UpdateCluster mocks base method.
type MockClusterStoreMockRecorder ¶
type MockClusterStoreMockRecorder struct {
// contains filtered or unexported fields
}
MockClusterStoreMockRecorder is the mock recorder for MockClusterStore.
func (*MockClusterStoreMockRecorder) AddCluster ¶
func (mr *MockClusterStoreMockRecorder) AddCluster(arg0, arg1 interface{}) *gomock.Call
AddCluster indicates an expected call of AddCluster.
func (*MockClusterStoreMockRecorder) DeleteCluster ¶
func (mr *MockClusterStoreMockRecorder) DeleteCluster(arg0, arg1 interface{}) *gomock.Call
DeleteCluster indicates an expected call of DeleteCluster.
func (*MockClusterStoreMockRecorder) GetCluster ¶
func (mr *MockClusterStoreMockRecorder) GetCluster(arg0, arg1 interface{}) *gomock.Call
GetCluster indicates an expected call of GetCluster.
func (*MockClusterStoreMockRecorder) ListClusters ¶
func (mr *MockClusterStoreMockRecorder) ListClusters(arg0 interface{}) *gomock.Call
ListClusters indicates an expected call of ListClusters.
func (*MockClusterStoreMockRecorder) ListNamespaces ¶ added in v0.5.0
func (mr *MockClusterStoreMockRecorder) ListNamespaces(arg0, arg1 interface{}) *gomock.Call
ListNamespaces indicates an expected call of ListNamespaces.
func (*MockClusterStoreMockRecorder) UpdateCluster ¶
func (mr *MockClusterStoreMockRecorder) UpdateCluster(arg0, arg1 interface{}) *gomock.Call
UpdateCluster indicates an expected call of UpdateCluster.
type MockStore ¶
type MockStore struct {
// contains filtered or unexported fields
}
MockStore is a mock of Store interface.
func NewMockStore ¶
func NewMockStore(ctrl *gomock.Controller) *MockStore
NewMockStore creates a new mock instance.
func (*MockStore) Clusters ¶
func (m *MockStore) Clusters() ClusterStore
Clusters mocks base method.
func (*MockStore) EXPECT ¶
func (m *MockStore) EXPECT() *MockStoreMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockStoreMockRecorder ¶
type MockStoreMockRecorder struct {
// contains filtered or unexported fields
}
MockStoreMockRecorder is the mock recorder for MockStore.
func (*MockStoreMockRecorder) Clusters ¶
func (mr *MockStoreMockRecorder) Clusters() *gomock.Call
Clusters indicates an expected call of Clusters.