From d00bb5eaaa7469a389186715345c9a5bc847147c Mon Sep 17 00:00:00 2001 From: Philipp Kunz Date: Mon, 10 Jun 2024 00:48:44 +0200 Subject: [PATCH] fix(core): update --- ts/00_commitinfo_data.ts | 2 +- ts/data/index.ts | 3 ++- ts/data/secrebundle.ts | 34 +++++++++++++++++++++++++++ ts/data/{secret.ts => secretgroup.ts} | 29 ----------------------- ts/data/service.ts | 4 +++- ts/requests/image.ts | 3 +++ 6 files changed, 43 insertions(+), 32 deletions(-) create mode 100644 ts/data/secrebundle.ts rename ts/data/{secret.ts => secretgroup.ts} (67%) diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index a6551ee..96d09a6 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@serve.zone/interfaces', - version: '1.0.62', + version: '1.0.63', description: 'interfaces for working with containers' } diff --git a/ts/data/index.ts b/ts/data/index.ts index 3ef8876..dd79c61 100644 --- a/ts/data/index.ts +++ b/ts/data/index.ts @@ -7,7 +7,8 @@ export * from './docker.js'; export * from './env.js'; export * from './event.js'; export * from './image.js'; -export * from './secret.js' +export * from './secretgroup.js'; +export * from './secretgroup.js' export * from './server.js'; export * from './service.js'; export * from './status.js'; diff --git a/ts/data/secrebundle.ts b/ts/data/secrebundle.ts new file mode 100644 index 0000000..4a3e5d9 --- /dev/null +++ b/ts/data/secrebundle.ts @@ -0,0 +1,34 @@ +export interface ISecretBundle { + id: string; + data: { + name: string; + description: string; + + /** + * determines if the secret is a service or an external secret + * if external secret additional checks are put in place to protect the secret + */ + type: 'service' | 'external'; + + /** + * You can add specific secret groups using this + */ + includedSecretGroupIds: string[]; + + /** + * You can add specific tags using this + */ + includedTags: { + key: string; + value: string; + }[]; + + /** + * authrozations select a specific environment of a config bundle + */ + authorizations: Array<{ + secretAccessKey: string; + environment: string; + }>; + }; +} diff --git a/ts/data/secret.ts b/ts/data/secretgroup.ts similarity index 67% rename from ts/data/secret.ts rename to ts/data/secretgroup.ts index b219352..10fe73e 100644 --- a/ts/data/secret.ts +++ b/ts/data/secretgroup.ts @@ -52,32 +52,3 @@ export interface ISecretGroup { }; }; } - -export interface ISecretBundle { - id: string; - data: { - name: string; - description: string; - - /** - * You can add specific secret groups using this - */ - includedSecretGroupIds: string[]; - - /** - * You can add specific tags using this - */ - includedTags: { - key: string; - value: string; - }[]; - - /** - * authrozations select a specific environment of a config bundle - */ - authorizations: Array<{ - secretAccessKey: string; - environment: string; - }>; - }; -} diff --git a/ts/data/service.ts b/ts/data/service.ts index 037b29f..93f5379 100644 --- a/ts/data/service.ts +++ b/ts/data/service.ts @@ -2,7 +2,9 @@ import type { IServiceRessources } from "./docker.js"; export interface IService { name: string; - image: string; + imageId: string; + scaleFactor: number; + balancingStrategy: 'round-robin' | 'least-connections'; ports: { web: number; custom?: { [domain: string]: string }; diff --git a/ts/requests/image.ts b/ts/requests/image.ts index 874716e..cc8b3c2 100644 --- a/ts/requests/image.ts +++ b/ts/requests/image.ts @@ -15,6 +15,9 @@ export interface IRequest_GetAllImages extends plugins.typedrequestInterfaces.im }; } +/** + * get all kinds of image metadata + */ export interface IRequest_GetImageMetadata extends plugins.typedrequestInterfaces.implementsTR< plugins.typedrequestInterfaces.ITypedRequest, IRequest_GetImageMetadata