fix(core): update
This commit is contained in:
parent
a6abbe59dd
commit
86440c5aa0
@ -3,6 +3,6 @@
|
|||||||
*/
|
*/
|
||||||
export const commitinfo = {
|
export const commitinfo = {
|
||||||
name: '@serve.zone/interfaces',
|
name: '@serve.zone/interfaces',
|
||||||
version: '1.0.18',
|
version: '1.0.19',
|
||||||
description: 'interfaces for working with containers'
|
description: 'interfaces for working with containers'
|
||||||
}
|
}
|
||||||
|
@ -6,13 +6,19 @@ export interface IClusterIdentifier {
|
|||||||
secretKey: string;
|
secretKey: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IClusterConfig {
|
export interface ICluster {
|
||||||
id: string;
|
id: string;
|
||||||
data: {
|
data: {
|
||||||
name: string;
|
name: string;
|
||||||
secretKey: string;
|
secretKey: string;
|
||||||
jumpCode: string;
|
jumpCode: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* when was the jump code used
|
||||||
|
* avoid replay attacks
|
||||||
|
*/
|
||||||
jumpCodeUsedAt: number;
|
jumpCodeUsedAt: number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* how can the cluster reach cloudly
|
* how can the cluster reach cloudly
|
||||||
*/
|
*/
|
||||||
@ -29,12 +35,16 @@ export interface IClusterConfig {
|
|||||||
containers: IClusterConfigContainer[];
|
containers: IClusterConfigContainer[];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* ACME info. This is used to get SSL certificates.
|
||||||
*/
|
*/
|
||||||
acmeInfo: {
|
acmeInfo: {
|
||||||
serverAddress: string;
|
serverAddress: string;
|
||||||
serverSecret: string;
|
serverSecret: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Where to get the images from
|
||||||
|
*/
|
||||||
registryInfo: IDockerRegistryInfo;
|
registryInfo: IDockerRegistryInfo;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,19 @@
|
|||||||
import type { IClusterConfig } from '../data/cluster.js';
|
import type { ICluster } from '../data/cluster.js';
|
||||||
import * as plugins from '../plugins.js';
|
import * as plugins from '../plugins.js';
|
||||||
|
|
||||||
|
export interface IRequest_GetAllClusters extends plugins.typedrequestInterfaces.implementsTR<
|
||||||
|
plugins.typedrequestInterfaces.ITypedRequest,
|
||||||
|
IRequest_GetAllClusters
|
||||||
|
> {
|
||||||
|
method: 'getAllClusters';
|
||||||
|
request: {
|
||||||
|
jwt: string;
|
||||||
|
};
|
||||||
|
response: {
|
||||||
|
clusters: ICluster[];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
export interface IRequest_CreateCluster extends plugins.typedrequestInterfaces.implementsTR<
|
export interface IRequest_CreateCluster extends plugins.typedrequestInterfaces.implementsTR<
|
||||||
plugins.typedrequestInterfaces.ITypedRequest,
|
plugins.typedrequestInterfaces.ITypedRequest,
|
||||||
IRequest_CreateCluster
|
IRequest_CreateCluster
|
||||||
@ -11,7 +24,7 @@ export interface IRequest_CreateCluster extends plugins.typedrequestInterfaces.i
|
|||||||
clusterName: string;
|
clusterName: string;
|
||||||
};
|
};
|
||||||
response: {
|
response: {
|
||||||
clusterConfig: IClusterConfig;
|
clusterConfig: ICluster;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -22,9 +35,9 @@ export interface IRequest_UpdateCluster extends plugins.typedrequestInterfaces.i
|
|||||||
method: 'updateCluster';
|
method: 'updateCluster';
|
||||||
request: {
|
request: {
|
||||||
jwt: string;
|
jwt: string;
|
||||||
clusterConfig: IClusterConfig;
|
clusterConfig: ICluster;
|
||||||
};
|
};
|
||||||
response: {
|
response: {
|
||||||
clusterConfig: IClusterConfig;
|
clusterConfig: ICluster;
|
||||||
};
|
};
|
||||||
}
|
}
|
@ -26,7 +26,7 @@ extends plugins.typedrequestInterfaces.implementsTR<
|
|||||||
clusterIdentifier: clusterInterfaces.IClusterIdentifier;
|
clusterIdentifier: clusterInterfaces.IClusterIdentifier;
|
||||||
};
|
};
|
||||||
response: {
|
response: {
|
||||||
configData: clusterInterfaces.IClusterConfig;
|
configData: clusterInterfaces.ICluster;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ extends plugins.typedrequestInterfaces.implementsTR<
|
|||||||
> {
|
> {
|
||||||
method: 'pushClusterConfig';
|
method: 'pushClusterConfig';
|
||||||
request: {
|
request: {
|
||||||
configData: clusterInterfaces.IClusterConfig;
|
configData: clusterInterfaces.ICluster;
|
||||||
};
|
};
|
||||||
response: {};
|
response: {};
|
||||||
}
|
}
|
||||||
@ -49,7 +49,7 @@ extends plugins.typedrequestInterfaces.implementsTR<
|
|||||||
> {
|
> {
|
||||||
method: 'pushContainerUpdate'
|
method: 'pushContainerUpdate'
|
||||||
request: {
|
request: {
|
||||||
configData: clusterInterfaces.IClusterConfig;
|
configData: clusterInterfaces.ICluster;
|
||||||
specificContainerConfigToUpdate: clusterInterfaces.IClusterConfigContainer;
|
specificContainerConfigToUpdate: clusterInterfaces.IClusterConfigContainer;
|
||||||
};
|
};
|
||||||
response: {}
|
response: {}
|
||||||
|
Loading…
Reference in New Issue
Block a user