mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-11 10:28:50 +00:00
Add Northflank connection support
- Introduced Northflank as a new app connection option, including API token authentication. - Implemented connection schemas, validation, and service functions for Northflank. - Updated API documentation to include Northflank endpoints and integration instructions. - Added frontend components for creating and managing Northflank connections.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import { logger } from "@app/lib/logger";
|
||||
import { OrgServiceActor } from "@app/lib/types";
|
||||
|
||||
import { AppConnection } from "../app-connection-enums";
|
||||
import { listProjects as getNorthflankProjects } from "./northflank-connection-fns";
|
||||
import { TNorthflankConnection } from "./northflank-connection-types";
|
||||
|
||||
type TGetAppConnectionFunc = (
|
||||
app: AppConnection,
|
||||
connectionId: string,
|
||||
actor: OrgServiceActor
|
||||
) => Promise<TNorthflankConnection>;
|
||||
|
||||
export const northflankConnectionService = (getAppConnection: TGetAppConnectionFunc) => {
|
||||
const listProjects = async (connectionId: string, actor: OrgServiceActor) => {
|
||||
const appConnection = await getAppConnection(AppConnection.Northflank, connectionId, actor);
|
||||
try {
|
||||
const projects = await getNorthflankProjects(appConnection);
|
||||
|
||||
return projects;
|
||||
} catch (error) {
|
||||
logger.error(error, "Failed to establish connection with Northflank");
|
||||
return [];
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
listProjects
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user