satellite

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: MIT Imports: 25 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 {
	GetName() string
	GetPlugins(ctx context.Context) ([]plugin.Instance, error)
	GetClusters(ctx context.Context) ([]string, error)
	GetNamespaces(ctx context.Context) (map[string][]string, error)
	GetCRDs(ctx context.Context) ([]cluster.CRD, error)
	GetApplications(ctx context.Context) ([]applicationv1.ApplicationSpec, error)
	GetDashboards(ctx context.Context) ([]dashboardv1.DashboardSpec, error)
	GetTeams(ctx context.Context) ([]teamv1.TeamSpec, error)
	GetUsers(ctx context.Context) ([]userv1.UserSpec, error)
	GetResources(ctx context.Context, user *authContext.User, cluster, namespace, name, resource, path, paramName, param string) (map[string]any, error)
	Proxy(w http.ResponseWriter, r *http.Request)
}

func NewClient

func NewClient(config Config) (Client, error)

type Config

type Config struct {
	Name    string `json:"name"`
	Address string `json:"address"`
	Token   string `json:"token"`
}

type MockClient

type MockClient struct {
	mock.Mock
}

MockClient is an autogenerated mock type for the Client type

func NewMockClient

func NewMockClient(t testing.TB) *MockClient

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

func (*MockClient) GetApplications

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

GetApplications provides a mock function with given fields: ctx

func (*MockClient) GetClusters

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

GetClusters provides a mock function with given fields: ctx

func (*MockClient) GetDashboards

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

GetDashboards provides a mock function with given fields: ctx

func (*MockClient) GetName

func (_m *MockClient) GetName() string

GetName provides a mock function with given fields:

func (*MockClient) GetPlugins

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

GetPlugins provides a mock function with given fields: ctx

func (*MockClient) GetTeams

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

GetTeams provides a mock function with given fields: ctx

func (*MockClient) GetUsers

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

GetUsers provides a mock function with given fields: ctx

func (*MockClient) Proxy

func (_m *MockClient) Proxy(w http.ResponseWriter, r *http.Request)

Proxy provides a mock function with given fields: w, r

Jump to

Keyboard shortcuts

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