permission-node,kubernetes-backend: mark public API as public

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-02-02 14:56:09 +01:00
parent ea99ce2c37
commit eb9252186f
14 changed files with 39 additions and 39 deletions
@@ -20,7 +20,7 @@ import { KubernetesAuthTranslator } from './types';
/**
*
* @alpha
* @public
*/
export type SigningCreds = {
accessKeyId: string | undefined;
@@ -30,7 +30,7 @@ export type SigningCreds = {
/**
*
* @alpha
* @public
*/
export class AwsIamKubernetesAuthTranslator
implements KubernetesAuthTranslator
@@ -27,7 +27,7 @@ const aksScope = '6dae42f8-4368-4678-94ff-3960e28e3630/.default'; // This scope
/**
*
* @alpha
* @public
*/
export class AzureIdentityKubernetesAuthTranslator
implements KubernetesAuthTranslator
@@ -20,7 +20,7 @@ import { KubernetesRequestAuth } from '@backstage/plugin-kubernetes-common';
/**
*
* @alpha
* @public
*/
export class GoogleKubernetesAuthTranslator
implements KubernetesAuthTranslator
@@ -19,7 +19,7 @@ import * as container from '@google-cloud/container';
/**
*
* @alpha
* @public
*/
export class GoogleServiceAccountAuthTranslator
implements KubernetesAuthTranslator
@@ -25,7 +25,7 @@ import { OidcKubernetesAuthTranslator } from './OidcKubernetesAuthTranslator';
/**
*
* @alpha
* @public
*/
export class KubernetesAuthTranslatorGenerator {
static getKubernetesAuthTranslatorInstance(
@@ -19,7 +19,7 @@ import { ServiceAccountClusterDetails } from '../types/types';
/**
*
* @alpha
* @public
*/
export class NoopKubernetesAuthTranslator implements KubernetesAuthTranslator {
async decorateClusterDetailsWithAuth(
@@ -20,7 +20,7 @@ import { KubernetesRequestAuth } from '@backstage/plugin-kubernetes-common';
/**
*
* @alpha
* @public
*/
export class OidcKubernetesAuthTranslator implements KubernetesAuthTranslator {
async decorateClusterDetailsWithAuth(
@@ -19,7 +19,7 @@ import { KubernetesRequestAuth } from '@backstage/plugin-kubernetes-common';
/**
*
* @alpha
* @public
*/
export interface KubernetesAuthTranslator {
decorateClusterDetailsWithAuth(
@@ -43,7 +43,7 @@ import { KubernetesProxy } from './KubernetesProxy';
/**
*
* @alpha
* @public
*/
export interface KubernetesEnvironment {
logger: Logger;
@@ -54,7 +54,7 @@ export interface KubernetesEnvironment {
/**
* The return type of the `KubernetesBuilder.build` method
*
* @alpha
* @public
*/
export type KubernetesBuilderReturn = Promise<{
router: express.Router;
@@ -68,7 +68,7 @@ export type KubernetesBuilderReturn = Promise<{
/**
*
* @alpha
* @public
*/
export class KubernetesBuilder {
private clusterSupplier?: KubernetesClustersSupplier;
@@ -51,7 +51,7 @@ import {
/**
*
* @alpha
* @public
*/
export const DEFAULT_OBJECTS: ObjectToFetch[] = [
{
@@ -39,7 +39,7 @@ export const HEADER_KUBERNETES_CLUSTER: string = 'X-Kubernetes-Cluster';
/**
* A proxy that routes requests to the Kubernetes API.
*
* @alpha
* @public
*/
export class KubernetesProxy {
private readonly middlewareForClusterName = new Map<string, RequestHandler>();
@@ -24,7 +24,7 @@ import { CatalogApi } from '@backstage/catalog-client';
/**
*
* @alpha
* @public
*/
export interface RouterOptions {
logger: Logger;
@@ -47,7 +47,7 @@ export interface RouterOptions {
* }).build();
* ```
*
* @alpha
* @public
*/
export async function createRouter(
options: RouterOptions,
+20 -20
View File
@@ -28,7 +28,7 @@ import type {
/**
*
* @alpha
* @public
*/
export interface ObjectFetchParams {
serviceId: string;
@@ -46,7 +46,7 @@ export interface ObjectFetchParams {
/**
* Fetches information from a kubernetes cluster using the cluster details object to target a specific cluster
*
* @alpha
* @public
*/
export interface KubernetesFetcher {
fetchObjectsForService(
@@ -60,7 +60,7 @@ export interface KubernetesFetcher {
/**
*
* @alpha
* @public
*/
export interface FetchResponseWrapper {
errors: KubernetesFetchError[];
@@ -69,7 +69,7 @@ export interface FetchResponseWrapper {
/**
*
* @alpha
* @public
*/
export interface ObjectToFetch {
objectType: KubernetesObjectTypes;
@@ -80,7 +80,7 @@ export interface ObjectToFetch {
/**
*
* @alpha
* @public
*/
export interface CustomResource extends ObjectToFetch {
objectType: 'customresources';
@@ -88,7 +88,7 @@ export interface CustomResource extends ObjectToFetch {
/**
*
* @alpha
* @public
*/
export type KubernetesObjectTypes =
| 'pods'
@@ -107,7 +107,7 @@ export type KubernetesObjectTypes =
/**
* Used to load cluster details from different sources
* @alpha
* @public
*/
export interface KubernetesClustersSupplier {
/**
@@ -120,7 +120,7 @@ export interface KubernetesClustersSupplier {
}
/**
* @alpha
* @public
*/
export interface ServiceLocatorRequestContext {
objectTypesToFetch: Set<ObjectToFetch>;
@@ -129,7 +129,7 @@ export interface ServiceLocatorRequestContext {
/**
* Used to locate which cluster(s) a service is running on
* @alpha
* @public
*/
export interface KubernetesServiceLocator {
getClustersByEntity(
@@ -140,13 +140,13 @@ export interface KubernetesServiceLocator {
/**
*
* @alpha
* @public
*/
export type ServiceLocatorMethod = 'multiTenant' | 'http'; // TODO implement http
/**
*
* @alpha
* @public
*/
export interface ClusterDetails {
/**
@@ -209,25 +209,25 @@ export interface ClusterDetails {
/**
*
* @alpha
* @public
*/
export interface GKEClusterDetails extends ClusterDetails {}
/**
*
* @alpha
* @public
*/
export interface AzureClusterDetails extends ClusterDetails {}
/**
*
* @alpha
* @public
*/
export interface ServiceAccountClusterDetails extends ClusterDetails {}
/**
*
* @alpha
* @public
*/
export interface AWSClusterDetails extends ClusterDetails {
assumeRole?: string;
@@ -236,7 +236,7 @@ export interface AWSClusterDetails extends ClusterDetails {
/**
*
* @alpha
* @public
*/
export interface KubernetesObjectsProviderOptions {
logger: Logger;
@@ -248,13 +248,13 @@ export interface KubernetesObjectsProviderOptions {
/**
*
* @alpha
* @public
*/
export type ObjectsByEntityRequest = KubernetesRequestBody;
/**
*
* @alpha
* @public
*/
export interface KubernetesObjectsByEntity {
entity: Entity;
@@ -263,7 +263,7 @@ export interface KubernetesObjectsByEntity {
/**
*
* @alpha
* @public
*/
export interface CustomResourcesByEntity extends KubernetesObjectsByEntity {
customResources: CustomResourceMatcher[];
@@ -271,7 +271,7 @@ export interface CustomResourcesByEntity extends KubernetesObjectsByEntity {
/**
*
* @alpha
* @public
*/
export interface KubernetesObjectsProvider {
getKubernetesObjectsByEntity(
@@ -33,7 +33,7 @@ export type NoInfer<T> = T extends infer S ? S : never;
/**
* Utility function used to parse a PermissionCriteria
* @param criteria - a PermissionCriteria
* @alpha
* @public
*
* @returns `true` if the permission criteria is of type allOf,
* narrowing down `criteria` to the specific type.
@@ -46,7 +46,7 @@ export const isAndCriteria = <T>(
/**
* Utility function used to parse a PermissionCriteria of type
* @param criteria - a PermissionCriteria
* @alpha
* @public
*
* @returns `true` if the permission criteria is of type anyOf,
* narrowing down `criteria` to the specific type.
@@ -59,7 +59,7 @@ export const isOrCriteria = <T>(
/**
* Utility function used to parse a PermissionCriteria
* @param criteria - a PermissionCriteria
* @alpha
* @public
*
* @returns `true` if the permission criteria is of type not,
* narrowing down `criteria` to the specific type.