add api-reports

Signed-off-by: Dominik Pfaffenbauer <dominik@pfaffenbauer.at>
This commit is contained in:
Dominik Pfaffenbauer
2023-01-19 09:02:06 +01:00
parent eef62546ce
commit f03ec5ee26
3 changed files with 111 additions and 495 deletions
+13 -272
View File
@@ -1,286 +1,27 @@
## API Report File for "@backstage/plugin-kubernetes-common"
## API Report File for "@backstage/plugin-lighthouse-backend"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
import { Entity } from '@backstage/catalog-model';
import type { JsonObject } from '@backstage/types';
import { PodStatus } from '@kubernetes/client-node';
import { V1ConfigMap } from '@kubernetes/client-node';
import { V1CronJob } from '@kubernetes/client-node';
import { V1DaemonSet } from '@kubernetes/client-node';
import { V1Deployment } from '@kubernetes/client-node';
import { V1HorizontalPodAutoscaler } from '@kubernetes/client-node';
import { V1Ingress } from '@kubernetes/client-node';
import { V1Job } from '@kubernetes/client-node';
import { V1LimitRange } from '@kubernetes/client-node';
import { V1Pod } from '@kubernetes/client-node';
import { V1ReplicaSet } from '@kubernetes/client-node';
import { V1Service } from '@kubernetes/client-node';
import { V1StatefulSet } from '@kubernetes/client-node';
import { CatalogClient } from '@backstage/catalog-client';
import { Config } from '@backstage/config';
import { Logger } from 'winston';
import { PluginTaskScheduler } from '@backstage/backend-tasks';
// @public (undocumented)
export type AuthProviderType = 'google' | 'serviceAccount' | 'aws' | 'azure';
export function create(options: Options): Promise<void>;
// @public (undocumented)
export interface ClientContainerStatus {
export interface Options {
// (undocumented)
container: string;
catalogClient: CatalogClient;
// (undocumented)
cpuUsage: ClientCurrentResourceUsage;
config: Config;
// (undocumented)
memoryUsage: ClientCurrentResourceUsage;
logger: Logger;
// (undocumented)
scheduler?: PluginTaskScheduler;
}
// @public (undocumented)
export interface ClientCurrentResourceUsage {
// (undocumented)
currentUsage: number | string;
// (undocumented)
limitTotal: number | string;
// (undocumented)
requestTotal: number | string;
}
// @public (undocumented)
export interface ClientPodStatus {
// (undocumented)
containers: ClientContainerStatus[];
// (undocumented)
cpu: ClientCurrentResourceUsage;
// (undocumented)
memory: ClientCurrentResourceUsage;
// (undocumented)
pod: V1Pod;
}
// @public (undocumented)
export interface ClusterAttributes {
dashboardApp?: string;
dashboardParameters?: JsonObject;
dashboardUrl?: string;
name: string;
}
// @public (undocumented)
export interface ClusterObjects {
// (undocumented)
cluster: ClusterAttributes;
// (undocumented)
errors: KubernetesFetchError[];
// (undocumented)
podMetrics: ClientPodStatus[];
// (undocumented)
resources: FetchResponse[];
}
// @public (undocumented)
export interface ConfigMapFetchResponse {
// (undocumented)
resources: Array<V1ConfigMap>;
// (undocumented)
type: 'configmaps';
}
// @public (undocumented)
export interface CronJobsFetchResponse {
// (undocumented)
resources: Array<V1CronJob>;
// (undocumented)
type: 'cronjobs';
}
// @public (undocumented)
export interface CustomObjectsByEntityRequest {
// (undocumented)
auth: KubernetesRequestAuth;
// (undocumented)
customResources: CustomResourceMatcher[];
// (undocumented)
entity: Entity;
}
// @public (undocumented)
export interface CustomResourceFetchResponse {
// (undocumented)
resources: Array<any>;
// (undocumented)
type: 'customresources';
}
// @public (undocumented)
export interface CustomResourceMatcher {
// (undocumented)
apiVersion: string;
// (undocumented)
group: string;
// (undocumented)
plural: string;
}
// @public (undocumented)
export interface DaemonSetsFetchResponse {
// (undocumented)
resources: Array<V1DaemonSet>;
// (undocumented)
type: 'daemonsets';
}
// @public (undocumented)
export interface DeploymentFetchResponse {
// (undocumented)
resources: Array<V1Deployment>;
// (undocumented)
type: 'deployments';
}
// @public (undocumented)
export type FetchResponse =
| PodFetchResponse
| ServiceFetchResponse
| ConfigMapFetchResponse
| DeploymentFetchResponse
| LimitRangeFetchReponse
| ReplicaSetsFetchResponse
| HorizontalPodAutoscalersFetchResponse
| JobsFetchResponse
| CronJobsFetchResponse
| IngressesFetchResponse
| CustomResourceFetchResponse
| StatefulSetsFetchResponse
| DaemonSetsFetchResponse
| PodStatusFetchResponse;
// @public (undocumented)
export interface HorizontalPodAutoscalersFetchResponse {
// (undocumented)
resources: Array<V1HorizontalPodAutoscaler>;
// (undocumented)
type: 'horizontalpodautoscalers';
}
// @public (undocumented)
export interface IngressesFetchResponse {
// (undocumented)
resources: Array<V1Ingress>;
// (undocumented)
type: 'ingresses';
}
// @public (undocumented)
export interface JobsFetchResponse {
// (undocumented)
resources: Array<V1Job>;
// (undocumented)
type: 'jobs';
}
// @public (undocumented)
export type KubernetesErrorTypes =
| 'BAD_REQUEST'
| 'UNAUTHORIZED_ERROR'
| 'NOT_FOUND'
| 'SYSTEM_ERROR'
| 'UNKNOWN_ERROR';
// @public (undocumented)
export type KubernetesFetchError = StatusError | RawFetchError;
// @public (undocumented)
export interface KubernetesRequestAuth {
// (undocumented)
google?: string;
// (undocumented)
oidc?: {
[key: string]: string;
};
}
// @public (undocumented)
export interface KubernetesRequestBody {
// (undocumented)
auth?: KubernetesRequestAuth;
// (undocumented)
entity: Entity;
}
// @public (undocumented)
export interface LimitRangeFetchReponse {
// (undocumented)
resources: Array<V1LimitRange>;
// (undocumented)
type: 'limitranges';
}
// @public (undocumented)
export interface ObjectsByEntityResponse {
// (undocumented)
items: ClusterObjects[];
}
// @public (undocumented)
export interface PodFetchResponse {
// (undocumented)
resources: Array<V1Pod>;
// (undocumented)
type: 'pods';
}
// @public (undocumented)
export interface PodStatusFetchResponse {
// (undocumented)
resources: Array<PodStatus>;
// (undocumented)
type: 'podstatus';
}
// @public (undocumented)
export interface RawFetchError {
// (undocumented)
errorType: 'FETCH_ERROR';
// (undocumented)
message: string;
}
// @public (undocumented)
export interface ReplicaSetsFetchResponse {
// (undocumented)
resources: Array<V1ReplicaSet>;
// (undocumented)
type: 'replicasets';
}
// @public (undocumented)
export interface ServiceFetchResponse {
// (undocumented)
resources: Array<V1Service>;
// (undocumented)
type: 'services';
}
// @public (undocumented)
export interface StatefulSetsFetchResponse {
// (undocumented)
resources: Array<V1StatefulSet>;
// (undocumented)
type: 'statefulsets';
}
// @public (undocumented)
export interface StatusError {
// (undocumented)
errorType: KubernetesErrorTypes;
// (undocumented)
resourcePath?: string;
// (undocumented)
statusCode?: number;
}
// @public (undocumented)
export interface WorkloadsByEntityRequest {
// (undocumented)
auth: KubernetesRequestAuth;
// (undocumented)
entity: Entity;
}
// (No @packageDocumentation comment for this package)
```
@@ -25,14 +25,14 @@ import { LighthouseRestApi } from '@backstage/plugin-lighthouse-common';
import { stringifyEntityRef } from '@backstage/catalog-model';
import { LighthouseAuditScheduleImpl } from '../config';
export interface RouterOptions {
export interface Options {
logger: Logger;
config: Config;
scheduler?: PluginTaskScheduler;
catalogClient: CatalogClient;
}
export async function create(options: RouterOptions) {
export async function create(options: Options) {
const { logger, scheduler, catalogClient, config } = options;
const lighthouseApi = LighthouseRestApi.fromConfig(config);