gcp-projects

Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
Fredrik Adelöw
2022-08-19 13:12:39 +02:00
parent 9a5a1681c1
commit 93b552b34c
6 changed files with 9 additions and 19 deletions
-18
View File
@@ -10,8 +10,6 @@ import { BackstagePlugin } from '@backstage/core-plugin-api';
import { OAuthApi } from '@backstage/core-plugin-api';
import { RouteRef } from '@backstage/core-plugin-api';
// Warning: (ae-missing-release-tag) "GcpApi" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type GcpApi = {
listProjects(): Promise<Project[]>;
@@ -22,13 +20,9 @@ export type GcpApi = {
}): Promise<Operation>;
};
// Warning: (ae-missing-release-tag) "gcpApiRef" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const gcpApiRef: ApiRef<GcpApi>;
// Warning: (ae-missing-release-tag) "GcpClient" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export class GcpClient implements GcpApi {
constructor(googleAuthApi: OAuthApi);
@@ -45,13 +39,9 @@ export class GcpClient implements GcpApi {
listProjects(): Promise<Project[]>;
}
// Warning: (ae-missing-release-tag) "GcpProjectsPage" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export const GcpProjectsPage: () => JSX.Element;
// Warning: (ae-missing-release-tag) "gcpProjectsPlugin" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
const gcpProjectsPlugin: BackstagePlugin<
{
@@ -63,8 +53,6 @@ const gcpProjectsPlugin: BackstagePlugin<
export { gcpProjectsPlugin };
export { gcpProjectsPlugin as plugin };
// Warning: (ae-missing-release-tag) "Operation" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type Operation = {
name: string;
@@ -74,8 +62,6 @@ export type Operation = {
response: string;
};
// Warning: (ae-missing-release-tag) "Project" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type Project = {
name: string;
@@ -85,15 +71,11 @@ export type Project = {
createTime?: string;
};
// Warning: (ae-missing-release-tag) "ProjectDetails" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type ProjectDetails = {
details: string;
};
// Warning: (ae-missing-release-tag) "Status" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal)
//
// @public (undocumented)
export type Status = {
code: number;
+2
View File
@@ -17,10 +17,12 @@
import { Project, Operation } from './types';
import { createApiRef } from '@backstage/core-plugin-api';
/** @public */
export const gcpApiRef = createApiRef<GcpApi>({
id: 'plugin.gcpprojects.service',
});
/** @public */
export type GcpApi = {
listProjects(): Promise<Project[]>;
getProject(projectId: string): Promise<Project>;
@@ -21,6 +21,7 @@ import { OAuthApi } from '@backstage/core-plugin-api';
const BASE_URL =
'https://content-cloudresourcemanager.googleapis.com/v1/projects';
/** @public */
export class GcpClient implements GcpApi {
constructor(private readonly googleAuthApi: OAuthApi) {}
+4
View File
@@ -14,6 +14,7 @@
* limitations under the License.
*/
/** @public */
export type Project = {
name: string;
projectNumber?: string;
@@ -22,10 +23,12 @@ export type Project = {
createTime?: string;
};
/** @public */
export type ProjectDetails = {
details: string;
};
/** @public */
export type Operation = {
name: string;
metadata: string;
@@ -34,6 +37,7 @@ export type Operation = {
response: string;
};
/** @public */
export type Status = {
code: number;
message: string;
+2
View File
@@ -23,6 +23,7 @@ import {
googleAuthApiRef,
} from '@backstage/core-plugin-api';
/** @public */
export const gcpProjectsPlugin = createPlugin({
id: 'gcp-projects',
routes: {
@@ -39,6 +40,7 @@ export const gcpProjectsPlugin = createPlugin({
],
});
/** @public */
export const GcpProjectsPage = gcpProjectsPlugin.provide(
createRoutableExtension({
name: 'GcpProjectsPage',