store

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 2, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	SavePlugins(ctx context.Context, satellite string, plugins []plugin.Instance) error
	SaveClusters(ctx context.Context, satellite string, clusters []string) error
	SaveNamespaces(ctx context.Context, satellite string, namespaces map[string][]string) error
	SaveCRDs(ctx context.Context, crds []cluster.CRD) error
	SaveApplications(ctx context.Context, satellite string, applications []applicationv1.ApplicationSpec) error
	SaveDashboards(ctx context.Context, satellite string, dashboards []dashboardv1.DashboardSpec) error
	SaveTeams(ctx context.Context, satellite string, teams []teamv1.TeamSpec) error
	SaveUsers(ctx context.Context, satellite string, users []userv1.UserSpec) error
	SaveTags(ctx context.Context, applications []applicationv1.ApplicationSpec) error
	SaveTopology(ctx context.Context, satellite string, applications []applicationv1.ApplicationSpec) error
	GetPlugins(ctx context.Context) ([]plugin.Instance, error)
	GetClusters(ctx context.Context) ([]shared.Cluster, error)
	GetNamespaces(ctx context.Context) ([]shared.Namespace, error)
	GetNamespacesByClusterIDs(ctx context.Context, clusterIDs []string) ([]shared.Namespace, error)
	GetCRDs(ctx context.Context) ([]cluster.CRD, error)
	GetCRDByID(ctx context.Context, id string) (*cluster.CRD, error)
	GetApplications(ctx context.Context) ([]applicationv1.ApplicationSpec, error)
	GetApplicationsByFilter(ctx context.Context, teams, clusterIDs, namespaceIDs, tags []string, searchTerm, external string, limit, offset int) ([]applicationv1.ApplicationSpec, error)
	GetApplicationsByFilterCount(ctx context.Context, teams, clusterIDs, namespaceIDs, tags []string, searchTerm, external string) (int, error)
	GetApplicationByID(ctx context.Context, id string) (*applicationv1.ApplicationSpec, error)
	GetDashboards(ctx context.Context) ([]dashboardv1.DashboardSpec, error)
	GetDashboardByID(ctx context.Context, id string) (*dashboardv1.DashboardSpec, error)
	GetTeams(ctx context.Context) ([]teamv1.TeamSpec, error)
	GetTeamsByGroups(ctx context.Context, groups []string) ([]teamv1.TeamSpec, error)
	GetTeamByGroup(ctx context.Context, group string) (*teamv1.TeamSpec, error)
	GetUsers(ctx context.Context) ([]userv1.UserSpec, error)
	GetUsersByEmail(ctx context.Context, email string) ([]userv1.UserSpec, error)
	GetTags(ctx context.Context) ([]shared.Tag, error)
	GetTopologyByIDs(ctx context.Context, field string, ids []string) ([]shared.Topology, error)
}

Client is the interface with all the methods to interact with the store.

func NewClient

func NewClient(driver, uri string) (Client, error)

type MockClient

type MockClient struct {
	mock.Mock
}

MockClient is an autogenerated mock type for the Client type

func NewMockClient

func NewMockClient(t NewMockClientT) *MockClient

NewMockClient creates a new instance of MockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*MockClient) GetApplicationByID

func (_m *MockClient) GetApplicationByID(ctx context.Context, id string) (*v1.ApplicationSpec, error)

GetApplicationByID provides a mock function with given fields: ctx, id

func (*MockClient) GetApplications

func (_m *MockClient) GetApplications(ctx context.Context) ([]v1.ApplicationSpec, error)

GetApplications provides a mock function with given fields: ctx

func (*MockClient) GetApplicationsByFilter

func (_m *MockClient) GetApplicationsByFilter(ctx context.Context, teams []string, clusterIDs []string, namespaceIDs []string, tags []string, searchTerm string, external string, limit int, offset int) ([]v1.ApplicationSpec, error)

GetApplicationsByFilter provides a mock function with given fields: ctx, teams, clusterIDs, namespaceIDs, tags, searchTerm, external, limit, offset

func (*MockClient) GetApplicationsByFilterCount

func (_m *MockClient) GetApplicationsByFilterCount(ctx context.Context, teams []string, clusterIDs []string, namespaceIDs []string, tags []string, searchTerm string, external string) (int, error)

GetApplicationsByFilterCount provides a mock function with given fields: ctx, teams, clusterIDs, namespaceIDs, tags, searchTerm, external

func (*MockClient) GetCRDByID

func (_m *MockClient) GetCRDByID(ctx context.Context, id string) (*cluster.CRD, error)

GetCRDByID provides a mock function with given fields: ctx, id

func (*MockClient) GetCRDs

func (_m *MockClient) GetCRDs(ctx context.Context) ([]cluster.CRD, error)

GetCRDs provides a mock function with given fields: ctx

func (*MockClient) GetClusters

func (_m *MockClient) GetClusters(ctx context.Context) ([]shared.Cluster, error)

GetClusters provides a mock function with given fields: ctx

func (*MockClient) GetDashboardByID

func (_m *MockClient) GetDashboardByID(ctx context.Context, id string) (*dashboardv1.DashboardSpec, error)

GetDashboardByID provides a mock function with given fields: ctx, id

func (*MockClient) GetDashboards

func (_m *MockClient) GetDashboards(ctx context.Context) ([]dashboardv1.DashboardSpec, error)

GetDashboards provides a mock function with given fields: ctx

func (*MockClient) GetNamespaces

func (_m *MockClient) GetNamespaces(ctx context.Context) ([]shared.Namespace, error)

GetNamespaces provides a mock function with given fields: ctx

func (*MockClient) GetNamespacesByClusterIDs

func (_m *MockClient) GetNamespacesByClusterIDs(ctx context.Context, clusterIDs []string) ([]shared.Namespace, error)

GetNamespacesByClusterIDs provides a mock function with given fields: ctx, clusterIDs

func (*MockClient) GetPlugins

func (_m *MockClient) GetPlugins(ctx context.Context) ([]plugin.Instance, error)

GetPlugins provides a mock function with given fields: ctx

func (*MockClient) GetTags

func (_m *MockClient) GetTags(ctx context.Context) ([]shared.Tag, error)

GetTags provides a mock function with given fields: ctx

func (*MockClient) GetTeamByGroup

func (_m *MockClient) GetTeamByGroup(ctx context.Context, group string) (*teamv1.TeamSpec, error)

GetTeamByGroup provides a mock function with given fields: ctx, group

func (*MockClient) GetTeams

func (_m *MockClient) GetTeams(ctx context.Context) ([]teamv1.TeamSpec, error)

GetTeams provides a mock function with given fields: ctx

func (*MockClient) GetTeamsByGroups

func (_m *MockClient) GetTeamsByGroups(ctx context.Context, groups []string) ([]teamv1.TeamSpec, error)

GetTeamsByGroups provides a mock function with given fields: ctx, groups

func (*MockClient) GetTopologyByIDs

func (_m *MockClient) GetTopologyByIDs(ctx context.Context, field string, ids []string) ([]shared.Topology, error)

GetTopologyByIDs provides a mock function with given fields: ctx, field, ids

func (*MockClient) GetUsers

func (_m *MockClient) GetUsers(ctx context.Context) ([]userv1.UserSpec, error)

GetUsers provides a mock function with given fields: ctx

func (*MockClient) GetUsersByEmail

func (_m *MockClient) GetUsersByEmail(ctx context.Context, email string) ([]userv1.UserSpec, error)

GetUsersByEmail provides a mock function with given fields: ctx, email

func (*MockClient) SaveApplications

func (_m *MockClient) SaveApplications(ctx context.Context, satellite string, applications []v1.ApplicationSpec) error

SaveApplications provides a mock function with given fields: ctx, satellite, applications

func (*MockClient) SaveCRDs

func (_m *MockClient) SaveCRDs(ctx context.Context, crds []cluster.CRD) error

SaveCRDs provides a mock function with given fields: ctx, crds

func (*MockClient) SaveClusters

func (_m *MockClient) SaveClusters(ctx context.Context, satellite string, clusters []string) error

SaveClusters provides a mock function with given fields: ctx, satellite, clusters

func (*MockClient) SaveDashboards

func (_m *MockClient) SaveDashboards(ctx context.Context, satellite string, dashboards []dashboardv1.DashboardSpec) error

SaveDashboards provides a mock function with given fields: ctx, satellite, dashboards

func (*MockClient) SaveNamespaces

func (_m *MockClient) SaveNamespaces(ctx context.Context, satellite string, namespaces map[string][]string) error

SaveNamespaces provides a mock function with given fields: ctx, satellite, namespaces

func (*MockClient) SavePlugins

func (_m *MockClient) SavePlugins(ctx context.Context, satellite string, plugins []plugin.Instance) error

SavePlugins provides a mock function with given fields: ctx, satellite, plugins

func (*MockClient) SaveTags

func (_m *MockClient) SaveTags(ctx context.Context, applications []v1.ApplicationSpec) error

SaveTags provides a mock function with given fields: ctx, applications

func (*MockClient) SaveTeams

func (_m *MockClient) SaveTeams(ctx context.Context, satellite string, teams []teamv1.TeamSpec) error

SaveTeams provides a mock function with given fields: ctx, satellite, teams

func (*MockClient) SaveTopology

func (_m *MockClient) SaveTopology(ctx context.Context, satellite string, applications []v1.ApplicationSpec) error

SaveTopology provides a mock function with given fields: ctx, satellite, applications

func (*MockClient) SaveUsers

func (_m *MockClient) SaveUsers(ctx context.Context, satellite string, users []userv1.UserSpec) error

SaveUsers provides a mock function with given fields: ctx, satellite, users

type NewMockClientT

type NewMockClientT interface {
	mock.TestingT
	Cleanup(func())
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL