models.gen.ts 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. /* Do not change, this code is generated from Golang structs */
  2. import { FieldConfig } from '@grafana/data';
  3. export interface ChannelAuthCheckConfig {
  4. role?: string;
  5. }
  6. export interface ChannelAuthConfig {
  7. subscribe?: ChannelAuthCheckConfig;
  8. publish?: ChannelAuthCheckConfig;
  9. }
  10. export interface ChangeLogOutputConfig {
  11. fieldName: string;
  12. channel: string;
  13. }
  14. export interface RemoteWriteOutputConfig {
  15. uid: string;
  16. sampleMilliseconds: number;
  17. }
  18. export interface ThresholdOutputConfig {
  19. fieldName: string;
  20. channel: string;
  21. }
  22. export interface NumberCompareFrameConditionConfig {
  23. fieldName: string;
  24. op: string;
  25. value: number;
  26. }
  27. export interface MultipleFrameConditionCheckerConfig {
  28. conditionType: string;
  29. conditions: FrameConditionCheckerConfig[];
  30. }
  31. export interface FrameConditionCheckerConfig {
  32. type: Omit<keyof FrameConditionCheckerConfig, 'type'>;
  33. multiple?: MultipleFrameConditionCheckerConfig;
  34. numberCompare?: NumberCompareFrameConditionConfig;
  35. }
  36. export interface ConditionalOutputConfig {
  37. condition?: FrameConditionCheckerConfig;
  38. output?: FrameOutputterConfig;
  39. }
  40. export interface RedirectOutputConfig {
  41. channel: string;
  42. }
  43. export interface MultipleOutputterConfig {
  44. outputs: FrameOutputterConfig[];
  45. }
  46. export interface ManagedStreamOutputConfig {}
  47. export interface FrameOutputterConfig {
  48. type: Omit<keyof FrameOutputterConfig, 'type'>;
  49. managedStream?: ManagedStreamOutputConfig;
  50. multiple?: MultipleOutputterConfig;
  51. redirect?: RedirectOutputConfig;
  52. conditional?: ConditionalOutputConfig;
  53. threshold?: ThresholdOutputConfig;
  54. remoteWrite?: RemoteWriteOutputConfig;
  55. loki?: LokiOutputConfig;
  56. changeLog?: ChangeLogOutputConfig;
  57. }
  58. export interface MultipleFrameProcessorConfig {
  59. processors: FrameProcessorConfig[];
  60. }
  61. export interface KeepFieldsFrameProcessorConfig {
  62. fieldNames: string[];
  63. }
  64. export interface DropFieldsFrameProcessorConfig {
  65. fieldNames: string[];
  66. }
  67. export interface FrameProcessorConfig {
  68. type: Omit<keyof FrameProcessorConfig, 'type'>;
  69. dropFields?: DropFieldsFrameProcessorConfig;
  70. keepFields?: KeepFieldsFrameProcessorConfig;
  71. multiple?: MultipleFrameProcessorConfig;
  72. }
  73. export interface JsonFrameConverterConfig {}
  74. export interface AutoInfluxConverterConfig {
  75. frameFormat: string;
  76. }
  77. export interface ExactJsonConverterConfig {
  78. fields: Field[];
  79. }
  80. export interface Label {
  81. name: string;
  82. value: string;
  83. }
  84. export interface Field {
  85. name: string;
  86. type: number;
  87. value: string;
  88. labels?: Label[];
  89. config?: FieldConfig;
  90. }
  91. export interface AutoJsonConverterConfig {
  92. fieldTips?: { [key: string]: Field };
  93. }
  94. export interface ConverterConfig {
  95. type: Omit<keyof ConverterConfig, 'type'>;
  96. jsonAuto?: AutoJsonConverterConfig;
  97. jsonExact?: ExactJsonConverterConfig;
  98. influxAuto?: AutoInfluxConverterConfig;
  99. jsonFrame?: JsonFrameConverterConfig;
  100. }
  101. export interface LokiOutputConfig {
  102. uid: string;
  103. }
  104. export interface RedirectDataOutputConfig {
  105. channel: string;
  106. }
  107. export interface DataOutputterConfig {
  108. type: Omit<keyof DataOutputterConfig, 'type'>;
  109. redirect?: RedirectDataOutputConfig;
  110. loki?: LokiOutputConfig;
  111. }
  112. export interface MultipleSubscriberConfig {
  113. subscribers: SubscriberConfig[];
  114. }
  115. export interface SubscriberConfig {
  116. type: Omit<keyof SubscriberConfig, 'type'>;
  117. multiple?: MultipleSubscriberConfig;
  118. }
  119. export interface ChannelRuleSettings {
  120. auth?: ChannelAuthConfig;
  121. subscribers?: SubscriberConfig[];
  122. dataOutputs?: DataOutputterConfig[];
  123. converter?: ConverterConfig;
  124. frameProcessors?: FrameProcessorConfig[];
  125. frameOutputs?: FrameOutputterConfig[];
  126. }
  127. export interface ChannelRule {
  128. pattern: string;
  129. settings: ChannelRuleSettings;
  130. }