| 1 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 2 | |
| 3 | package netdataapi |
| 4 | |
| 5 | // ChartOpts contains all options needed to create a chart |
| 6 | type ChartOpts struct { |
| 7 | TypeID string |
| 8 | ID string |
| 9 | Name string |
| 10 | Title string |
| 11 | Units string |
| 12 | Family string |
| 13 | Context string |
| 14 | ChartType string |
| 15 | Priority int |
| 16 | UpdateEvery int |
| 17 | Options string |
| 18 | Plugin string |
| 19 | Module string |
| 20 | } |
| 21 | |
| 22 | // DimensionOpts contains all options needed to create a dimension |
| 23 | type DimensionOpts struct { |
| 24 | ID string |
| 25 | Name string |
| 26 | Algorithm string |
| 27 | Multiplier int |
| 28 | Divisor int |
| 29 | Options string |
| 30 | } |
| 31 | |
| 32 | // HostInfo contains the information needed for host definition |
| 33 | type HostInfo struct { |
| 34 | GUID string |
| 35 | Hostname string |
| 36 | Labels map[string]string |
| 37 | } |
| 38 | |
| 39 | // FunctionResult contains all parameters for a function result |
| 40 | type FunctionResult struct { |
| 41 | UID string |
| 42 | ContentType string |
| 43 | Payload string |
| 44 | Code string |
| 45 | ExpireTimestamp string |
| 46 | } |
| 47 | |
| 48 | // ConfigOpts contains options needed for config operations |
| 49 | type ConfigOpts struct { |
| 50 | ID string |
| 51 | Status string |
| 52 | ConfigType string |
| 53 | Path string |
| 54 | SourceType string |
| 55 | Source string |
| 56 | SupportedCommands string |
| 57 | } |
| 58 | |
| 59 | // FunctionGlobalOpts contains options for registering a global function with Netdata |
| 60 | type FunctionGlobalOpts struct { |
| 61 | Name string // Function name |
| 62 | Timeout int // Timeout in seconds |
| 63 | Help string // Help text |
| 64 | Tags string // Tags (e.g., "top") |
| 65 | Access string // Access permissions in hex format (e.g., "0x0000") |
| 66 | Priority int // Priority (higher = more important) |
| 67 | Version int // Function version |
| 68 | } |