Documentation
¶
Index ¶
- type CRD
- type CRDColumn
- type Cache
- type Client
- type MockClient
- func (_m *MockClient) CopyFileFromPod(w http.ResponseWriter, namespace string, name string, container string, ...) error
- func (_m *MockClient) CopyFileToPod(namespace string, name string, container string, srcFile multipart.File, ...) error
- func (_m *MockClient) CreateResource(ctx context.Context, namespace string, name string, path string, ...) error
- func (_m *MockClient) DeleteResource(ctx context.Context, namespace string, name string, path string, ...) error
- func (_m *MockClient) GetApplication(ctx context.Context, namespace string, name string) (*applicationv1.ApplicationSpec, error)
- func (_m *MockClient) GetApplications(ctx context.Context, namespace string) ([]applicationv1.ApplicationSpec, error)
- func (_m *MockClient) GetCRDs() []CRD
- func (_m *MockClient) GetClient(schema *runtime.Scheme) (controllerRuntimeClient.Client, error)
- func (_m *MockClient) GetDashboard(ctx context.Context, namespace string, name string) (*dashboardv1.DashboardSpec, error)
- func (_m *MockClient) GetDashboards(ctx context.Context, namespace string) ([]dashboardv1.DashboardSpec, error)
- func (_m *MockClient) GetLogs(ctx context.Context, namespace string, name string, container string, ...) (string, error)
- func (_m *MockClient) GetName() string
- func (_m *MockClient) GetNamespaces(ctx context.Context, cacheDuration time.Duration) ([]string, error)
- func (_m *MockClient) GetResources(ctx context.Context, namespace string, name string, path string, ...) ([]byte, error)
- func (_m *MockClient) GetTeam(ctx context.Context, namespace string, name string) (*teamv1.TeamSpec, error)
- func (_m *MockClient) GetTeams(ctx context.Context, namespace string) ([]teamv1.TeamSpec, error)
- func (_m *MockClient) GetTerminal(conn *websocket.Conn, namespace string, name string, container string, ...) error
- func (_m *MockClient) GetUser(ctx context.Context, namespace string, name string) (*userv1.UserSpec, error)
- func (_m *MockClient) GetUsers(ctx context.Context, namespace string) ([]userv1.UserSpec, error)
- func (_m *MockClient) PatchResource(ctx context.Context, namespace string, name string, path string, ...) error
- func (_m *MockClient) StreamLogs(ctx context.Context, conn *websocket.Conn, namespace string, name string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CRD ¶
type CRD struct { Path string `json:"path"` Resource string `json:"resource"` Title string `json:"title"` Description string `json:"description"` Scope string `json:"scope"` Columns []CRDColumn `json:"columns,omitempty"` }
CRD is the format of a Custom Resource Definition. Each CRD must contain a path and resource, which are used for the API request to retrieve all CRs for a CRD. It also must contain a title (kind), an optional description, the scope of the CRs (namespaced vs. cluster) and an optional list of columns with the fields, which should be shown in the frontend table.
type CRDColumn ¶
type CRDColumn struct { Description string `json:"description"` JSONPath string `json:"jsonPath"` Name string `json:"name"` Type string `json:"type"` }
CRDColumn is a single column for the CRD. A column has the same fields as the additionalPrinterColumns from the CRD specs. This means each column contains a description, name, a type to formate the value returned by the given jsonPath.
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache implements a simple caching layer, for the loaded manifest files. The goal of the caching layer is to return the manifests faster to the user.
type Client ¶ added in v0.8.0
type Client interface { GetName() string GetCRDs() []CRD GetClient(schema *runtime.Scheme) (controllerRuntimeClient.Client, error) GetNamespaces(ctx context.Context, cacheDuration time.Duration) ([]string, error) GetResources(ctx context.Context, namespace, name, path, resource, paramName, param string) ([]byte, error) DeleteResource(ctx context.Context, namespace, name, path, resource string, body []byte) error PatchResource(ctx context.Context, namespace, name, path, resource string, body []byte) error CreateResource(ctx context.Context, namespace, name, path, resource, subResource string, body []byte) error GetLogs(ctx context.Context, namespace, name, container, regex string, since, tail int64, previous bool) (string, error) StreamLogs(ctx context.Context, conn *websocket.Conn, namespace, name, container string, since, tail int64, follow bool) error GetTerminal(conn *websocket.Conn, namespace, name, container, shell string) error CopyFileFromPod(w http.ResponseWriter, namespace, name, container, srcPath string) error CopyFileToPod(namespace, name, container string, srcFile multipart.File, destPath string) error GetApplications(ctx context.Context, namespace string) ([]applicationv1.ApplicationSpec, error) GetApplication(ctx context.Context, namespace, name string) (*applicationv1.ApplicationSpec, error) GetTeams(ctx context.Context, namespace string) ([]teamv1.TeamSpec, error) GetTeam(ctx context.Context, namespace, name string) (*teamv1.TeamSpec, error) GetDashboards(ctx context.Context, namespace string) ([]dashboardv1.DashboardSpec, error) GetDashboard(ctx context.Context, namespace, name string) (*dashboardv1.DashboardSpec, error) GetUsers(ctx context.Context, namespace string) ([]userv1.UserSpec, error) GetUser(ctx context.Context, namespace, name string) (*userv1.UserSpec, error) // contains filtered or unexported methods }
Client is the interface to interact with an Kubernetes cluster.
func NewClient ¶ added in v0.8.0
NewClient returns a new client to interact with a Kubernetes cluster. Each cluster must have a unique name and the actual Kubernetes clients to make requests against the Kubernetes API server. When a client was successfully created we call the loadCRDs function to get all CRDs in the Kubernetes cluster.
type MockClient ¶ added in v0.8.0
MockClient is an autogenerated mock type for the Client type
func (*MockClient) CopyFileFromPod ¶ added in v0.8.0
func (_m *MockClient) CopyFileFromPod(w http.ResponseWriter, namespace string, name string, container string, srcPath string) error
CopyFileFromPod provides a mock function with given fields: w, namespace, name, container, srcPath
func (*MockClient) CopyFileToPod ¶ added in v0.8.0
func (_m *MockClient) CopyFileToPod(namespace string, name string, container string, srcFile multipart.File, destPath string) error
CopyFileToPod provides a mock function with given fields: namespace, name, container, srcFile, destPath
func (*MockClient) CreateResource ¶ added in v0.8.0
func (_m *MockClient) CreateResource(ctx context.Context, namespace string, name string, path string, resource string, subResource string, body []byte) error
CreateResource provides a mock function with given fields: ctx, namespace, name, path, resource, subResource, body
func (*MockClient) DeleteResource ¶ added in v0.8.0
func (_m *MockClient) DeleteResource(ctx context.Context, namespace string, name string, path string, resource string, body []byte) error
DeleteResource provides a mock function with given fields: ctx, namespace, name, path, resource, body
func (*MockClient) GetApplication ¶ added in v0.8.0
func (_m *MockClient) GetApplication(ctx context.Context, namespace string, name string) (*applicationv1.ApplicationSpec, error)
GetApplication provides a mock function with given fields: ctx, namespace, name
func (*MockClient) GetApplications ¶ added in v0.8.0
func (_m *MockClient) GetApplications(ctx context.Context, namespace string) ([]applicationv1.ApplicationSpec, error)
GetApplications provides a mock function with given fields: ctx, namespace
func (*MockClient) GetCRDs ¶ added in v0.8.0
func (_m *MockClient) GetCRDs() []CRD
GetCRDs provides a mock function with given fields:
func (*MockClient) GetClient ¶ added in v0.8.0
func (_m *MockClient) GetClient(schema *runtime.Scheme) (controllerRuntimeClient.Client, error)
GetClient provides a mock function with given fields: schema
func (*MockClient) GetDashboard ¶ added in v0.8.0
func (_m *MockClient) GetDashboard(ctx context.Context, namespace string, name string) (*dashboardv1.DashboardSpec, error)
GetDashboard provides a mock function with given fields: ctx, namespace, name
func (*MockClient) GetDashboards ¶ added in v0.8.0
func (_m *MockClient) GetDashboards(ctx context.Context, namespace string) ([]dashboardv1.DashboardSpec, error)
GetDashboards provides a mock function with given fields: ctx, namespace
func (*MockClient) GetLogs ¶ added in v0.8.0
func (_m *MockClient) GetLogs(ctx context.Context, namespace string, name string, container string, regex string, since int64, tail int64, previous bool) (string, error)
GetLogs provides a mock function with given fields: ctx, namespace, name, container, regex, since, tail, previous
func (*MockClient) GetName ¶ added in v0.8.0
func (_m *MockClient) GetName() string
GetName provides a mock function with given fields:
func (*MockClient) GetNamespaces ¶ added in v0.8.0
func (_m *MockClient) GetNamespaces(ctx context.Context, cacheDuration time.Duration) ([]string, error)
GetNamespaces provides a mock function with given fields: ctx, cacheDuration
func (*MockClient) GetResources ¶ added in v0.8.0
func (_m *MockClient) GetResources(ctx context.Context, namespace string, name string, path string, resource string, paramName string, param string) ([]byte, error)
GetResources provides a mock function with given fields: ctx, namespace, name, path, resource, paramName, param
func (*MockClient) GetTeam ¶ added in v0.8.0
func (_m *MockClient) GetTeam(ctx context.Context, namespace string, name string) (*teamv1.TeamSpec, error)
GetTeam provides a mock function with given fields: ctx, namespace, name
func (*MockClient) GetTeams ¶ added in v0.8.0
GetTeams provides a mock function with given fields: ctx, namespace
func (*MockClient) GetTerminal ¶ added in v0.8.0
func (_m *MockClient) GetTerminal(conn *websocket.Conn, namespace string, name string, container string, shell string) error
GetTerminal provides a mock function with given fields: conn, namespace, name, container, shell
func (*MockClient) GetUser ¶ added in v0.8.0
func (_m *MockClient) GetUser(ctx context.Context, namespace string, name string) (*userv1.UserSpec, error)
GetUser provides a mock function with given fields: ctx, namespace, name
func (*MockClient) GetUsers ¶ added in v0.8.0
GetUsers provides a mock function with given fields: ctx, namespace
func (*MockClient) PatchResource ¶ added in v0.8.0
func (_m *MockClient) PatchResource(ctx context.Context, namespace string, name string, path string, resource string, body []byte) error
PatchResource provides a mock function with given fields: ctx, namespace, name, path, resource, body
func (*MockClient) StreamLogs ¶ added in v0.8.0
func (_m *MockClient) StreamLogs(ctx context.Context, conn *websocket.Conn, namespace string, name string, container string, since int64, tail int64, follow bool) error
StreamLogs provides a mock function with given fields: ctx, conn, namespace, name, container, since, tail, follow