Skip to content

Commit

Permalink
feat(logs): add dbaas/logs missing types
Browse files Browse the repository at this point in the history
ref: MANAGER-15918

Signed-off-by: Romain Jamet <[email protected]>
  • Loading branch information
Romain Jamet committed Dec 19, 2024
1 parent 6d73c16 commit 58f01f9
Show file tree
Hide file tree
Showing 10 changed files with 163 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { ServicePlanEnum } from './ServicePlanEnum';
import { ServiceStateEnum } from './ServiceStateEnum';

/** Service */
export interface Service {
/** Service creation */
createdAt: string;
/** Service custom name */
displayName?: string;
/** If set, can perform extra action on cluster */
isClusterOwner: boolean;
/** Is IAM enabled for this service? */
isIamEnabled: boolean;
/** Service plan */
plan: ServicePlanEnum;
/** Service name */
serviceName: string;
/** Service state */
state: ServiceStateEnum;
/** Service last update */
updatedAt?: string;
/** Username on DBaaS Logs */
username: string;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/** Possible values for ServicePlanEnum */
export enum ServicePlanEnum {
'ENTERPRISE' = 'ENTERPRISE',
'STANDARD' = 'STANDARD',
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/** Possible values for ServiceStateEnum */
export enum ServiceStateEnum {
'DISABLED' = 'DISABLED',
'ENABLED' = 'ENABLED',
'INIT' = 'INIT',
'TO_CONFIG' = 'TO_CONFIG',
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import { StreamColdStorageCompressionEnum } from './StreamColdStorageCompressionEnum';
import { StreamColdStorageContentEnum } from './StreamColdStorageContentEnum';
import { StreamColdStorageTargetEnum } from './StreamColdStorageTargetEnum';

/** Graylog stream */
export interface Stream {
/** Indicates if the current user can create alert on the stream */
canAlert: boolean;
/** Cluster ID */
clusterId: string;
/** Cold storage compression method */
coldStorageCompression?: StreamColdStorageCompressionEnum;
/** ColdStorage content */
coldStorageContent?: StreamColdStorageContentEnum;
/** Is Cold storage enabled? */
coldStorageEnabled?: boolean;
/** Notify on new Cold storage archive */
coldStorageNotifyEnabled?: boolean;
/** Cold storage retention in year */
coldStorageRetention?: number;
/** ColdStorage destination */
coldStorageTarget?: StreamColdStorageTargetEnum;
/** Stream creation */
createdAt: string;
/** Stream description */
description: string;
/** Encryption keys used to encrypt stream archives */
encryptionKeysIds?: string[];
/** Indexing current size (in bytes) */
indexingCurrentSize?: number;
/** Enable ES indexing */
indexingEnabled?: boolean;
/** Maximum indexing size (in GB) */
indexingMaxSize?: number;
/** If set, notify when size is near 80, 90 or 100 % of the maximum configured setting */
indexingNotifyEnabled?: boolean;
/** Indicates if you are allowed to edit entry */
isEditable: boolean;
/** Number of alert condition */
nbAlertCondition: number;
/** Number of coldstored archives */
nbArchive: number;
/** Number of subscriptions targeting this stream */
nbSubscription: number;
/** Parent stream ID */
parentStreamId?: string;
/** If set, pause indexing when maximum size is reach */
pauseIndexingOnMaxSize?: boolean;
/** Retention ID */
retentionId: string;
/** Stream ID */
streamId: string;
/** Stream description */
title: string;
/** Stream last update */
updatedAt?: string;
/** Enable Websocket */
webSocketEnabled?: boolean;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/** Possible values for StreamColdStorageCompressionEnum */
export enum StreamColdStorageCompressionEnum {
'DEFLATED' = 'DEFLATED',
'GZIP' = 'GZIP',
'LZMA' = 'LZMA',
'ZSTD' = 'ZSTD',
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** Possible values for StreamColdStorageContentEnum */
export enum StreamColdStorageContentEnum {
'ALL' = 'ALL',
'GELF' = 'GELF',
'PLAIN' = 'PLAIN',
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** Possible values for StreamColdStorageTargetEnum */
export enum StreamColdStorageTargetEnum {
'PCA' = 'PCA',
'PCI_DSS' = 'PCI_DSS',
'PCS' = 'PCS',
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { UrlTypeEnum } from './UrlTypeEnum';

/** Web address */
export interface Url {
/** Web URI */
address: string;
/** Service type */
type: UrlTypeEnum;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/** Possible values for UrlTypeEnum */
export enum UrlTypeEnum {
'CONSOLE' = 'CONSOLE',
'ELASTICSEARCH_API' = 'ELASTICSEARCH_API',
'GRAYLOG_API' = 'GRAYLOG_API',
'GRAYLOG_WEBUI' = 'GRAYLOG_WEBUI',
'HTTP_GELF' = 'HTTP_GELF',
'HTTP_TLS_GELF' = 'HTTP_TLS_GELF',
'KIBANA_WEBUI' = 'KIBANA_WEBUI',
'OPENSEARCH_API' = 'OPENSEARCH_API',
'OSD_WEBUI' = 'OSD_WEBUI',
'SERVICE_DOMAIN' = 'SERVICE_DOMAIN',
'TCP_BEATS' = 'TCP_BEATS',
'TCP_CAP_N_PROTO' = 'TCP_CAP_N_PROTO',
'TCP_GELF' = 'TCP_GELF',
'TCP_LTSV_LINE' = 'TCP_LTSV_LINE',
'TCP_LTSV_NUL' = 'TCP_LTSV_NUL',
'TCP_RFC5424' = 'TCP_RFC5424',
'TCP_TLS_BEATS' = 'TCP_TLS_BEATS',
'TCP_TLS_CAP_N_PROTO' = 'TCP_TLS_CAP_N_PROTO',
'TCP_TLS_GELF' = 'TCP_TLS_GELF',
'TCP_TLS_LTSV_LINE' = 'TCP_TLS_LTSV_LINE',
'TCP_TLS_LTSV_NUL' = 'TCP_TLS_LTSV_NUL',
'TCP_TLS_RFC5424' = 'TCP_TLS_RFC5424',
'UDP_CAP_N_PROTO' = 'UDP_CAP_N_PROTO',
'UDP_GELF' = 'UDP_GELF',
'UDP_LTSV_LINE' = 'UDP_LTSV_LINE',
'UDP_LTSV_NUL' = 'UDP_LTSV_NUL',
'UDP_RFC5424' = 'UDP_RFC5424',
'WEB_SOCKET' = 'WEB_SOCKET',
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,12 @@ export * from './LogSubscriptionResource';
export * from './LogSubscriptionResponse';
export * from './LogUrlCreation';
export * from './TemporaryLogsLink';
export * from './Service';
export * from './ServicePlanEnum';
export * from './ServiceStateEnum';
export * from './Stream';
export * from './StreamColdStorageCompressionEnum';
export * from './StreamColdStorageContentEnum';
export * from './StreamColdStorageTargetEnum';
export * from './Url';
export * from './UrlTypeEnum';

0 comments on commit 58f01f9

Please sign in to comment.