MCPcopy
hub / github.com/netdata/netdata / String

Method String

src/go/pkg/funcapi/enums.go:36–61  ·  view source on GitHub ↗

String returns the UI keyword used for this field type.

()

Source from the content-addressed store, hash-verified

34
35// String returns the UI keyword used for this field type.
36func (t FieldType) String() string {
37 switch t {
38 case FieldTypeInteger:
39 return "integer"
40 case FieldTypeFloat:
41 return "float"
42 case FieldTypeBoolean:
43 return "boolean"
44 case FieldTypeString:
45 return "string"
46 case FieldTypeDetailString:
47 return "detail-string"
48 case FieldTypeBarWithInteger:
49 return "bar-with-integer"
50 case FieldTypeDuration:
51 return "duration"
52 case FieldTypeTimestamp:
53 return "timestamp"
54 case FieldTypeArray:
55 return "array"
56 case FieldTypeFeedTemplate:
57 return "feedTemplate"
58 default:
59 return "none"
60 }
61}
62
63// MarshalJSON encodes the field type as a UI keyword.
64func (t FieldType) MarshalJSON() ([]byte, error) {

Callers 15

MarshalJSONMethod · 0.95
BuildColumnMethod · 0.45
TestChartFunction · 0.45
TestDimensionFunction · 0.45
TestCLABELFunction · 0.45

Calls

no outgoing calls

Tested by 15

TestChartFunction · 0.36
TestDimensionFunction · 0.36
TestCLABELFunction · 0.36
TestCLABELCOMMITFunction · 0.36
TestBEGINFunction · 0.36