diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 889f357..654f2e4 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.5', + version: '1.0.6', description: 'interfaces for working with containers' } diff --git a/ts/data/env.ts b/ts/data/env.ts new file mode 100644 index 0000000..622b1a3 --- /dev/null +++ b/ts/data/env.ts @@ -0,0 +1,6 @@ + +export interface IEnvBundle { + environment: string; + timeSensitive: boolean; + configKeyValueObject: {[key: string]: string}; +} \ No newline at end of file diff --git a/ts/data/index.ts b/ts/data/index.ts index e4a96b3..51d0ee7 100644 --- a/ts/data/index.ts +++ b/ts/data/index.ts @@ -1,6 +1,8 @@ export * from './cluster.js'; export * from './config.js'; +export * from './env.js'; export * from './event.js'; +export * from './secret.js' export * from './status.js'; export * from './traffic.js'; -export * from './version.js'; \ No newline at end of file +export * from './version.js'; diff --git a/ts/data/secret.ts b/ts/data/secret.ts new file mode 100644 index 0000000..d1b6198 --- /dev/null +++ b/ts/data/secret.ts @@ -0,0 +1,85 @@ +export interface ISecretGroup { + /** + * the insatnce id. This should be a random id, except for default + */ + id: string; + + data: { + /** + * the key of the secretgroup like CI_RUNNER_TOKEN + */ + key: string; + + /** + * the priority of the secretgroup + * will be used to determine which secretgroup will be used + * when there are multiple secretgroups with the same key + */ + priority?: number; + + /** + * any tags that can be used to filter the secretgroup + * can be used for putting secrets into projects + */ + tags: { + key: string; + value: string; + }[]; + /** + * the values for this secretGroup + */ + environments: { + [key: string]: { + value: string; + + /** + * can be used to update the value + */ + updateToken?: string; + + /** + * the linux timestamp of the last update + */ + lastUpdated: number; + history: { + timestamp: string; + value: string; + }[]; + }; + }; + }; +} + + +export interface IEnvBundle { + environment: string; + timeSensitive: boolean; + configKeyValueObject: {[key: string]: string}; +} + +export interface ISecretBundle { + id: string; + data: { + purpose: 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; + }>; + }; +}