From ff0c584c76e5b8b724bb56f785e273b2ede1e58e Mon Sep 17 00:00:00 2001 From: Sriram <153843+yesoreyeram@users.noreply.github.com> Date: Wed, 3 Jul 2024 07:46:23 +0100 Subject: [PATCH] removed unused anyframer (#6) --- README.md | 1 - cspell.config.json | 1 - go.work | 1 - lib/go/anyframer/CHANGELOG.md | 21 - lib/go/anyframer/anyframer.go | 66 ---- lib/go/anyframer/anyframer_test.go | 174 --------- lib/go/anyframer/column.go | 27 -- lib/go/anyframer/field.go | 105 ----- lib/go/anyframer/framer.go | 156 -------- lib/go/anyframer/go.mod | 107 ------ lib/go/anyframer/go.sum | 281 -------------- lib/go/anyframer/input_type.go | 109 ------ lib/go/anyframer/input_type_test.go | 56 --- lib/go/anyframer/package.json | 9 - lib/go/anyframer/root_selector_test.go | 22 -- lib/go/anyframer/selector.go | 22 -- lib/go/anyframer/sliceframer.go | 239 ------------ lib/go/anyframer/sliceframer_test.go | 83 ---- lib/go/anyframer/structframer.go | 54 --- lib/go/anyframer/structframer_test.go | 75 ---- lib/go/anyframer/testdata/all/users.csv | 7 - lib/go/anyframer/testdata/all/users.html | 66 ---- lib/go/anyframer/testdata/all/users.json | 44 --- lib/go/anyframer/testdata/all/users.tsv | 7 - lib/go/anyframer/testdata/all/users.xml | 45 --- .../golden/TestAnyFile/users_csv.jsonc | 116 ------ .../golden/TestAnyFile/users_html.jsonc | 52 --- .../golden/TestAnyFile/users_json.jsonc | 116 ------ .../golden/TestAnyFile/users_tsv.jsonc | 116 ------ .../golden/TestAnyFile/users_xml.jsonc | 116 ------ .../golden/TestJSONFiles/address.jsonc | 108 ------ .../golden/TestJSONFiles/boolean-array.jsonc | 46 --- .../golden/TestJSONFiles/boolean.jsonc | 42 -- .../golden/TestJSONFiles/invoice.jsonc | 42 -- .../golden/TestJSONFiles/library.jsonc | 42 -- .../golden/TestJSONFiles/library_books.jsonc | 104 ----- .../library_books_price_list.jsonc | 62 --- .../TestJSONFiles/library_books_stats.jsonc | 97 ----- .../TestJSONFiles/library_books_title.jsonc | 48 --- .../library_books_total_value.jsonc | 42 -- .../TestJSONFiles/library_costly_books.jsonc | 56 --- .../TestJSONFiles/library_customers.jsonc | 72 ---- .../golden/TestJSONFiles/library_loans.jsonc | 72 ---- .../golden/TestJSONFiles/number-array.jsonc | 46 --- .../golden/TestJSONFiles/number.jsonc | 42 -- .../testdata/golden/TestJSONFiles/org.jsonc | 75 ---- .../golden/TestJSONFiles/org_emplyees.jsonc | 148 ------- .../golden/TestJSONFiles/string-array.jsonc | 46 --- .../golden/TestJSONFiles/string.jsonc | 42 -- .../testdata/golden/TestJSONFiles/user.jsonc | 119 ------ .../testdata/golden/TestJSONFiles/users.jsonc | 140 ------- .../array_selector_with_value.jsonc | 68 ---- .../array_selector_without_value.jsonc | 24 -- .../TestSliceToFrame/array_of_array.jsonc | 44 --- .../TestSliceToFrame/array_of_boolean.jsonc | 44 --- .../TestSliceToFrame/array_of_numbers.jsonc | 44 --- .../TestSliceToFrame/array_of_objects.jsonc | 104 ----- .../array_of_objects_with_columns.jsonc | 68 ---- ...cts_with_columns_and_nested_selector.jsonc | 80 ---- .../TestSliceToFrame/array_of_strings.jsonc | 44 --- ..._mixed_object_should_not_throw_error.jsonc | 361 ------------------ ...mixed_objects_should_parse_correctly.jsonc | 361 ------------------ .../golden/TestToFrame/basic_csv.jsonc | 68 ---- .../golden/TestToFrame/basic_tsv.jsonc | 68 ---- .../golden/TestToFrame/nested_json.jsonc | 42 -- .../TestToFrame/simple_boolean_array.jsonc | 44 --- .../golden/TestToFrame/simple_html.jsonc | 42 -- .../simple_html_with_root_selector.jsonc | 44 --- .../TestToFrame/simple_numeric_array.jsonc | 44 --- .../TestToFrame/simple_object_array.jsonc | 68 ---- .../TestToFrame/simple_string_array.jsonc | 44 --- .../golden/TestToFrame/simple_xml.jsonc | 42 -- .../simple_xml_with_root_selector.jsonc | 68 ---- .../golden/TestToFrame/single_boolean.jsonc | 42 -- .../golden/TestToFrame/single_number.jsonc | 42 -- .../golden/TestToFrame/single_string.jsonc | 42 -- .../single_string_without_quotes.jsonc | 42 -- ...ng_without_quotes_and_numeric_values.jsonc | 42 -- lib/go/anyframer/testdata/json/address.json | 47 --- .../testdata/json/boolean-array.json | 1 - lib/go/anyframer/testdata/json/boolean.json | 1 - lib/go/anyframer/testdata/json/invoice.json | 73 ---- lib/go/anyframer/testdata/json/library.json | 79 ---- .../anyframer/testdata/json/number-array.json | 1 - lib/go/anyframer/testdata/json/number.json | 1 - lib/go/anyframer/testdata/json/org.json | 73 ---- .../anyframer/testdata/json/string-array.json | 1 - lib/go/anyframer/testdata/json/string.json | 1 - lib/go/anyframer/testdata/json/user.json | 24 -- lib/go/anyframer/testdata/json/users.json | 49 --- lib/go/anyframer/testing_test.go | 3 - lib/go/anyframer/timeUtils.go | 35 -- lib/go/anyframer/utils.go | 103 ----- package.json | 1 + 94 files changed, 1 insertion(+), 6303 deletions(-) delete mode 100644 lib/go/anyframer/CHANGELOG.md delete mode 100644 lib/go/anyframer/anyframer.go delete mode 100644 lib/go/anyframer/anyframer_test.go delete mode 100644 lib/go/anyframer/column.go delete mode 100644 lib/go/anyframer/field.go delete mode 100644 lib/go/anyframer/framer.go delete mode 100644 lib/go/anyframer/go.mod delete mode 100644 lib/go/anyframer/go.sum delete mode 100644 lib/go/anyframer/input_type.go delete mode 100644 lib/go/anyframer/input_type_test.go delete mode 100644 lib/go/anyframer/package.json delete mode 100644 lib/go/anyframer/root_selector_test.go delete mode 100644 lib/go/anyframer/selector.go delete mode 100644 lib/go/anyframer/sliceframer.go delete mode 100644 lib/go/anyframer/sliceframer_test.go delete mode 100644 lib/go/anyframer/structframer.go delete mode 100644 lib/go/anyframer/structframer_test.go delete mode 100644 lib/go/anyframer/testdata/all/users.csv delete mode 100644 lib/go/anyframer/testdata/all/users.html delete mode 100644 lib/go/anyframer/testdata/all/users.json delete mode 100644 lib/go/anyframer/testdata/all/users.tsv delete mode 100644 lib/go/anyframer/testdata/all/users.xml delete mode 100644 lib/go/anyframer/testdata/golden/TestAnyFile/users_csv.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestAnyFile/users_html.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestAnyFile/users_json.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestAnyFile/users_tsv.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestAnyFile/users_xml.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestJSONFiles/address.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestJSONFiles/boolean-array.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestJSONFiles/boolean.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestJSONFiles/invoice.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestJSONFiles/library.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestJSONFiles/library_books.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestJSONFiles/library_books_price_list.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestJSONFiles/library_books_stats.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestJSONFiles/library_books_title.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestJSONFiles/library_books_total_value.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestJSONFiles/library_costly_books.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestJSONFiles/library_customers.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestJSONFiles/library_loans.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestJSONFiles/number-array.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestJSONFiles/number.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestJSONFiles/org.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestJSONFiles/org_emplyees.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestJSONFiles/string-array.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestJSONFiles/string.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestJSONFiles/user.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestJSONFiles/users.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestRootSelector/array_selector_with_value.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestRootSelector/array_selector_without_value.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestSliceToFrame/array_of_array.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestSliceToFrame/array_of_boolean.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestSliceToFrame/array_of_numbers.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestSliceToFrame/array_of_objects.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestSliceToFrame/array_of_objects_with_columns.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestSliceToFrame/array_of_objects_with_columns_and_nested_selector.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestSliceToFrame/array_of_strings.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestStructToFrame/map_of_mixed_object_should_not_throw_error.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestStructToFrame/map_of_mixed_objects_should_parse_correctly.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestToFrame/basic_csv.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestToFrame/basic_tsv.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestToFrame/nested_json.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestToFrame/simple_boolean_array.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestToFrame/simple_html.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestToFrame/simple_html_with_root_selector.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestToFrame/simple_numeric_array.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestToFrame/simple_object_array.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestToFrame/simple_string_array.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestToFrame/simple_xml.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestToFrame/simple_xml_with_root_selector.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestToFrame/single_boolean.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestToFrame/single_number.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestToFrame/single_string.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestToFrame/single_string_without_quotes.jsonc delete mode 100644 lib/go/anyframer/testdata/golden/TestToFrame/single_string_without_quotes_and_numeric_values.jsonc delete mode 100644 lib/go/anyframer/testdata/json/address.json delete mode 100644 lib/go/anyframer/testdata/json/boolean-array.json delete mode 100644 lib/go/anyframer/testdata/json/boolean.json delete mode 100644 lib/go/anyframer/testdata/json/invoice.json delete mode 100644 lib/go/anyframer/testdata/json/library.json delete mode 100644 lib/go/anyframer/testdata/json/number-array.json delete mode 100644 lib/go/anyframer/testdata/json/number.json delete mode 100644 lib/go/anyframer/testdata/json/org.json delete mode 100644 lib/go/anyframer/testdata/json/string-array.json delete mode 100644 lib/go/anyframer/testdata/json/string.json delete mode 100644 lib/go/anyframer/testdata/json/user.json delete mode 100644 lib/go/anyframer/testdata/json/users.json delete mode 100644 lib/go/anyframer/testing_test.go delete mode 100644 lib/go/anyframer/timeUtils.go delete mode 100644 lib/go/anyframer/utils.go diff --git a/README.md b/README.md index 77fee4e..dd2f2f4 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,6 @@ The libs used by [Grafana Infinity data source plugin](https://grafana.com/grafa ## Included go packages - [macros](./lib/go/macros/) -- [anyframer](./lib/go/anyframer/) - [jsonframer](./lib/go/jsonframer/) - [csvframer](./lib/go/csvframer/) - [xmlframer](./lib/go/xmlframer/) diff --git a/cspell.config.json b/cspell.config.json index 161cd72..5508a72 100644 --- a/cspell.config.json +++ b/cspell.config.json @@ -8,7 +8,6 @@ "go.sum" ], "words": [ - "anyframer", "araddon", "basgys", "csvframer", diff --git a/go.work b/go.work index 2b6a9b4..3633966 100644 --- a/go.work +++ b/go.work @@ -1,7 +1,6 @@ go 1.22.1 use ( - ./lib/go/anyframer ./lib/go/csvframer ./lib/go/framesql ./lib/go/gframer diff --git a/lib/go/anyframer/CHANGELOG.md b/lib/go/anyframer/CHANGELOG.md deleted file mode 100644 index a0bbed6..0000000 --- a/lib/go/anyframer/CHANGELOG.md +++ /dev/null @@ -1,21 +0,0 @@ -# @grafana/infinity-anyframer - -## 1.0.0 - -- chore release - -## 0.0.5 - -- 873e734: cleanup - -## 0.0.4 - -- replaced the backend package `blues/jsonata-go` to `xiatechs/jsonata-go` - -## 0.0.3 - -- 🐛 **Chore**: updated build dependency turbo to 1.10.6 - -## 0.0.2 - -- 🐛 **Chore**: Fixed an issue with the github actions diff --git a/lib/go/anyframer/anyframer.go b/lib/go/anyframer/anyframer.go deleted file mode 100644 index 39c636e..0000000 --- a/lib/go/anyframer/anyframer.go +++ /dev/null @@ -1,66 +0,0 @@ -package anyframer - -import ( - "net/http" - "time" - - "github.com/grafana/grafana-plugin-sdk-go/data" -) - -// AnyFramer defines the framer options -type AnyFramer struct { - Name string `json:"name,omitempty"` - InputType InputType `json:"inputType,omitempty"` - RawURL string `json:"rawUrl,omitempty"` - Headers http.Header `json:"headers,omitempty"` - RootSelector string `json:"rootSelector,omitempty"` - Columns []Column `json:"columns,omitempty"` - CSVOptions CSVOptions `json:"csvOptions,omitempty"` -} - -// ToFrame converts the given input string or input interface to data frame -func (framerOptions *AnyFramer) ToFrame(input any) (*data.Frame, error) { - if framerOptions.Name == "" { - framerOptions.Name = "response" - } - switch t := input.(type) { - case string: - if framerOptions.InputType == "" || framerOptions.InputType == InputTypeUnknown { - framerOptions.InputType = framerOptions.GuessType(input.(string)) - } - jsonObject, err := framerOptions.toJSONObject(input.(string)) - if err != nil { - return nil, err - } - return toFrameFromInterface(jsonObject, *framerOptions) - default: - noop(t) - return toFrameFromInterface(input, *framerOptions) - } -} - -func toFrameFromInterface(input any, options AnyFramer) (*data.Frame, error) { - input, err := applySelector(input, options.RootSelector) - if err != nil { - return nil, err - } - switch x := input.(type) { - case nil, string, float64, float32, int64, int32, int16, int8, int, uint64, uint32, uint16, uint8, uint, bool, time.Time: - return StructToFrame(options.Name, map[string]any{options.Name: input}) - case []any: - return SliceToFrame(options.Name, input.([]any), options.Columns) - default: - noop(x) - return StructToFrame(options.Name, input) - } -} - -// CSVOptions ... -type CSVOptions struct { - Delimiter string `json:"delimiter,omitempty"` - Comment string `json:"comment,omitempty"` - RelaxColumnCount bool `json:"relaxColumnCount,omitempty"` - SkipLinesWithError bool `json:"skipLinesWithError,omitempty"` - NoHeaders bool `json:"noHeaders,omitempty"` - Headers []string `json:"headers,omitempty"` -} diff --git a/lib/go/anyframer/anyframer_test.go b/lib/go/anyframer/anyframer_test.go deleted file mode 100644 index 37642be..0000000 --- a/lib/go/anyframer/anyframer_test.go +++ /dev/null @@ -1,174 +0,0 @@ -package anyframer_test - -import ( - "errors" - "os" - "strings" - "testing" - - "github.com/grafana/grafana-plugin-sdk-go/experimental" - "github.com/grafana/infinity-libs/lib/go/anyframer" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -type Framer = anyframer.AnyFramer - -type testInputs struct { - input string - framer Framer - wantErr error -} - -var testToFrame = func(tt testInputs) func(t *testing.T) { - return func(t *testing.T) { - got, err := tt.framer.ToFrame(tt.input) - if tt.wantErr != nil { - require.NotNil(t, err) - assert.Equal(t, tt.wantErr, err) - return - } - require.Nil(t, err) - require.NotNil(t, got) - experimental.CheckGoldenJSONFrame(t, "testdata/golden", t.Name(), got, updateGoldenFile) - } -} - -func TestToFrame(t *testing.T) { - t.Run("empty input should throw error", testToFrame(testInputs{ - wantErr: errors.New("invalid/empty input"), - })) - t.Run("single string without quotes", testToFrame(testInputs{ - input: `hello world`, - })) - t.Run("single string without quotes and numeric values", testToFrame(testInputs{ - input: `hello 123 world`, - })) - t.Run("single string", testToFrame(testInputs{ - input: `"hello"`, - })) - t.Run("single number", testToFrame(testInputs{ - input: `123.456`, - })) - t.Run("single boolean", testToFrame(testInputs{ - input: `true`, - })) - t.Run("basic csv", testToFrame(testInputs{ - input: "a,b,c\n1,2,3\n4,5,6", - })) - t.Run("basic tsv", testToFrame(testInputs{ - input: "a b c\n1 2 3\n4 5 6", - })) - t.Run("simple string array", testToFrame(testInputs{ - input: `["foo","bar"]`, - })) - t.Run("simple numeric array", testToFrame(testInputs{ - input: `[123, 456.789]`, - })) - t.Run("simple boolean array", testToFrame(testInputs{ - input: `[false, true]`, - })) - t.Run("simple object array", testToFrame(testInputs{ - input: `[{"name":"foo","salary": 123, "self_employed":false},{"name":"bar","salary": 456.789, "self_employed":true}]`, - })) - t.Run("nested json", testToFrame(testInputs{ - input: `{ "users" : [{"name":"foo","salary": 123, "self_employed":false},{"name":"bar","salary": 456.789, "self_employed":true}] }`, - })) - t.Run("simple xml", testToFrame(testInputs{ - input: `foo123falsebar456.789true`, - })) - t.Run("simple html", testToFrame(testInputs{ - input: `
namesalaryself_employed
foo123false
bar456.789true
`, - })) - t.Run("simple xml with root selector", testToFrame(testInputs{ - input: `foo123falsebar456.789true`, - framer: Framer{RootSelector: "root.row"}, - })) - t.Run("simple html with root selector", testToFrame(testInputs{ - input: `
namesalaryself_employed
foo123false
bar456.789true
`, - framer: Framer{RootSelector: "html.body.table.tbody.tr"}, - })) -} - -func TestAnyFile(t *testing.T) { - files, _ := os.ReadDir("./testdata/all") - for _, file := range files { - if file.IsDir() { - continue - } - b, err := os.ReadFile("./testdata/all/" + file.Name()) - require.Nil(t, err) - require.NotNil(t, b) - framer := Framer{RawURL: file.Name()} - switch file.Name() { - case "users.json": - case "users.csv": - case "users.tsv": - case "users.xml": - framer.RootSelector = "root.row" - case "users.html": - framer.RootSelector = "html.body.table.tbody.tr" - default: - } - t.Run(strings.ReplaceAll(file.Name(), ".", "_"), testToFrame(testInputs{input: string(b), framer: framer})) - } -} - -func testName(input string) string { - return strings.ReplaceAll(strings.ReplaceAll(input, ".json", ""), " ", "-") -} - -func TestJSONFiles(t *testing.T) { - files, _ := os.ReadDir("./testdata/json") - for _, file := range files { - if file.IsDir() { - continue - } - b, err := os.ReadFile("./testdata/json/" + file.Name()) - require.Nil(t, err) - require.NotNil(t, b) - framer := Framer{RawURL: file.Name()} - switch file.Name() { - default: - } - t.Run(testName(file.Name()), testToFrame(testInputs{input: string(b), framer: framer})) - switch file.Name() { - case "org.json": - t.Run("org emplyees", testToFrame(testInputs{input: string(b), - framer: Framer{RawURL: file.Name(), RootSelector: "employees"}, - })) - case "library.json": - t.Run("library books", testToFrame(testInputs{input: string(b), - framer: Framer{RawURL: file.Name(), RootSelector: "library.books"}, - })) - t.Run("library loans", testToFrame(testInputs{input: string(b), - framer: Framer{RawURL: file.Name(), RootSelector: "library.loans"}, - })) - t.Run("library customers", testToFrame(testInputs{input: string(b), - framer: Framer{RawURL: file.Name(), RootSelector: "library.customers"}, - })) - t.Run("library books title", testToFrame(testInputs{input: string(b), - framer: Framer{RawURL: file.Name(), RootSelector: `library.books.title`}, - })) - t.Run("library books price list", testToFrame(testInputs{input: string(b), - framer: Framer{RawURL: file.Name(), RootSelector: `$map(library.books,function($v){return { "title": $v.title, "price": $v.price }})`}, - })) - t.Run("library costly books", testToFrame(testInputs{input: string(b), - framer: Framer{RawURL: file.Name(), RootSelector: `$map(library.books[price > 30],function($v){return { "title": $v.title, "price": $v.price }})`}, - })) - t.Run("library books total value", testToFrame(testInputs{input: string(b), - framer: Framer{RawURL: file.Name(), RootSelector: `$sum($map(library.books,function($v){return {"value":$v.price*$v.copies}}).value)`}, - })) - t.Run("library books stats", testToFrame(testInputs{input: string(b), - framer: Framer{RawURL: file.Name(), RootSelector: `{ - "total books type": $count(library.books.authors), - "total books count": $sum(library.books.copies), - "total books value": $sum(library.books.price), - "max books value": $max(library.books.price), - "min books value": $min(library.books.price), - "all books value": $sum($map(library.books,function($v){return {"value":$v.price*$v.copies}}).value) - }`}, - })) - } - } -} diff --git a/lib/go/anyframer/column.go b/lib/go/anyframer/column.go deleted file mode 100644 index bd46edc..0000000 --- a/lib/go/anyframer/column.go +++ /dev/null @@ -1,27 +0,0 @@ -package anyframer - -// Column ... -type Column struct { - Selector string `json:"selector,omitempty"` - Alias string `json:"alias,omitempty"` - Format ColumnFormat `json:"format,omitempty"` - TimeFormat string `json:"timeFormat,omitempty"` -} - -// ColumnFormat ... -type ColumnFormat string - -const ( - // ColumnFormatString ... - ColumnFormatString ColumnFormat = "string" - // ColumnFormatNumber ... - ColumnFormatNumber ColumnFormat = "number" - // ColumnFormatBoolean ... - ColumnFormatBoolean ColumnFormat = "boolean" - // ColumnFormatTimeStamp ... - ColumnFormatTimeStamp ColumnFormat = "timestamp" - // ColumnFormatUnixMsecTimeStamp ... - ColumnFormatUnixMsecTimeStamp ColumnFormat = "timestamp_epoch" - // ColumnFormatUnixSecTimeStamp ... - ColumnFormatUnixSecTimeStamp ColumnFormat = "timestamp_epoch_s" -) diff --git a/lib/go/anyframer/field.go b/lib/go/anyframer/field.go deleted file mode 100644 index e286965..0000000 --- a/lib/go/anyframer/field.go +++ /dev/null @@ -1,105 +0,0 @@ -package anyframer - -import ( - "time" - - "github.com/grafana/grafana-plugin-sdk-go/data" -) - -func getFieldTypeAndValue(value any) (t data.FieldType, out any) { - switch x := value.(type) { - case nil: - return data.FieldTypeNullableString, value - case string: - return data.FieldTypeNullableString, value - case *string: - return data.FieldTypeNullableString, value - case float64: - return data.FieldTypeNullableFloat64, value - case *float64: - return data.FieldTypeNullableFloat64, value - case float32: - return data.FieldTypeNullableFloat64, float64(value.(float32)) - case *float32: - a := value.(*float32) - return data.FieldTypeNullableFloat64, float64(*a) - case int64: - return data.FieldTypeNullableFloat64, float64(value.(int64)) - case *int64: - a := value.(*int64) - return data.FieldTypeNullableFloat64, float64(*a) - case int32: - return data.FieldTypeNullableFloat64, float64(value.(int32)) - case *int32: - a := value.(*int32) - return data.FieldTypeNullableFloat64, float64(*a) - case int16: - return data.FieldTypeNullableFloat64, float64(value.(int16)) - case *int16: - a := value.(*int16) - return data.FieldTypeNullableFloat64, float64(*a) - case int8: - return data.FieldTypeNullableFloat64, float64(value.(int8)) - case *int8: - a := value.(*int8) - return data.FieldTypeNullableFloat64, float64(*a) - case int: - return data.FieldTypeNullableFloat64, float64(value.(int)) - case *int: - a := value.(*int) - return data.FieldTypeNullableFloat64, float64(*a) - case uint64: - return data.FieldTypeNullableFloat64, float64(value.(uint64)) - case *uint64: - a := value.(*uint64) - return data.FieldTypeNullableFloat64, float64(*a) - case uint32: - return data.FieldTypeNullableFloat64, float64(value.(uint32)) - case *uint32: - a := value.(*uint32) - return data.FieldTypeNullableFloat64, float64(*a) - case uint16: - return data.FieldTypeNullableFloat64, float64(value.(uint16)) - case *uint16: - a := value.(*uint16) - return data.FieldTypeNullableFloat64, float64(*a) - case uint8: - return data.FieldTypeNullableFloat64, float64(value.(uint8)) - case *uint8: - a := value.(*uint8) - return data.FieldTypeNullableFloat64, float64(*a) - case uint: - return data.FieldTypeNullableFloat64, float64(value.(uint)) - case *uint: - a := value.(*uint) - return data.FieldTypeNullableFloat64, float64(*a) - case bool: - return data.FieldTypeNullableBool, value - case *bool: - return data.FieldTypeNullableBool, value - case time.Time: - return data.FieldTypeNullableTime, value - case *time.Time: - return data.FieldTypeNullableTime, value - case any: - return data.FieldTypeJSON, value - default: - noop(x) - return data.FieldTypeNullableString, value - } -} - -func getFieldTypeFromSlice(value []any) (t data.FieldType) { - for _, item := range value { - if item != nil { - a, _ := getFieldTypeAndValue(item) - return a - } - } - return data.FieldTypeNullableString -} - -func getFieldValue(item any) (v any) { - _, out := getFieldTypeAndValue(item) - return out -} diff --git a/lib/go/anyframer/framer.go b/lib/go/anyframer/framer.go deleted file mode 100644 index 3b2adda..0000000 --- a/lib/go/anyframer/framer.go +++ /dev/null @@ -1,156 +0,0 @@ -package anyframer - -import ( - "encoding/csv" - "encoding/json" - "errors" - "fmt" - "io" - "strings" - - xj "github.com/basgys/goxml2json" -) - -func (options *AnyFramer) toJSONObject(input string) (any, error) { - input = strings.TrimSpace(input) - if input == "" { - return nil, errors.New("invalid/empty input") - } - switch options.InputType { - case InputTypeJSON: - return toObjectFromJSONString(input, *options) - case InputTypeTSV: - options.CSVOptions.Delimiter = "\t" - return toObjectFromCSVString(input, *options) - case InputTypeCSV: - return toObjectFromCSVString(input, *options) - case InputTypeXML: - return toObjectFromXMLString(input, *options) - case InputTypeHTML: - return toObjectFromHTMLString(input, *options) - case InputTypeUnknown: - var o any - if err := json.Unmarshal([]byte(input), &o); err != nil { - return input, nil - } - return o, nil - default: - return nil, errors.New("error converting input to JSON") - } -} - -func toObjectFromJSONString(jsonString string, _ AnyFramer) (jsonObject any, err error) { - err = json.Unmarshal([]byte(jsonString), &jsonObject) - if err != nil { - return nil, err - } - return jsonObject, nil -} - -func toObjectFromCSVString(csvString string, options AnyFramer) (jsonObject any, err error) { - out := []any{} - delimiter := options.CSVOptions.Delimiter - if delimiter == "" { - delimiter = "," - } - if len(options.CSVOptions.Headers) > 0 { - headers := []string{} - for _, h := range options.CSVOptions.Headers { - h = strings.TrimSpace(h) - if strings.HasPrefix(h, `"`) && strings.HasSuffix(h, `"`) { - headers = append(headers, h) - continue - } - headers = append(headers, `"`+h+`"`) - } - csvString = strings.Join(headers, delimiter) + "\n" + csvString - } - r := csv.NewReader(strings.NewReader(csvString)) - r.LazyQuotes = true - if options.CSVOptions.Comment != "" { - r.Comment = rune(options.CSVOptions.Comment[0]) - } - if delimiter != "" { - r.Comma = rune(delimiter[0]) - } - if options.CSVOptions.RelaxColumnCount { - r.FieldsPerRecord = -1 - } - parsedCSV := [][]string{} - for { - record, err := r.Read() - if err == io.EOF { - break - } - if err == nil { - parsedCSV = append(parsedCSV, record) - continue - } - if !options.CSVOptions.SkipLinesWithError { - return nil, fmt.Errorf("error reading csv response. %w, %v", err, record) - } - } - if len(parsedCSV) == 0 { - return nil, errors.New("invalid/empty csv") - } - header := []string{} - records := [][]string{} - if !options.CSVOptions.NoHeaders { - header = parsedCSV[0] - for idx, hItem := range header { - for _, col := range options.Columns { - if col.Selector == hItem && col.Alias != "" { - header[idx] = col.Alias - } - } - } - records = parsedCSV[1:] - } - if options.CSVOptions.NoHeaders { - records = parsedCSV - if len(records) > 0 { - for i := 0; i < len(records[0]); i++ { - header = append(header, fmt.Sprintf("%d", i+1)) - } - } - } - for _, row := range records { - item := map[string]any{} - for hID, h := range header { - if hID < len(row) { - item[h] = row[hID] - } - } - out = append(out, item) - } - return out, nil -} - -func toObjectFromHTMLString(htmlString string, options AnyFramer) (jsonObject any, err error) { - return toObjectFromXMLString(htmlString, options) -} - -func toObjectFromXMLString(xmlString string, options AnyFramer) (jsonObject any, err error) { - o, err := xmlContentToJSONString(xmlString, options) - if err != nil { - return nil, err - } - err = json.Unmarshal([]byte(o), &jsonObject) - if err != nil { - return nil, err - } - return jsonObject, nil -} - -func xmlContentToJSONString(xmlString string, _ AnyFramer) (jsonString string, err error) { - xml := strings.NewReader(xmlString) - json, err := xj.Convert(xml) - if err != nil { - return "", err - } - o := json.String() - if strings.HasSuffix(o, "\n") { - return strings.TrimSuffix(o, "\n"), nil - } - return json.String(), nil -} diff --git a/lib/go/anyframer/go.mod b/lib/go/anyframer/go.mod deleted file mode 100644 index 7251357..0000000 --- a/lib/go/anyframer/go.mod +++ /dev/null @@ -1,107 +0,0 @@ -module github.com/grafana/infinity-libs/lib/go/anyframer - -go 1.22.1 - -require ( - github.com/basgys/goxml2json v1.1.0 - github.com/grafana/grafana-plugin-sdk-go v0.236.0 - github.com/stretchr/testify v1.9.0 - github.com/xiatechs/jsonata-go v1.8.7 -) - -require ( - github.com/BurntSushi/toml v1.3.2 // indirect - github.com/apache/arrow/go/v15 v15.0.2 // indirect - github.com/beorn7/perks v1.0.1 // indirect - github.com/bitly/go-simplejson v0.5.1 // indirect - github.com/cenkalti/backoff/v4 v4.3.0 // indirect - github.com/cespare/xxhash/v2 v2.3.0 // indirect - github.com/cheekybits/genny v1.0.0 // indirect - github.com/chromedp/cdproto v0.0.0-20231114014204-3e458d5176f9 // indirect - github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect - github.com/davecgh/go-spew v1.1.1 // indirect - github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5 // indirect - github.com/fatih/color v1.16.0 // indirect - github.com/fsnotify/fsnotify v1.4.9 // indirect - github.com/getkin/kin-openapi v0.124.0 // indirect - github.com/go-logr/logr v1.4.1 // indirect - github.com/go-logr/stdr v1.2.2 // indirect - github.com/go-openapi/jsonpointer v0.20.2 // indirect - github.com/go-openapi/swag v0.22.8 // indirect - github.com/goccy/go-json v0.10.3 // indirect - github.com/gogo/protobuf v1.3.2 // indirect - github.com/golang/protobuf v1.5.4 // indirect - github.com/google/flatbuffers v24.3.25+incompatible // indirect - github.com/google/go-cmp v0.6.0 // indirect - github.com/google/uuid v1.6.0 // indirect - github.com/gorilla/mux v1.8.1 // indirect - github.com/grafana/otel-profiling-go v0.5.1 // indirect - github.com/grafana/pyroscope-go/godeltaprof v0.1.7 // indirect - github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1 // indirect - github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 // indirect - github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 // indirect - github.com/hashicorp/go-hclog v1.6.3 // indirect - github.com/hashicorp/go-plugin v1.6.1 // indirect - github.com/hashicorp/yamux v0.1.1 // indirect - github.com/invopop/yaml v0.2.0 // indirect - github.com/josharian/intern v1.0.0 // indirect - github.com/json-iterator/go v1.1.12 // indirect - github.com/klauspost/compress v1.17.9 // indirect - github.com/klauspost/cpuid/v2 v2.2.8 // indirect - github.com/magefile/mage v1.15.0 // indirect - github.com/mailru/easyjson v0.7.7 // indirect - github.com/mattetti/filebuffer v1.0.1 // indirect - github.com/mattn/go-colorable v0.1.13 // indirect - github.com/mattn/go-isatty v0.0.20 // indirect - github.com/mattn/go-runewidth v0.0.15 // indirect - github.com/mitchellh/go-testing-interface v1.14.1 // indirect - github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect - github.com/modern-go/reflect2 v1.0.2 // indirect - github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 // indirect - github.com/ncruces/go-strftime v0.1.9 // indirect - github.com/oklog/run v1.1.0 // indirect - github.com/olekukonko/tablewriter v0.0.5 // indirect - github.com/perimeterx/marshmallow v1.1.5 // indirect - github.com/pierrec/lz4/v4 v4.1.21 // indirect - github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/prometheus/client_golang v1.19.1 // indirect - github.com/prometheus/client_model v0.6.1 // indirect - github.com/prometheus/common v0.54.0 // indirect - github.com/prometheus/procfs v0.14.0 // indirect - github.com/rivo/uniseg v0.4.7 // indirect - github.com/russross/blackfriday/v2 v2.1.0 // indirect - github.com/shopspring/decimal v1.4.0 // indirect - github.com/unknwon/bra v0.0.0-20200517080246-1e3013ecaff8 // indirect - github.com/unknwon/com v1.0.1 // indirect - github.com/unknwon/log v0.0.0-20200308114134-929b1006e34a // indirect - github.com/urfave/cli v1.22.15 // indirect - github.com/zeebo/xxh3 v1.0.2 // indirect - go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 // indirect - go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.51.0 // indirect - go.opentelemetry.io/contrib/propagators/jaeger v1.26.0 // indirect - go.opentelemetry.io/contrib/samplers/jaegerremote v0.20.0 // indirect - go.opentelemetry.io/otel v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 // indirect - go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 // indirect - go.opentelemetry.io/otel/metric v1.26.0 // indirect - go.opentelemetry.io/otel/sdk v1.26.0 // indirect - go.opentelemetry.io/otel/trace v1.26.0 // indirect - go.opentelemetry.io/proto/otlp v1.2.0 // indirect - golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect - golang.org/x/mod v0.18.0 // indirect - golang.org/x/net v0.26.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/text v0.16.0 // indirect - golang.org/x/tools v0.22.0 // indirect - golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 // indirect - gonum.org/v1/gonum v0.14.0 // indirect - google.golang.org/genproto/googleapis/api v0.0.0-20240415180920-8c6c420018be // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be // indirect - google.golang.org/grpc v1.64.0 // indirect - google.golang.org/protobuf v1.34.0 // indirect - gopkg.in/fsnotify/fsnotify.v1 v1.4.7 // indirect - gopkg.in/yaml.v3 v3.0.1 // indirect -) - -replace github.com/basgys/goxml2json => github.com/yesoreyeram/goxml2json v0.0.0-20181031222924-996d9fc8d313 diff --git a/lib/go/anyframer/go.sum b/lib/go/anyframer/go.sum deleted file mode 100644 index 1ff2a9b..0000000 --- a/lib/go/anyframer/go.sum +++ /dev/null @@ -1,281 +0,0 @@ -github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= -github.com/BurntSushi/toml v1.3.2 h1:o7IhLm0Msx3BaB+n3Ag7L8EVlByGnpq14C4YWiu/gL8= -github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ= -github.com/apache/arrow/go/v15 v15.0.2 h1:60IliRbiyTWCWjERBCkO1W4Qun9svcYoZrSLcyOsMLE= -github.com/apache/arrow/go/v15 v15.0.2/go.mod h1:DGXsR3ajT524njufqf95822i+KTh+yea1jass9YXgjA= -github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= -github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= -github.com/bitly/go-simplejson v0.5.1 h1:xgwPbetQScXt1gh9BmoJ6j9JMr3TElvuIyjR8pgdoow= -github.com/bitly/go-simplejson v0.5.1/go.mod h1:YOPVLzCfwK14b4Sff3oP1AmGhI9T9Vsg84etUnlyp+Q= -github.com/bufbuild/protocompile v0.4.0 h1:LbFKd2XowZvQ/kajzguUp2DC9UEIQhIq77fZZlaQsNA= -github.com/bufbuild/protocompile v0.4.0/go.mod h1:3v93+mbWn/v3xzN+31nwkJfrEpAUwp+BagBSZWx+TP8= -github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8= -github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= -github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= -github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cheekybits/genny v1.0.0 h1:uGGa4nei+j20rOSeDeP5Of12XVm7TGUd4dJA9RDitfE= -github.com/cheekybits/genny v1.0.0/go.mod h1:+tQajlRqAUrPI7DOSpB0XAqZYtQakVtB7wXkRAgjxjQ= -github.com/chromedp/cdproto v0.0.0-20231114014204-3e458d5176f9 h1:e3tMnG8i9SfKOilykpprojNk3a49O4dn+wqZsam1qYQ= -github.com/chromedp/cdproto v0.0.0-20231114014204-3e458d5176f9/go.mod h1:GKljq0VrfU4D5yc+2qA6OVr8pmO/MBbPEWqWQ/oqGEs= -github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4= -github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= -github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5 h1:m62nsMU279qRD9PQSWD1l66kmkXzuYcnVJqL4XLeV2M= -github.com/elazarl/goproxy v0.0.0-20231117061959-7cc037d33fb5/go.mod h1:Ro8st/ElPeALwNFlcTpWmkr6IoMFfkjXAvTHpevnDsM= -github.com/elazarl/goproxy/ext v0.0.0-20190711103511-473e67f1d7d2/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= -github.com/elazarl/goproxy/ext v0.0.0-20220115173737-adb46da277ac h1:9yrT5tmn9Zc0ytWPASlaPwQfQMQYnRf0RSDe1XvHw0Q= -github.com/elazarl/goproxy/ext v0.0.0-20220115173737-adb46da277ac/go.mod h1:gNh8nYJoAm43RfaxurUnxr+N1PwuFV3ZMl/efxlIlY8= -github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM= -github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE= -github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg= -github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= -github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= -github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4= -github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= -github.com/getkin/kin-openapi v0.124.0 h1:VSFNMB9C9rTKBnQ/fpyDU8ytMTr4dWI9QovSKj9kz/M= -github.com/getkin/kin-openapi v0.124.0/go.mod h1:wb1aSZA/iWmorQP9KTAS/phLj/t17B5jT7+fS8ed9NM= -github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A= -github.com/go-logr/logr v1.4.1 h1:pKouT5E8xu9zeFC39JXRDukb6JFQPXM5p5I91188VAQ= -github.com/go-logr/logr v1.4.1/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-openapi/jsonpointer v0.20.2 h1:mQc3nmndL8ZBzStEo3JYF8wzmeWffDH4VbXz58sAx6Q= -github.com/go-openapi/jsonpointer v0.20.2/go.mod h1:bHen+N0u1KEO3YlmqOjTT9Adn1RfD91Ar825/PuiRVs= -github.com/go-openapi/swag v0.22.8 h1:/9RjDSQ0vbFR+NyjGMkFTsA1IA0fmhKSThmfGZjicbw= -github.com/go-openapi/swag v0.22.8/go.mod h1:6QT22icPLEqAM/z/TChgb4WAveCHF92+2gF0CNjHpPI= -github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM= -github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE= -github.com/goccy/go-json v0.10.3 h1:KZ5WoDbxAIgm2HNbYckL0se1fHD6rz5j4ywS6ebzDqA= -github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= -github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= -github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= -github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= -github.com/google/flatbuffers v24.3.25+incompatible h1:CX395cjN9Kke9mmalRoL3d81AtFUxJM+yDthflgJGkI= -github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= -github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= -github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= -github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e h1:JKmoR8x90Iww1ks85zJ1lfDGgIiMDuIptTOhJq+zKyg= -github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= -github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= -github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= -github.com/grafana/grafana-plugin-sdk-go v0.236.0 h1:SmBO0KuAwbKwp68sVrrMnpWhqkDRsFmyChhTfYsBFHU= -github.com/grafana/otel-profiling-go v0.5.1 h1:stVPKAFZSa7eGiqbYuG25VcqYksR6iWvF3YH66t4qL8= -github.com/grafana/pyroscope-go/godeltaprof v0.1.7 h1:C11j63y7gymiW8VugJ9ZW0pWfxTZugdSJyC48olk5KY= -github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1 h1:qnpSQwGEnkcRpTqNOIR6bJbR0gAorgP9CSALpRcKoAA= -github.com/grpc-ecosystem/go-grpc-middleware/providers/prometheus v1.0.1/go.mod h1:lXGCsh6c22WGtjr+qGHj1otzZpV/1kwTMAqkwZsnWRU= -github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0 h1:pRhl55Yx1eC7BZ1N+BBWwnKaMyD8uC+34TLdndZMAKk= -github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0/go.mod h1:XKMd7iuf/RGPSMJ/U4HP0zS2Z9Fh8Ps9a+6X26m/tmI= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1 h1:/c3QmbOGMGTOumP2iT/rCwB7b0QDGLKzqOmktBjT+Is= -github.com/grpc-ecosystem/grpc-gateway/v2 v2.19.1/go.mod h1:5SN9VR2LTsRFsrEC6FHgRbTWrTHu6tqPeKxEQv15giM= -github.com/hashicorp/go-hclog v1.6.3 h1:Qr2kF+eVWjTiYmU7Y31tYlP1h0q/X3Nl3tPGdaB11/k= -github.com/hashicorp/go-hclog v1.6.3/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= -github.com/hashicorp/go-plugin v1.6.1 h1:P7MR2UP6gNKGPp+y7EZw2kOiq4IR9WiqLvp0XOsVdwI= -github.com/hashicorp/go-plugin v1.6.1/go.mod h1:XPHFku2tFo3o3QKFgSYo+cghcUhw1NA1hZyMK0PWAw0= -github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= -github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= -github.com/invopop/yaml v0.2.0 h1:7zky/qH+O0DwAyoobXUqvVBwgBFRxKoQ/3FjcVpjTMY= -github.com/invopop/yaml v0.2.0/go.mod h1:2XuRLgs/ouIrW3XNzuNj7J3Nvu/Dig5MXvbCEdiBN3Q= -github.com/jhump/protoreflect v1.15.1 h1:HUMERORf3I3ZdX05WaQ6MIpd/NJ434hTp5YiKgfCL6c= -github.com/jhump/protoreflect v1.15.1/go.mod h1:jD/2GMKKE6OqX8qTjhADU1e6DShO+gavG9e0Q693nKo= -github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM= -github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo= -github.com/jtolds/gls v4.2.1+incompatible h1:fSuqC+Gmlu6l/ZYAoZzx2pyucC8Xza35fpRVWLVmUEE= -github.com/jtolds/gls v4.2.1+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= -github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= -github.com/klauspost/compress v1.17.3/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM= -github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= -github.com/klauspost/cpuid/v2 v2.2.8 h1:+StwCXwm9PdpiEkPyzBXIy+M9KUb4ODm0Zarf1kS5BM= -github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= -github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= -github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= -github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/magefile/mage v1.15.0 h1:BvGheCMAsG3bWUDbZ8AyXXpCNwU9u5CB6sM+HNb9HYg= -github.com/magefile/mage v1.15.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/mattetti/filebuffer v1.0.1 h1:gG7pyfnSIZCxdoKq+cPa8T0hhYtD9NxCdI4D7PTjRLM= -github.com/mattetti/filebuffer v1.0.1/go.mod h1:YdMURNDOttIiruleeVr6f56OrMc+MydEnTcXwtkxNVs= -github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= -github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= -github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= -github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= -github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= -github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY= -github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= -github.com/mattn/go-runewidth v0.0.15 h1:UNAjwbU9l54TA3KzvqLGxwWjHmMgBUVhBiTjelZgg3U= -github.com/mattn/go-runewidth v0.0.15/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= -github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= -github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= -github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= -github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= -github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= -github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M= -github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= -github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826 h1:RWengNIwukTxcDr9M+97sNutRR1RKhG96O6jWumTTnw= -github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8= -github.com/ncruces/go-strftime v0.1.9 h1:bY0MQC28UADQmHmaF5dgpLmImcShSi2kHU9XLdhx/f4= -github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= -github.com/oklog/run v1.1.0/go.mod h1:sVPdnTZT1zYwAJeCMu2Th4T21pA3FPOQRfWjQlk7DVU= -github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= -github.com/olekukonko/tablewriter v0.0.5/go.mod h1:hPp6KlRPjbx+hW8ykQs1w3UBbZlj6HuIJcUGPhkA7kY= -github.com/perimeterx/marshmallow v1.1.5 h1:a2LALqQ1BlHM8PZblsDdidgv1mWi1DgC2UmX50IvK2s= -github.com/perimeterx/marshmallow v1.1.5/go.mod h1:dsXbUu8CRzfYP5a87xpp0xq9S3u0Vchtcl8we9tYaXw= -github.com/pierrec/lz4/v4 v4.1.21 h1:yOVMLb6qSIDP67pl/5F7RepeKYu/VmTyEXvuMI5d9mQ= -github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= -github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/prometheus/client_golang v1.19.1 h1:wZWJDwK+NameRJuPGDhlnFgx8e8HN3XHQeLaYJFJBOE= -github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E= -github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY= -github.com/prometheus/common v0.54.0 h1:ZlZy0BgJhTwVZUn7dLOkwCZHUkrAqd3WYtcFCWnM1D8= -github.com/prometheus/procfs v0.14.0 h1:Lw4VdGGoKEZilJsayHf0B+9YgLGREba2C6xr+Fdfq6s= -github.com/prometheus/procfs v0.14.0/go.mod h1:XL+Iwz8k8ZabyZfMFHPiilCniixqQarAy5Mu67pHlNQ= -github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ= -github.com/rogpeppe/go-charset v0.0.0-20180617210344-2471d30d28b4/go.mod h1:qgYeAmZ5ZIpBWTGllZSQnw97Dj+woV0toclVaRGI8pc= -github.com/rogpeppe/go-internal v1.12.0 h1:exVL4IDcn6na9z1rAb56Vxr+CgyK3nn3O+epU5NdKM8= -github.com/rogpeppe/go-internal v1.12.0/go.mod h1:E+RYuTGaKKdloAfM02xzb0FW3Paa99yedzYV+kq4uf4= -github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= -github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= -github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= -github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304 h1:Jpy1PXuP99tXNrhbq2BaPz9B+jNAvH1JPQQpG/9GCXY= -github.com/smartystreets/assertions v0.0.0-20190116191733-b6c0e53d7304/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= -github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c h1:Ho+uVpkel/udgjbwB5Lktg9BtvJSh2DT0Hi6LPSyI2w= -github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c/go.mod h1:XDJAKZRPZ1CvBcN2aX5YOUTYGHki24fSF0Iv48Ibg0s= -github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= -github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= -github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= -github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= -github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= -github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= -github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= -github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -github.com/ugorji/go/codec v1.2.7 h1:YPXUKf7fYbp/y8xloBqZOw2qaVggbfwMlI8WM3wZUJ0= -github.com/ugorji/go/codec v1.2.7/go.mod h1:WGN1fab3R1fzQlVQTkfxVtIBhWDRqOviHU95kRgeqEY= -github.com/unknwon/bra v0.0.0-20200517080246-1e3013ecaff8 h1:aVGB3YnaS/JNfOW3tiHIlmNmTDg618va+eT0mVomgyI= -github.com/unknwon/bra v0.0.0-20200517080246-1e3013ecaff8/go.mod h1:fVle4kNr08ydeohzYafr20oZzbAkhQT39gKK/pFQ5M4= -github.com/unknwon/com v1.0.1 h1:3d1LTxD+Lnf3soQiD4Cp/0BRB+Rsa/+RTvz8GMMzIXs= -github.com/unknwon/com v1.0.1/go.mod h1:tOOxU81rwgoCLoOVVPHb6T/wt8HZygqH5id+GNnlCXM= -github.com/unknwon/log v0.0.0-20150304194804-e617c87089d3/go.mod h1:1xEUf2abjfP92w2GZTV+GgaRxXErwRXcClbUwrNJffU= -github.com/unknwon/log v0.0.0-20200308114134-929b1006e34a h1:vcrhXnj9g9PIE+cmZgaPSwOyJ8MAQTRmsgGrB0x5rF4= -github.com/unknwon/log v0.0.0-20200308114134-929b1006e34a/go.mod h1:1xEUf2abjfP92w2GZTV+GgaRxXErwRXcClbUwrNJffU= -github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= -github.com/urfave/cli v1.22.15 h1:nuqt+pdC/KqswQKhETJjo7pvn/k4xMUxgW6liI7XpnM= -github.com/urfave/cli v1.22.15/go.mod h1:wSan1hmo5zeyLGBjRJbzRTNk8gwoYa2B9n4q9dmRIc0= -github.com/xiatechs/jsonata-go v1.8.7 h1:3EYi1x16FSDsq82okupP69UuKrvCm9xrNGrW/OSyHC8= -github.com/yesoreyeram/goxml2json v0.0.0-20181031222924-996d9fc8d313 h1:vp9ffMzYUIikfYTcyFd1C8uxHroLHKFrZBPy02fNwOU= -github.com/yesoreyeram/goxml2json v0.0.0-20181031222924-996d9fc8d313/go.mod h1:2wBri9DNpmznBip4s1sqf5SdolEXkGbdaZN6hl4eino= -github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= -github.com/zeebo/assert v1.3.0 h1:g7C04CbJuIDKNPFHmsk4hwZDO5O+kntRxzaUoNXj+IQ= -github.com/zeebo/assert v1.3.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0= -github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0= -github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 h1:A3SayB3rNyt+1S6qpI9mHPkeHTZbD7XILEqWnYZb2l0= -go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0/go.mod h1:27iA5uvhuRNmalO+iEUdVn5ZMj2qy10Mm+XRIpRmyuU= -go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.51.0 h1:974XTyIwHI4nHa1+uSLxHtUnlJ2DiVtAJjk7fd07p/8= -go.opentelemetry.io/contrib/instrumentation/net/http/httptrace/otelhttptrace v0.51.0/go.mod h1:ZvX/taFlN6TGaOOM6D42wrNwPKUV1nGO2FuUXkityBU= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 h1:Xs2Ncz0gNihqu9iosIZ5SkBbWo5T8JhhLJFMQL1qmLI= -go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0/go.mod h1:vy+2G/6NvVMpwGX/NyLqcC41fxepnuKHk16E6IZUcJc= -go.opentelemetry.io/contrib/propagators/jaeger v1.26.0 h1:RH76Cl2pfOLLoCtxAPax9c7oYzuL1tiI7/ZPJEmEmOw= -go.opentelemetry.io/contrib/propagators/jaeger v1.26.0/go.mod h1:W/cylm0ZtJK1uxsuTqoYGYPnqpZ8CeVGgW7TwfXPsGw= -go.opentelemetry.io/contrib/samplers/jaegerremote v0.20.0 h1:ja+d7Aea/9PgGxB63+E0jtRFpma717wubS0KFkZpmYw= -go.opentelemetry.io/contrib/samplers/jaegerremote v0.20.0/go.mod h1:Yc1eg51SJy7xZdOTyg1xyFcwE+ghcWh3/0hKeLo6Wlo= -go.opentelemetry.io/otel v1.26.0 h1:LQwgL5s/1W7YiiRwxf03QGnWLb2HW4pLiAhaA5cZXBs= -go.opentelemetry.io/otel v1.26.0/go.mod h1:UmLkJHUAidDval2EICqBMbnAd0/m2vmpf/dAM+fvFs4= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0 h1:1u/AyyOqAWzy+SkPxDpahCNZParHV8Vid1RnI2clyDE= -go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.26.0/go.mod h1:z46paqbJ9l7c9fIPCXTqTGwhQZ5XoTIsfeFYWboizjs= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0 h1:Waw9Wfpo/IXzOI8bCB7DIk+0JZcqqsyn1JFnAc+iam8= -go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.26.0/go.mod h1:wnJIG4fOqyynOnnQF/eQb4/16VlX2EJAHhHgqIqWfAo= -go.opentelemetry.io/otel/metric v1.26.0 h1:7S39CLuY5Jgg9CrnA9HHiEjGMF/X2VHvoXGgSllRz30= -go.opentelemetry.io/otel/metric v1.26.0/go.mod h1:SY+rHOI4cEawI9a7N1A4nIg/nTQXe1ccCNWYOJUrpX4= -go.opentelemetry.io/otel/sdk v1.26.0 h1:Y7bumHf5tAiDlRYFmGqetNcLaVUZmh4iYfmGxtmz7F8= -go.opentelemetry.io/otel/sdk v1.26.0/go.mod h1:0p8MXpqLeJ0pzcszQQN4F0S5FVjBLgypeGSngLsmirs= -go.opentelemetry.io/otel/trace v1.26.0 h1:1ieeAUb4y0TE26jUFrCIXKpTuVK7uJGN9/Z/2LP5sQA= -go.opentelemetry.io/otel/trace v1.26.0/go.mod h1:4iDxvGDQuUkHve82hJJ8UqrwswHYsZuWCBllGV2U2y0= -go.opentelemetry.io/proto/otlp v1.2.0 h1:pVeZGk7nXDC9O2hncA6nHldxEjm6LByfA2aN8IOkz94= -go.opentelemetry.io/proto/otlp v1.2.0/go.mod h1:gGpR8txAl5M03pDhMC79G6SdqNV26naRm/KDsgaHD8A= -go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= -go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 h1:yixxcjnhBmY0nkL253HFVIm0JsFHwrHdT3Yh6szTnfY= -golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191020152052-9984515f0562/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= -golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= -golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= -golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028 h1:+cNy6SZtPcJQH3LJVLOSmiC7MMxXNOb3PU/VUEz+EhU= -golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6fsCIbMTohpP40sJ/P/vI1MoTEGwX90= -gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0= -gonum.org/v1/gonum v0.14.0/go.mod h1:AoWeoz0becf9QMWtE8iWXNXc27fK4fNeHNf/oMejGfU= -google.golang.org/genproto/googleapis/api v0.0.0-20240415180920-8c6c420018be h1:Zz7rLWqp0ApfsR/l7+zSHhY3PMiH2xqgxlfYfAfNpoU= -google.golang.org/genproto/googleapis/api v0.0.0-20240415180920-8c6c420018be/go.mod h1:dvdCTIoAGbkWbcIKBniID56/7XHTt6WfxXNMxuziJ+w= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be h1:LG9vZxsWGOmUKieR8wPAUR3u3MpnYFQZROPIMaXh7/A= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= -google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY= -google.golang.org/protobuf v1.34.0 h1:Qo/qEd2RZPCf2nKuorzksSknv0d3ERwp1vFG38gSmH4= -gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk= -gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q= -gopkg.in/fsnotify/fsnotify.v1 v1.4.7 h1:XNNYLJHt73EyYiCZi6+xjupS9CpvmiDgjPTAjrBlQbo= -gopkg.in/fsnotify/fsnotify.v1 v1.4.7/go.mod h1:Fyux9zXlo4rWoMSIzpn9fDAYjalPqJ/K1qJ27s+7ltE= -gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= -gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= -gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= -gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= -gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/lib/go/anyframer/input_type.go b/lib/go/anyframer/input_type.go deleted file mode 100644 index 915bdac..0000000 --- a/lib/go/anyframer/input_type.go +++ /dev/null @@ -1,109 +0,0 @@ -package anyframer - -import ( - "net/http" - "net/url" - "strings" -) - -// InputType ... -type InputType string - -const ( - // InputTypeUnknown ... - InputTypeUnknown InputType = "unknown" - // InputTypeJSON ... - InputTypeJSON InputType = "json" - // InputTypeCSV ... - InputTypeCSV InputType = "csv" - // InputTypeTSV ... - InputTypeTSV InputType = "tsv" - // InputTypeHTML ... - InputTypeHTML InputType = "html" - // InputTypeXML ... - InputTypeXML InputType = "xml" -) - -// GuessType guesses the framer type from input string and other framer parameters such as RawURL, headers -func (options *AnyFramer) GuessType(input string) InputType { - o := options.InputType - if o == "" || o == InputTypeUnknown { - o = guessInputTypeFromURL(options.RawURL) - if o == InputTypeUnknown && len(options.Headers) > 0 { - o = guessInputTypeFromResponseHeaders(options.Headers) - } - if o == InputTypeUnknown && input != "" { - o = guessInputTypeFromInput(input) - } - } - return o -} - -func guessInputTypeFromURL(rawURL string) InputType { - rawURL = strings.ToLower(rawURL) - if u, err := url.Parse(rawURL); err == nil { - rawURL = strings.ToLower(u.Path) - } - return guessInputTypeFromFileName(rawURL) -} - -func guessInputTypeFromFileName(fileName string) InputType { - fileName = strings.ToLower(fileName) - if strings.HasSuffix(fileName, ".json") { - return InputTypeJSON - } - if strings.HasSuffix(fileName, ".csv") { - return InputTypeCSV - } - if strings.HasSuffix(fileName, ".tsv") { - return InputTypeTSV - } - if strings.HasSuffix(fileName, ".xml") { - return InputTypeXML - } - if strings.HasSuffix(fileName, ".html") { - return InputTypeHTML - } - return InputTypeUnknown -} - -func guessInputTypeFromResponseHeaders(headers http.Header) InputType { - contentType := strings.ToLower(headers.Get("Content-Type")) - if strings.HasPrefix(contentType, "application/json") { - return InputTypeJSON - } - if strings.HasPrefix(contentType, "text/csv") { - return InputTypeCSV - } - if strings.HasPrefix(contentType, "text/tab-separated-values") { - return InputTypeTSV - } - if strings.HasPrefix(contentType, "application/xml") || strings.HasPrefix(contentType, "text/xml") { - return InputTypeXML - } - return InputTypeUnknown -} - -func guessInputTypeFromInput(input string) InputType { - input = strings.TrimSpace(strings.ToLower(input)) - if strings.HasPrefix(input, "{") && strings.HasSuffix(input, "}") { - return InputTypeJSON - } - if strings.HasPrefix(input, "[") && strings.HasSuffix(input, "]") { - return InputTypeJSON - } - if (strings.HasPrefix(input, "") { - return InputTypeHTML - } - if strings.HasPrefix(input, "<") && strings.HasSuffix(input, ">") { - return InputTypeXML - } - csvArray := strings.Split(input, "\n") - if len(csvArray) > 1 && strings.Contains(csvArray[0], "\t") { - return InputTypeTSV - } - if len(csvArray) > 1 && strings.Contains(csvArray[0], ",") { - return InputTypeCSV - } - return InputTypeUnknown -} diff --git a/lib/go/anyframer/input_type_test.go b/lib/go/anyframer/input_type_test.go deleted file mode 100644 index 7ec8698..0000000 --- a/lib/go/anyframer/input_type_test.go +++ /dev/null @@ -1,56 +0,0 @@ -package anyframer_test - -import ( - "net/http" - "testing" - - "github.com/grafana/infinity-libs/lib/go/anyframer" - "github.com/stretchr/testify/require" -) - -func TestGuessType(t *testing.T) { - tests := []struct { - name string - rawURL string - headers http.Header - input string - want anyframer.InputType - }{ - {}, - {rawURL: "https://foo"}, - {rawURL: "https://foo.com"}, - {rawURL: "https://foo.com/bar"}, - {rawURL: "https://foo.com/bar.json", want: anyframer.InputTypeJSON}, - {rawURL: "https://foo.com/bar.json?something=nothing", want: anyframer.InputTypeJSON}, - {rawURL: "foo.yaml"}, - {rawURL: "foo.json", want: anyframer.InputTypeJSON}, - {rawURL: "foo/bar.csv", want: anyframer.InputTypeCSV}, - {rawURL: "https://foo.com/bar", headers: http.Header{}}, - {rawURL: "https://foo.com/bar", headers: map[string][]string{"something": {"nothing"}}}, - {rawURL: "https://foo.com/bar", headers: map[string][]string{"Content-Type": {"nothing"}}}, - {rawURL: "https://foo.com/bar", headers: map[string][]string{"Content-Type": {"application/json"}}, want: anyframer.InputTypeJSON}, - {rawURL: "https://foo.com/bar", input: "hello"}, - {rawURL: "https://foo.com/bar", input: " { \"foo\" : 123 } ", want: anyframer.InputTypeJSON}, - {rawURL: "https://foo.com/bar", input: " [1,2,3] ", want: anyframer.InputTypeJSON}, - {rawURL: "https://foo.com/bar", input: "a b c\n1 2 3", want: anyframer.InputTypeTSV}, - {rawURL: "https://foo.com/bar", input: "a,b,c\n1,2,3", want: anyframer.InputTypeCSV}, - {rawURL: "https://foo.com/bar", input: "", want: anyframer.InputTypeHTML}, - {rawURL: "https://foo.com/bar", input: "", want: anyframer.InputTypeHTML}, - {rawURL: "https://foo.com/bar", input: "", want: anyframer.InputTypeHTML}, - {rawURL: "https://foo.com/bar", input: "", want: anyframer.InputTypeXML}, - {rawURL: "https://foo.com/bar", input: "", want: anyframer.InputTypeXML}, - {rawURL: "https://foo.com/bar", input: "", want: anyframer.InputTypeXML}, - {rawURL: "https://foo.com/bar", input: "", want: anyframer.InputTypeXML}, - } - for _, tt := range tests { - want := tt.want - if want == "" { - want = anyframer.InputTypeUnknown - } - t.Run(tt.name, func(t *testing.T) { - framer := anyframer.AnyFramer{RawURL: tt.rawURL, Headers: tt.headers} - got := framer.GuessType(tt.input) - require.Equal(t, want, got) - }) - } -} diff --git a/lib/go/anyframer/package.json b/lib/go/anyframer/package.json deleted file mode 100644 index 56bdee4..0000000 --- a/lib/go/anyframer/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "@grafana/infinity-anyframer", - "private": true, - "version": "1.0.0", - "scripts": { - "tidy": "go mod tidy", - "test:backend": "go test -v ./..." - } -} diff --git a/lib/go/anyframer/root_selector_test.go b/lib/go/anyframer/root_selector_test.go deleted file mode 100644 index 2eaecb3..0000000 --- a/lib/go/anyframer/root_selector_test.go +++ /dev/null @@ -1,22 +0,0 @@ -package anyframer_test - -import ( - "errors" - "testing" -) - -func TestRootSelector(t *testing.T) { - t.Run("invalid selector", testToFrame(testInputs{ - input: `{ "users" : [{"name":"foo","salary": 123, "self_employed":false},{"name":"bar","salary": 456.789, "self_employed":true}] }`, - framer: Framer{RootSelector: "userslist"}, - wantErr: errors.New("error applying root selector"), - })) - t.Run("array selector with value", testToFrame(testInputs{ - input: `{ "users" : [{"name":"foo","salary": 123, "self_employed":false},{"name":"bar","salary": 456.789, "self_employed":true}] }`, - framer: Framer{RootSelector: "users"}, - })) - t.Run("array selector without value", testToFrame(testInputs{ - input: `{ "users" : [] }`, - framer: Framer{RootSelector: "users"}, - })) -} diff --git a/lib/go/anyframer/selector.go b/lib/go/anyframer/selector.go deleted file mode 100644 index 4efb3fc..0000000 --- a/lib/go/anyframer/selector.go +++ /dev/null @@ -1,22 +0,0 @@ -package anyframer - -import ( - "errors" - - jsonata "github.com/xiatechs/jsonata-go" -) - -func applySelector(input any, selector string) (output any, err error) { - if input == nil { - return nil, errors.New("invalid/empty data") - } - if selector == "" { - return input, nil - } - e := jsonata.MustCompile(selector) - res, err := e.Eval(input) - if err != nil { - return nil, errors.New("error applying root selector") - } - return res, nil -} diff --git a/lib/go/anyframer/sliceframer.go b/lib/go/anyframer/sliceframer.go deleted file mode 100644 index 8648312..0000000 --- a/lib/go/anyframer/sliceframer.go +++ /dev/null @@ -1,239 +0,0 @@ -package anyframer - -import ( - "encoding/json" - "fmt" - "strconv" - "strings" - "time" - - "github.com/grafana/grafana-plugin-sdk-go/data" -) - -func SliceToFrame(name string, input []any, columns []Column) (frame *data.Frame, err error) { - frame = data.NewFrame(name) - if len(input) < 1 { - return frame, err - } - if len(columns) > 0 { - for _, column := range columns { - if column.Selector == "" { - continue - } - fieldName := column.Alias - if fieldName == "" { - fieldName = column.Selector - } - switch column.Format { - case ColumnFormatString: - field := data.NewFieldFromFieldType(data.FieldTypeNullableString, len(input)) - field.Name = fieldName - for i := 0; i < len(input); i++ { - currentValue, err := applySelector(input[i], column.Selector) - if err != nil { - continue - } - switch cvt := currentValue.(type) { - case string: - field.Set(i, ToPointer(currentValue.(string))) - case float64, float32, int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64: - field.Set(i, ToPointer(fmt.Sprintf("%v", currentValue))) - case bool: - field.Set(i, ToPointer(fmt.Sprintf("%v", currentValue.(bool)))) - case time.Time: - field.Set(i, ToPointer(currentValue.(time.Time).String())) - default: - noop(cvt) - field.Set(i, nil) - } - } - frame.Fields = append(frame.Fields, field) - case ColumnFormatNumber: - field := data.NewFieldFromFieldType(data.FieldTypeNullableFloat64, len(input)) - field.Name = fieldName - for i := 0; i < len(input); i++ { - currentValue, err := applySelector(input[i], column.Selector) - if err != nil { - continue - } - switch cvt := currentValue.(type) { - case string: - if item, err := strconv.ParseFloat(currentValue.(string), 64); err == nil { - field.Set(i, ToPointer(item)) - } - case float64, float32, int, int8, int16, int32, int64, uint, uint8, uint16, uint32, uint64: - field.Set(i, ToPointer(getFieldValue(currentValue))) - default: - noop(cvt) - field.Set(i, nil) - } - } - frame.Fields = append(frame.Fields, field) - case ColumnFormatBoolean: - field := data.NewFieldFromFieldType(data.FieldTypeNullableBool, len(input)) - field.Name = fieldName - for i := 0; i < len(input); i++ { - currentValue, err := applySelector(input[i], column.Selector) - if err != nil { - continue - } - switch cvt := currentValue.(type) { - case bool: - field.Set(i, ToPointer(currentValue)) - case string: - switch strings.ToLower(strings.TrimSpace(currentValue.(string))) { - case "true": - field.Set(i, ToPointer(true)) - case "false": - field.Set(i, ToPointer(false)) - } - - default: - noop(cvt) - field.Set(i, nil) - } - } - frame.Fields = append(frame.Fields, field) - case ColumnFormatTimeStamp: - field := data.NewFieldFromFieldType(data.FieldTypeNullableTime, len(input)) - field.Name = fieldName - for i := 0; i < len(input); i++ { - currentValue, err := applySelector(input[i], column.Selector) - if err != nil { - continue - } - switch a := currentValue.(type) { - case float64: - if v := fmt.Sprintf("%v", currentValue); v != "" { - if t, err := time.Parse("2006", v); err == nil { - field.Set(i, ToPointer(t)) - } - } - case string: - if currentValue.(string) != "" { - field.Set(i, getTimeFromString(currentValue.(string), column.TimeFormat)) - } - default: - noop(a) - field.Set(i, nil) - } - } - frame.Fields = append(frame.Fields, field) - case ColumnFormatUnixMsecTimeStamp: - field := data.NewFieldFromFieldType(data.FieldTypeNullableTime, len(input)) - field.Name = fieldName - for i := 0; i < len(input); i++ { - currentValue, err := applySelector(input[i], column.Selector) - if err != nil { - continue - } - switch cvt := currentValue.(type) { - case string: - if item, err := strconv.ParseInt(currentValue.(string), 10, 64); err == nil && currentValue.(string) != "" { - field.Set(i, ToPointer(time.UnixMilli(item))) - } - case float64: - field.Set(i, ToPointer(time.UnixMilli(int64(currentValue.(float64))))) - default: - noop(cvt) - field.Set(i, nil) - } - } - frame.Fields = append(frame.Fields, field) - case ColumnFormatUnixSecTimeStamp: - field := data.NewFieldFromFieldType(data.FieldTypeNullableTime, len(input)) - field.Name = fieldName - for i := 0; i < len(input); i++ { - currentValue, err := applySelector(input[i], column.Selector) - if err != nil { - continue - } - switch cvt := currentValue.(type) { - case string: - if item, err := strconv.ParseInt(currentValue.(string), 10, 64); err == nil && currentValue.(string) != "" { - field.Set(i, ToPointer(time.Unix(item, 0))) - } - case float64: - field.Set(i, ToPointer(time.Unix(int64(currentValue.(float64)), 0))) - default: - noop(cvt) - field.Set(i, nil) - } - } - frame.Fields = append(frame.Fields, field) - } - } - return frame, nil - } - for _, item := range input { - if item != nil { - switch item.(type) { - case string, float64, float32, int64, int32, int16, int8, int, uint64, uint32, uint16, uint8, uint, bool, time.Time, *string, *float64, *float32, *int64, *int32, *int16, *int8, *int, *uint64, *uint32, *uint16, *uint8, *uint, *bool, *time.Time: - a, _ := getFieldTypeAndValue(item) - field := data.NewFieldFromFieldType(a, len(input)) - field.Name = name - for idx, i := range input { - field.Set(idx, ToPointer(i)) - } - frame.Fields = append(frame.Fields, field) - case []any: - field := data.NewFieldFromFieldType(data.FieldTypeNullableString, len(input)) - field.Name = name - for idx, i := range input { - if o, err := json.Marshal(i); err == nil { - field.Set(idx, ToPointer(string(o))) - } - } - frame.Fields = append(frame.Fields, field) - default: - results := map[string]map[int]any{} - for idx, id := range input { - if o, ok := id.(map[string]any); ok { - for k, v := range o { - if results[k] == nil { - results[k] = map[int]any{} - } - results[k][idx] = getFieldValue(v) - } - } - } - for _, k := range sortedKeys(results) { - if results[k] != nil { - o := []any{} - for i := 0; i < len(input); i++ { - o = append(o, results[k][i]) - } - fieldType := getFieldTypeFromSlice(o) - if fieldType == data.FieldTypeJSON { - field := data.NewFieldFromFieldType(data.FieldTypeNullableString, len(input)) - field.Name = k - for i := 0; i < len(input); i++ { - if o, err := json.Marshal(o[i]); err == nil { - field.Set(i, ToPointer(string(o))) - } - } - frame.Fields = append(frame.Fields, field) - } - if fieldType != data.FieldTypeJSON { - if len(columns) < 1 { - field := data.NewFieldFromFieldType(fieldType, len(input)) - field.Name = k - for i := 0; i < len(input); i++ { - field.Set(i, ToPointer(o[i])) - } - frame.Fields = append(frame.Fields, field) - } - } - } - } - } - break - } - } - if len(frame.Fields) == 0 { - field := data.NewFieldFromFieldType(data.FieldTypeNullableString, len(input)) - field.Name = name - frame.Fields = append(frame.Fields, field) - } - return frame, nil -} diff --git a/lib/go/anyframer/sliceframer_test.go b/lib/go/anyframer/sliceframer_test.go deleted file mode 100644 index 3149e5f..0000000 --- a/lib/go/anyframer/sliceframer_test.go +++ /dev/null @@ -1,83 +0,0 @@ -package anyframer_test - -import ( - "testing" - - "github.com/grafana/grafana-plugin-sdk-go/experimental" - af "github.com/grafana/infinity-libs/lib/go/anyframer" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestSliceToFrame(t *testing.T) { - tests := []struct { - name string - frameName string - input []any - columns []af.Column - wantErr error - }{ - { - name: "array of strings", - input: []any{"hello", "world"}, - }, - { - name: "array of numbers", - input: []any{float64(123.45), float64(6)}, - }, - { - name: "array of boolean", - input: []any{false, true}, - }, - { - name: "array of array", - input: []any{[]any{"hello", "world"}, []any{float64(123.45), float64(6)}}, - }, - { - name: "array of objects", - input: []any{ - map[string]any{"username": "foo", "age": 123, "hobbies": []string{"swimming"}, "salaried": true, "country": "uk"}, - map[string]any{"username": "bar", "age": 456.789, "hobbies": []string{"painting"}, "salaried": false, "city": "chennai"}, - }, - }, - { - name: "array of objects with columns", - input: []any{ - map[string]any{"username": "foo", "age": 123, "hobbies": []string{"swimming"}, "salaried": true, "country": "uk"}, - map[string]any{"username": "bar", "age": 456.789, "hobbies": []string{"painting"}, "salaried": false, "city": "chennai"}, - }, - columns: []af.Column{ - {Selector: "username", Format: af.ColumnFormatString, Alias: "User Name"}, - {Selector: "age", Format: af.ColumnFormatNumber}, - {Selector: "salaried", Format: af.ColumnFormatBoolean}, - }, - }, - { - name: "array of objects with columns and nested selector", - input: []any{ - map[string]any{"username": "foo", "age": 123, "hobbies": []string{"swimming"}, "salaried": true, "country": "uk", "address": map[string]any{"country": "uk", "postcode": 123}}, - map[string]any{"username": "bar", "age": 456.789, "hobbies": []string{"painting"}, "salaried": false, "city": "chennai", "address": map[string]any{"country": "india", "postcode": 567.890}}, - }, - columns: []af.Column{ - {Selector: "username", Format: af.ColumnFormatString, Alias: "User Name"}, - {Selector: "age", Format: af.ColumnFormatNumber}, - {Selector: "salaried", Format: af.ColumnFormatBoolean}, - {Selector: "address.postcode", Format: af.ColumnFormatNumber, Alias: "Post Code"}, - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - require.NotEmpty(t, tt.name) - gotFrame, err := af.SliceToFrame(t.Name(), tt.input, tt.columns) - if tt.wantErr != nil { - require.NotNil(t, err) - assert.Equal(t, tt.wantErr, err) - return - } - require.Nil(t, err) - require.NotNil(t, gotFrame) - experimental.CheckGoldenJSONFrame(t, "testdata/golden", t.Name(), gotFrame, updateGoldenFile) - }) - } -} diff --git a/lib/go/anyframer/structframer.go b/lib/go/anyframer/structframer.go deleted file mode 100644 index c7774ae..0000000 --- a/lib/go/anyframer/structframer.go +++ /dev/null @@ -1,54 +0,0 @@ -package anyframer - -import ( - "encoding/json" - "errors" - "fmt" - "time" - - "github.com/grafana/grafana-plugin-sdk-go/data" -) - -func StructToFrame(name string, input any) (frame *data.Frame, err error) { - frame = data.NewFrame(name) - if in, ok := input.(map[string]any); ok { - fields := map[string]*data.Field{} - for key, value := range in { - newKey := fmt.Sprintf("%v", key) - switch x := value.(type) { - case nil, string, float64, float32, int64, int32, int16, int8, int, uint64, uint32, uint16, uint8, uint, bool, time.Time: - a, b := getFieldTypeAndValue(value) - field := data.NewFieldFromFieldType(a, 1) - field.Name = newKey - field.Set(0, ToPointer(b)) - fields[newKey] = field - case *string, *float64, *float32, *int64, *int32, *int16, *int8, *int, *uint64, *uint32, *uint16, *uint8, *uint, *bool, *time.Time: - a, b := getFieldTypeAndValue(value) - field := data.NewFieldFromFieldType(a, 1) - field.Name = newKey - field.Set(0, ToPointer(b)) - fields[newKey] = field - default: - fieldType, b := getFieldTypeAndValue(value) - if fieldType == data.FieldTypeJSON { - fieldType = data.FieldTypeNullableString - } - field := data.NewFieldFromFieldType(fieldType, 1) - field.Name = newKey - if o, err := json.Marshal(b); err == nil { - field.Set(0, ToPointer(string(o))) - fields[newKey] = field - } - noop(x) - } - } - for _, key := range sortedKeys(in) { - if f, ok := fields[key]; ok && f != nil { - frame.Fields = append(frame.Fields, f) - } - } - return frame, err - } - err = errors.New("unable to construct frame") - return frame, err -} diff --git a/lib/go/anyframer/structframer_test.go b/lib/go/anyframer/structframer_test.go deleted file mode 100644 index d3a7f8d..0000000 --- a/lib/go/anyframer/structframer_test.go +++ /dev/null @@ -1,75 +0,0 @@ -package anyframer_test - -import ( - "errors" - "testing" - "time" - - "github.com/grafana/grafana-plugin-sdk-go/experimental" - af "github.com/grafana/infinity-libs/lib/go/anyframer" - "github.com/stretchr/testify/assert" - "github.com/stretchr/testify/require" -) - -func TestStructToFrame(t *testing.T) { - tests := []struct { - name string - frameName string - input any - wantErr error - }{ - { - name: "empty input object should throw error", - wantErr: errors.New("unable to construct frame"), - }, - { - name: "map of mixed objects should parse correctly", - input: map[string]any{ - "valid string": "foo", - "valid string pointer": af.ToPointer("foo"), - "valid int64": int64(123), - "valid int64 pointer": af.ToPointer(int64(123)), - "valid int32": int32(123), - "valid int32 pointer": af.ToPointer(int32(123)), - "valid int16": int16(123), - "valid int16 pointer": af.ToPointer(int16(123)), - "valid int8": int8(123), - "valid int8 pointer": af.ToPointer(int8(123)), - "valid int": int(123), - "valid int pointer": af.ToPointer(int(123)), - "valid uint64": uint64(123), - "valid uint64 pointer": af.ToPointer(uint64(123)), - "valid uint32": uint32(123), - "valid uint32 pointer": af.ToPointer(uint32(123)), - "valid uint16": uint16(123), - "valid uint16 pointer": af.ToPointer(uint16(123)), - "valid uint8": uint8(123), - "valid uint8 pointer": af.ToPointer(uint8(123)), - "valid uint": uint(123), - "valid uint pointer": af.ToPointer(uint(123)), - "valid float64": float64(123.456), - "valid float64 pointer": af.ToPointer(float64(123.456)), - "valid float32": float32(123.456), - "valid float32 pointer": af.ToPointer(float32(123.456)), - "valid bool": true, - "valid bool pointer": af.ToPointer(true), - "valid time": time.Unix(1, 0), - "valid time pointer": af.ToPointer(time.Unix(1, 0)), - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - require.NotEmpty(t, tt.name) - gotFrame, err := af.StructToFrame(t.Name(), tt.input) - if tt.wantErr != nil { - require.NotNil(t, err) - assert.Equal(t, tt.wantErr, err) - return - } - require.Nil(t, err) - require.NotNil(t, gotFrame) - experimental.CheckGoldenJSONFrame(t, "testdata/golden", t.Name(), gotFrame, updateGoldenFile) - }) - } -} diff --git a/lib/go/anyframer/testdata/all/users.csv b/lib/go/anyframer/testdata/all/users.csv deleted file mode 100644 index 19cd9e6..0000000 --- a/lib/go/anyframer/testdata/all/users.csv +++ /dev/null @@ -1,7 +0,0 @@ -name,age,country,occupation,salary -Leanne Graham,38,USA,Devops Engineer,3000 -Ervin Howell,27,USA,Software Engineer,2300 -Clementine Bauch,17,Canada,Student, -Patricia Lebsack,42,UK,Software Engineer,2800 -Leanne Bell,38,USA,Senior Software Engineer,4000 -Chelsey Dietrich,32,USA,Software Engineer,3500 \ No newline at end of file diff --git a/lib/go/anyframer/testdata/all/users.html b/lib/go/anyframer/testdata/all/users.html deleted file mode 100644 index 20f64dd..0000000 --- a/lib/go/anyframer/testdata/all/users.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - Users - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
nameagecountryoccupationsalary
Leanne Graham38USADevops Engineer3000
Ervin Howell27USASoftware Engineer2300
Clementine Bauch17CanadaStudent
Patricia Lebsack42UKSoftware Engineer2800
Leanne Bell38USASenior Software Engineer4000
Chelsey Dietrich32USASoftware Engineer3500
- - diff --git a/lib/go/anyframer/testdata/all/users.json b/lib/go/anyframer/testdata/all/users.json deleted file mode 100644 index 91c5e54..0000000 --- a/lib/go/anyframer/testdata/all/users.json +++ /dev/null @@ -1,44 +0,0 @@ -[ - { - "name": "Leanne Graham", - "age": 38, - "country": "USA", - "occupation": "Devops Engineer", - "salary": 3000 - }, - { - "name": "Ervin Howell", - "age": 27, - "country": "USA", - "occupation": "Software Engineer", - "salary": 2300 - }, - { - "name": "Clementine Bauch", - "age": 17, - "country": "Canada", - "occupation": "Student", - "salary": null - }, - { - "name": "Patricia Lebsack", - "age": 42, - "country": "UK", - "occupation": "Software Engineer", - "salary": 2800 - }, - { - "name": "Leanne Bell", - "age": 38, - "country": "USA", - "occupation": "Senior Software Engineer", - "salary": 4000 - }, - { - "name": "Chelsey Dietrich", - "age": 32, - "country": "USA", - "occupation": "Software Engineer", - "salary": 3500 - } -] diff --git a/lib/go/anyframer/testdata/all/users.tsv b/lib/go/anyframer/testdata/all/users.tsv deleted file mode 100644 index b55ba9e..0000000 --- a/lib/go/anyframer/testdata/all/users.tsv +++ /dev/null @@ -1,7 +0,0 @@ -name age country occupation salary -Leanne Graham 38 USA Devops Engineer 3000 -Ervin Howell 27 USA Software Engineer 2300 -Clementine Bauch 17 Canada Student -Patricia Lebsack 42 UK Software Engineer 2800 -Leanne Bell 38 USA Senior Software Engineer 4000 -Chelsey Dietrich 32 USA Software Engineer 3500 \ No newline at end of file diff --git a/lib/go/anyframer/testdata/all/users.xml b/lib/go/anyframer/testdata/all/users.xml deleted file mode 100644 index b4255b9..0000000 --- a/lib/go/anyframer/testdata/all/users.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - Leanne Graham - 38 - USA - Devops Engineer - 3000 - - - Ervin Howell - 27 - USA - Software Engineer - 2300 - - - Clementine Bauch - 17 - Canada - Student - - - - Patricia Lebsack - 42 - UK - Software Engineer - 2800 - - - Leanne Bell - 38 - USA - Senior Software Engineer - 4000 - - - Chelsey Dietrich - 32 - USA - Software Engineer - 3500 - - diff --git a/lib/go/anyframer/testdata/golden/TestAnyFile/users_csv.jsonc b/lib/go/anyframer/testdata/golden/TestAnyFile/users_csv.jsonc deleted file mode 100644 index e94bffb..0000000 --- a/lib/go/anyframer/testdata/golden/TestAnyFile/users_csv.jsonc +++ /dev/null @@ -1,116 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 5 Fields by 6 Rows -// +-----------------+-----------------+------------------+--------------------------+-----------------+ -// | Name: age | Name: country | Name: name | Name: occupation | Name: salary | -// | Labels: | Labels: | Labels: | Labels: | Labels: | -// | Type: []*string | Type: []*string | Type: []*string | Type: []*string | Type: []*string | -// +-----------------+-----------------+------------------+--------------------------+-----------------+ -// | 38 | USA | Leanne Graham | Devops Engineer | 3000 | -// | 27 | USA | Ervin Howell | Software Engineer | 2300 | -// | 17 | Canada | Clementine Bauch | Student | | -// | 42 | UK | Patricia Lebsack | Software Engineer | 2800 | -// | 38 | USA | Leanne Bell | Senior Software Engineer | 4000 | -// | 32 | USA | Chelsey Dietrich | Software Engineer | 3500 | -// +-----------------+-----------------+------------------+--------------------------+-----------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "age", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "country", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "name", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "occupation", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "salary", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "38", - "27", - "17", - "42", - "38", - "32" - ], - [ - "USA", - "USA", - "Canada", - "UK", - "USA", - "USA" - ], - [ - "Leanne Graham", - "Ervin Howell", - "Clementine Bauch", - "Patricia Lebsack", - "Leanne Bell", - "Chelsey Dietrich" - ], - [ - "Devops Engineer", - "Software Engineer", - "Student", - "Software Engineer", - "Senior Software Engineer", - "Software Engineer" - ], - [ - "3000", - "2300", - "", - "2800", - "4000", - "3500" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestAnyFile/users_html.jsonc b/lib/go/anyframer/testdata/golden/TestAnyFile/users_html.jsonc deleted file mode 100644 index 76ce8ac..0000000 --- a/lib/go/anyframer/testdata/golden/TestAnyFile/users_html.jsonc +++ /dev/null @@ -1,52 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 1 Fields by 6 Rows -// +--------------------------------------------------------------------------------------------------------------------------+ -// | Name: td | -// | Labels: | -// | Type: []*string | -// +--------------------------------------------------------------------------------------------------------------------------+ -// | ["Leanne Graham",{"#content":"38","-align":"right"},"USA","Devops Engineer",{"#content":"3000","-align":"right"}] | -// | ["Ervin Howell",{"#content":"27","-align":"right"},"USA","Software Engineer",{"#content":"2300","-align":"right"}] | -// | ["Clementine Bauch",{"#content":"17","-align":"right"},"Canada","Student",{"-align":"right"}] | -// | ["Patricia Lebsack",{"#content":"42","-align":"right"},"UK","Software Engineer",{"#content":"2800","-align":"right"}] | -// | ["Leanne Bell",{"#content":"38","-align":"right"},"USA","Senior Software Engineer",{"#content":"4000","-align":"right"}] | -// | ["Chelsey Dietrich",{"#content":"32","-align":"right"},"USA","Software Engineer",{"#content":"3500","-align":"right"}] | -// +--------------------------------------------------------------------------------------------------------------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "td", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "[\"Leanne Graham\",{\"#content\":\"38\",\"-align\":\"right\"},\"USA\",\"Devops Engineer\",{\"#content\":\"3000\",\"-align\":\"right\"}]", - "[\"Ervin Howell\",{\"#content\":\"27\",\"-align\":\"right\"},\"USA\",\"Software Engineer\",{\"#content\":\"2300\",\"-align\":\"right\"}]", - "[\"Clementine Bauch\",{\"#content\":\"17\",\"-align\":\"right\"},\"Canada\",\"Student\",{\"-align\":\"right\"}]", - "[\"Patricia Lebsack\",{\"#content\":\"42\",\"-align\":\"right\"},\"UK\",\"Software Engineer\",{\"#content\":\"2800\",\"-align\":\"right\"}]", - "[\"Leanne Bell\",{\"#content\":\"38\",\"-align\":\"right\"},\"USA\",\"Senior Software Engineer\",{\"#content\":\"4000\",\"-align\":\"right\"}]", - "[\"Chelsey Dietrich\",{\"#content\":\"32\",\"-align\":\"right\"},\"USA\",\"Software Engineer\",{\"#content\":\"3500\",\"-align\":\"right\"}]" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestAnyFile/users_json.jsonc b/lib/go/anyframer/testdata/golden/TestAnyFile/users_json.jsonc deleted file mode 100644 index dd751c9..0000000 --- a/lib/go/anyframer/testdata/golden/TestAnyFile/users_json.jsonc +++ /dev/null @@ -1,116 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 5 Fields by 6 Rows -// +------------------+-----------------+------------------+--------------------------+------------------+ -// | Name: age | Name: country | Name: name | Name: occupation | Name: salary | -// | Labels: | Labels: | Labels: | Labels: | Labels: | -// | Type: []*float64 | Type: []*string | Type: []*string | Type: []*string | Type: []*float64 | -// +------------------+-----------------+------------------+--------------------------+------------------+ -// | 38 | USA | Leanne Graham | Devops Engineer | 3000 | -// | 27 | USA | Ervin Howell | Software Engineer | 2300 | -// | 17 | Canada | Clementine Bauch | Student | null | -// | 42 | UK | Patricia Lebsack | Software Engineer | 2800 | -// | 38 | USA | Leanne Bell | Senior Software Engineer | 4000 | -// | 32 | USA | Chelsey Dietrich | Software Engineer | 3500 | -// +------------------+-----------------+------------------+--------------------------+------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "age", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "country", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "name", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "occupation", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "salary", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - 38, - 27, - 17, - 42, - 38, - 32 - ], - [ - "USA", - "USA", - "Canada", - "UK", - "USA", - "USA" - ], - [ - "Leanne Graham", - "Ervin Howell", - "Clementine Bauch", - "Patricia Lebsack", - "Leanne Bell", - "Chelsey Dietrich" - ], - [ - "Devops Engineer", - "Software Engineer", - "Student", - "Software Engineer", - "Senior Software Engineer", - "Software Engineer" - ], - [ - 3000, - 2300, - null, - 2800, - 4000, - 3500 - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestAnyFile/users_tsv.jsonc b/lib/go/anyframer/testdata/golden/TestAnyFile/users_tsv.jsonc deleted file mode 100644 index e94bffb..0000000 --- a/lib/go/anyframer/testdata/golden/TestAnyFile/users_tsv.jsonc +++ /dev/null @@ -1,116 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 5 Fields by 6 Rows -// +-----------------+-----------------+------------------+--------------------------+-----------------+ -// | Name: age | Name: country | Name: name | Name: occupation | Name: salary | -// | Labels: | Labels: | Labels: | Labels: | Labels: | -// | Type: []*string | Type: []*string | Type: []*string | Type: []*string | Type: []*string | -// +-----------------+-----------------+------------------+--------------------------+-----------------+ -// | 38 | USA | Leanne Graham | Devops Engineer | 3000 | -// | 27 | USA | Ervin Howell | Software Engineer | 2300 | -// | 17 | Canada | Clementine Bauch | Student | | -// | 42 | UK | Patricia Lebsack | Software Engineer | 2800 | -// | 38 | USA | Leanne Bell | Senior Software Engineer | 4000 | -// | 32 | USA | Chelsey Dietrich | Software Engineer | 3500 | -// +-----------------+-----------------+------------------+--------------------------+-----------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "age", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "country", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "name", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "occupation", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "salary", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "38", - "27", - "17", - "42", - "38", - "32" - ], - [ - "USA", - "USA", - "Canada", - "UK", - "USA", - "USA" - ], - [ - "Leanne Graham", - "Ervin Howell", - "Clementine Bauch", - "Patricia Lebsack", - "Leanne Bell", - "Chelsey Dietrich" - ], - [ - "Devops Engineer", - "Software Engineer", - "Student", - "Software Engineer", - "Senior Software Engineer", - "Software Engineer" - ], - [ - "3000", - "2300", - "", - "2800", - "4000", - "3500" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestAnyFile/users_xml.jsonc b/lib/go/anyframer/testdata/golden/TestAnyFile/users_xml.jsonc deleted file mode 100644 index e94bffb..0000000 --- a/lib/go/anyframer/testdata/golden/TestAnyFile/users_xml.jsonc +++ /dev/null @@ -1,116 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 5 Fields by 6 Rows -// +-----------------+-----------------+------------------+--------------------------+-----------------+ -// | Name: age | Name: country | Name: name | Name: occupation | Name: salary | -// | Labels: | Labels: | Labels: | Labels: | Labels: | -// | Type: []*string | Type: []*string | Type: []*string | Type: []*string | Type: []*string | -// +-----------------+-----------------+------------------+--------------------------+-----------------+ -// | 38 | USA | Leanne Graham | Devops Engineer | 3000 | -// | 27 | USA | Ervin Howell | Software Engineer | 2300 | -// | 17 | Canada | Clementine Bauch | Student | | -// | 42 | UK | Patricia Lebsack | Software Engineer | 2800 | -// | 38 | USA | Leanne Bell | Senior Software Engineer | 4000 | -// | 32 | USA | Chelsey Dietrich | Software Engineer | 3500 | -// +-----------------+-----------------+------------------+--------------------------+-----------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "age", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "country", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "name", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "occupation", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "salary", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "38", - "27", - "17", - "42", - "38", - "32" - ], - [ - "USA", - "USA", - "Canada", - "UK", - "USA", - "USA" - ], - [ - "Leanne Graham", - "Ervin Howell", - "Clementine Bauch", - "Patricia Lebsack", - "Leanne Bell", - "Chelsey Dietrich" - ], - [ - "Devops Engineer", - "Software Engineer", - "Student", - "Software Engineer", - "Senior Software Engineer", - "Software Engineer" - ], - [ - "3000", - "2300", - "", - "2800", - "4000", - "3500" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestJSONFiles/address.jsonc b/lib/go/anyframer/testdata/golden/TestJSONFiles/address.jsonc deleted file mode 100644 index 724f8ee..0000000 --- a/lib/go/anyframer/testdata/golden/TestJSONFiles/address.jsonc +++ /dev/null @@ -1,108 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 7 Fields by 1 Rows -// +---------------------------------------------------------------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------+ -// | Name: Address | Name: Age | Name: Email | Name: FirstName | Name: Other | Name: Phone | Name: Surname | -// | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | -// | Type: []*string | Type: []*float64 | Type: []*string | Type: []*string | Type: []*string | Type: []*string | Type: []*string | -// +---------------------------------------------------------------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------+ -// | {"City":"Winchester","Postcode":"SO21 2JN","Street":"Hursley Park"} | 28 | [{"address":["fred.smith@my-work.com","fsmith@my-work.com"],"type":"office"},{"address":["freddy@my-social.com","frederic.smith@very-serious.com"],"type":"home"}] | Fred | {"Alternative.Address":{"City":"London","Postcode":"E1 6RF","Street":"Brick Lane"},"Misc":null,"Over 18 ?":true} | [{"number":"0203 544 1234","type":"home"},{"number":"01962 001234","type":"office"},{"number":"01962 001235","type":"office"},{"number":"077 7700 1234","type":"mobile"}] | Smith | -// +---------------------------------------------------------------------+------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------+------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "Address", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "Age", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "Email", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "FirstName", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "Other", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "Phone", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "Surname", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "{\"City\":\"Winchester\",\"Postcode\":\"SO21 2JN\",\"Street\":\"Hursley Park\"}" - ], - [ - 28 - ], - [ - "[{\"address\":[\"fred.smith@my-work.com\",\"fsmith@my-work.com\"],\"type\":\"office\"},{\"address\":[\"freddy@my-social.com\",\"frederic.smith@very-serious.com\"],\"type\":\"home\"}]" - ], - [ - "Fred" - ], - [ - "{\"Alternative.Address\":{\"City\":\"London\",\"Postcode\":\"E1 6RF\",\"Street\":\"Brick Lane\"},\"Misc\":null,\"Over 18 ?\":true}" - ], - [ - "[{\"number\":\"0203 544 1234\",\"type\":\"home\"},{\"number\":\"01962 001234\",\"type\":\"office\"},{\"number\":\"01962 001235\",\"type\":\"office\"},{\"number\":\"077 7700 1234\",\"type\":\"mobile\"}]" - ], - [ - "Smith" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestJSONFiles/boolean-array.jsonc b/lib/go/anyframer/testdata/golden/TestJSONFiles/boolean-array.jsonc deleted file mode 100644 index fdf37c5..0000000 --- a/lib/go/anyframer/testdata/golden/TestJSONFiles/boolean-array.jsonc +++ /dev/null @@ -1,46 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 1 Fields by 3 Rows -// +----------------+ -// | Name: response | -// | Labels: | -// | Type: []*bool | -// +----------------+ -// | false | -// | true | -// | false | -// +----------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "response", - "type": "boolean", - "typeInfo": { - "frame": "bool", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - false, - true, - false - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestJSONFiles/boolean.jsonc b/lib/go/anyframer/testdata/golden/TestJSONFiles/boolean.jsonc deleted file mode 100644 index c84d47a..0000000 --- a/lib/go/anyframer/testdata/golden/TestJSONFiles/boolean.jsonc +++ /dev/null @@ -1,42 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 1 Fields by 1 Rows -// +----------------+ -// | Name: response | -// | Labels: | -// | Type: []*bool | -// +----------------+ -// | true | -// +----------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "response", - "type": "boolean", - "typeInfo": { - "frame": "bool", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - true - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestJSONFiles/invoice.jsonc b/lib/go/anyframer/testdata/golden/TestJSONFiles/invoice.jsonc deleted file mode 100644 index 776d148..0000000 --- a/lib/go/anyframer/testdata/golden/TestJSONFiles/invoice.jsonc +++ /dev/null @@ -1,42 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 1 Fields by 1 Rows -// +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -// | Name: Account | -// | Labels: | -// | Type: []*string | -// +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -// | {"Account Name":"Firefly","Order":[{"OrderID":"order103","Product":[{"Description":{"Colour":"Purple","Depth":210,"Height":200,"Weight":0.75,"Width":300},"Price":34.45,"Product Name":"Bowler Hat","ProductID":858383,"Quantity":2,"SKU":"0406654608"},{"Description":{"Colour":"Orange","Depth":210,"Height":200,"Weight":0.6,"Width":300},"Price":21.67,"Product Name":"Trilby hat","ProductID":858236,"Quantity":1,"SKU":"0406634348"}]},{"OrderID":"order104","Product":[{"Description":{"Colour":"Purple","Depth":210,"Height":200,"Weight":0.75,"Width":300},"Price":34.45,"Product Name":"Bowler Hat","ProductID":858383,"Quantity":4,"SKU":"040657863"},{"Description":{"Colour":"Black","Depth":210,"Height":20,"Weight":2,"Width":30},"Price":107.99,"Product Name":"Cloak","ProductID":345664,"Quantity":1,"SKU":"0406654603"}]}]} | -// +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "Account", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "{\"Account Name\":\"Firefly\",\"Order\":[{\"OrderID\":\"order103\",\"Product\":[{\"Description\":{\"Colour\":\"Purple\",\"Depth\":210,\"Height\":200,\"Weight\":0.75,\"Width\":300},\"Price\":34.45,\"Product Name\":\"Bowler Hat\",\"ProductID\":858383,\"Quantity\":2,\"SKU\":\"0406654608\"},{\"Description\":{\"Colour\":\"Orange\",\"Depth\":210,\"Height\":200,\"Weight\":0.6,\"Width\":300},\"Price\":21.67,\"Product Name\":\"Trilby hat\",\"ProductID\":858236,\"Quantity\":1,\"SKU\":\"0406634348\"}]},{\"OrderID\":\"order104\",\"Product\":[{\"Description\":{\"Colour\":\"Purple\",\"Depth\":210,\"Height\":200,\"Weight\":0.75,\"Width\":300},\"Price\":34.45,\"Product Name\":\"Bowler Hat\",\"ProductID\":858383,\"Quantity\":4,\"SKU\":\"040657863\"},{\"Description\":{\"Colour\":\"Black\",\"Depth\":210,\"Height\":20,\"Weight\":2,\"Width\":30},\"Price\":107.99,\"Product Name\":\"Cloak\",\"ProductID\":345664,\"Quantity\":1,\"SKU\":\"0406654603\"}]}]}" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestJSONFiles/library.jsonc b/lib/go/anyframer/testdata/golden/TestJSONFiles/library.jsonc deleted file mode 100644 index 6d5043b..0000000 --- a/lib/go/anyframer/testdata/golden/TestJSONFiles/library.jsonc +++ /dev/null @@ -1,42 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 1 Fields by 1 Rows -// +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -// | Name: library | -// | Labels: | -// | Type: []*string | -// +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -// | {"books":[{"authors":["Abelson","Sussman"],"copies":2,"isbn":"9780262510875","price":38.9,"title":"Structure and Interpretation of Computer Programs"},{"authors":["Kernighan","Richie"],"copies":3,"isbn":"9780131103627","price":33.59,"title":"The C Programming Language"},{"authors":["Aho","Kernighan","Weinberger"],"copies":1,"isbn":"9780201079814","title":"The AWK Programming Language"},{"authors":["Aho","Lam","Sethi","Ullman"],"copies":1,"isbn":"9780201100884","price":23.38,"title":"Compilers: Principles, Techniques, and Tools"}],"customers":[{"address":{"city":"Winchester","postcode":"SO22 5PU","street":"2 Long Road"},"id":"10001","name":"Joe Doe"},{"address":{"city":"Winchester","postcode":"SO22 4WD","street":"56 Letsby Avenue"},"id":"10002","name":"Fred Bloggs"},{"address":{"city":"Southampton","postcode":"SO14 0MG","street":"1 Preddy Gate"},"id":"10003","name":"Jason Arthur"}],"loans":[{"customer":"10001","isbn":"9780262510875","return":"2016-12-05"},{"customer":"10003","isbn":"9780201100884","return":"2016-10-22"},{"customer":"10003","isbn":"9780262510875","return":"2016-12-22"}]} | -// +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "library", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "{\"books\":[{\"authors\":[\"Abelson\",\"Sussman\"],\"copies\":2,\"isbn\":\"9780262510875\",\"price\":38.9,\"title\":\"Structure and Interpretation of Computer Programs\"},{\"authors\":[\"Kernighan\",\"Richie\"],\"copies\":3,\"isbn\":\"9780131103627\",\"price\":33.59,\"title\":\"The C Programming Language\"},{\"authors\":[\"Aho\",\"Kernighan\",\"Weinberger\"],\"copies\":1,\"isbn\":\"9780201079814\",\"title\":\"The AWK Programming Language\"},{\"authors\":[\"Aho\",\"Lam\",\"Sethi\",\"Ullman\"],\"copies\":1,\"isbn\":\"9780201100884\",\"price\":23.38,\"title\":\"Compilers: Principles, Techniques, and Tools\"}],\"customers\":[{\"address\":{\"city\":\"Winchester\",\"postcode\":\"SO22 5PU\",\"street\":\"2 Long Road\"},\"id\":\"10001\",\"name\":\"Joe Doe\"},{\"address\":{\"city\":\"Winchester\",\"postcode\":\"SO22 4WD\",\"street\":\"56 Letsby Avenue\"},\"id\":\"10002\",\"name\":\"Fred Bloggs\"},{\"address\":{\"city\":\"Southampton\",\"postcode\":\"SO14 0MG\",\"street\":\"1 Preddy Gate\"},\"id\":\"10003\",\"name\":\"Jason Arthur\"}],\"loans\":[{\"customer\":\"10001\",\"isbn\":\"9780262510875\",\"return\":\"2016-12-05\"},{\"customer\":\"10003\",\"isbn\":\"9780201100884\",\"return\":\"2016-10-22\"},{\"customer\":\"10003\",\"isbn\":\"9780262510875\",\"return\":\"2016-12-22\"}]}" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestJSONFiles/library_books.jsonc b/lib/go/anyframer/testdata/golden/TestJSONFiles/library_books.jsonc deleted file mode 100644 index eb06bfb..0000000 --- a/lib/go/anyframer/testdata/golden/TestJSONFiles/library_books.jsonc +++ /dev/null @@ -1,104 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 5 Fields by 4 Rows -// +----------------------------------+------------------+-----------------+------------------+---------------------------------------------------+ -// | Name: authors | Name: copies | Name: isbn | Name: price | Name: title | -// | Labels: | Labels: | Labels: | Labels: | Labels: | -// | Type: []*string | Type: []*float64 | Type: []*string | Type: []*float64 | Type: []*string | -// +----------------------------------+------------------+-----------------+------------------+---------------------------------------------------+ -// | ["Abelson","Sussman"] | 2 | 9780262510875 | 38.9 | Structure and Interpretation of Computer Programs | -// | ["Kernighan","Richie"] | 3 | 9780131103627 | 33.59 | The C Programming Language | -// | ["Aho","Kernighan","Weinberger"] | 1 | 9780201079814 | null | The AWK Programming Language | -// | ["Aho","Lam","Sethi","Ullman"] | 1 | 9780201100884 | 23.38 | Compilers: Principles, Techniques, and Tools | -// +----------------------------------+------------------+-----------------+------------------+---------------------------------------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "authors", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "copies", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "isbn", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "price", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "title", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "[\"Abelson\",\"Sussman\"]", - "[\"Kernighan\",\"Richie\"]", - "[\"Aho\",\"Kernighan\",\"Weinberger\"]", - "[\"Aho\",\"Lam\",\"Sethi\",\"Ullman\"]" - ], - [ - 2, - 3, - 1, - 1 - ], - [ - "9780262510875", - "9780131103627", - "9780201079814", - "9780201100884" - ], - [ - 38.9, - 33.59, - null, - 23.38 - ], - [ - "Structure and Interpretation of Computer Programs", - "The C Programming Language", - "The AWK Programming Language", - "Compilers: Principles, Techniques, and Tools" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestJSONFiles/library_books_price_list.jsonc b/lib/go/anyframer/testdata/golden/TestJSONFiles/library_books_price_list.jsonc deleted file mode 100644 index d18ad2b..0000000 --- a/lib/go/anyframer/testdata/golden/TestJSONFiles/library_books_price_list.jsonc +++ /dev/null @@ -1,62 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 2 Fields by 4 Rows -// +------------------+---------------------------------------------------+ -// | Name: price | Name: title | -// | Labels: | Labels: | -// | Type: []*float64 | Type: []*string | -// +------------------+---------------------------------------------------+ -// | 38.9 | Structure and Interpretation of Computer Programs | -// | 33.59 | The C Programming Language | -// | null | The AWK Programming Language | -// | 23.38 | Compilers: Principles, Techniques, and Tools | -// +------------------+---------------------------------------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "price", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "title", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - 38.9, - 33.59, - null, - 23.38 - ], - [ - "Structure and Interpretation of Computer Programs", - "The C Programming Language", - "The AWK Programming Language", - "Compilers: Principles, Techniques, and Tools" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestJSONFiles/library_books_stats.jsonc b/lib/go/anyframer/testdata/golden/TestJSONFiles/library_books_stats.jsonc deleted file mode 100644 index a9399da..0000000 --- a/lib/go/anyframer/testdata/golden/TestJSONFiles/library_books_stats.jsonc +++ /dev/null @@ -1,97 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 6 Fields by 1 Rows -// +-----------------------+-----------------------+-----------------------+-------------------------+------------------------+-------------------------+ -// | Name: all books value | Name: max books value | Name: min books value | Name: total books count | Name: total books type | Name: total books value | -// | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | -// | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | -// +-----------------------+-----------------------+-----------------------+-------------------------+------------------------+-------------------------+ -// | 201.95 | 38.9 | 23.38 | 7 | 11 | 95.87 | -// +-----------------------+-----------------------+-----------------------+-------------------------+------------------------+-------------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "all books value", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "max books value", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "min books value", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "total books count", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "total books type", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "total books value", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - 201.95 - ], - [ - 38.9 - ], - [ - 23.38 - ], - [ - 7 - ], - [ - 11 - ], - [ - 95.87 - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestJSONFiles/library_books_title.jsonc b/lib/go/anyframer/testdata/golden/TestJSONFiles/library_books_title.jsonc deleted file mode 100644 index e7d4a95..0000000 --- a/lib/go/anyframer/testdata/golden/TestJSONFiles/library_books_title.jsonc +++ /dev/null @@ -1,48 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 1 Fields by 4 Rows -// +---------------------------------------------------+ -// | Name: response | -// | Labels: | -// | Type: []*string | -// +---------------------------------------------------+ -// | Structure and Interpretation of Computer Programs | -// | The C Programming Language | -// | The AWK Programming Language | -// | Compilers: Principles, Techniques, and Tools | -// +---------------------------------------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "response", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "Structure and Interpretation of Computer Programs", - "The C Programming Language", - "The AWK Programming Language", - "Compilers: Principles, Techniques, and Tools" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestJSONFiles/library_books_total_value.jsonc b/lib/go/anyframer/testdata/golden/TestJSONFiles/library_books_total_value.jsonc deleted file mode 100644 index 3bb1a58..0000000 --- a/lib/go/anyframer/testdata/golden/TestJSONFiles/library_books_total_value.jsonc +++ /dev/null @@ -1,42 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 1 Fields by 1 Rows -// +------------------+ -// | Name: response | -// | Labels: | -// | Type: []*float64 | -// +------------------+ -// | 201.95 | -// +------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "response", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - 201.95 - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestJSONFiles/library_costly_books.jsonc b/lib/go/anyframer/testdata/golden/TestJSONFiles/library_costly_books.jsonc deleted file mode 100644 index da4adb2..0000000 --- a/lib/go/anyframer/testdata/golden/TestJSONFiles/library_costly_books.jsonc +++ /dev/null @@ -1,56 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 2 Fields by 2 Rows -// +------------------+---------------------------------------------------+ -// | Name: price | Name: title | -// | Labels: | Labels: | -// | Type: []*float64 | Type: []*string | -// +------------------+---------------------------------------------------+ -// | 38.9 | Structure and Interpretation of Computer Programs | -// | 33.59 | The C Programming Language | -// +------------------+---------------------------------------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "price", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "title", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - 38.9, - 33.59 - ], - [ - "Structure and Interpretation of Computer Programs", - "The C Programming Language" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestJSONFiles/library_customers.jsonc b/lib/go/anyframer/testdata/golden/TestJSONFiles/library_customers.jsonc deleted file mode 100644 index e2f6093..0000000 --- a/lib/go/anyframer/testdata/golden/TestJSONFiles/library_customers.jsonc +++ /dev/null @@ -1,72 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 3 Fields by 3 Rows -// +-------------------------------------------------------------------------+-----------------+-----------------+ -// | Name: address | Name: id | Name: name | -// | Labels: | Labels: | Labels: | -// | Type: []*string | Type: []*string | Type: []*string | -// +-------------------------------------------------------------------------+-----------------+-----------------+ -// | {"city":"Winchester","postcode":"SO22 5PU","street":"2 Long Road"} | 10001 | Joe Doe | -// | {"city":"Winchester","postcode":"SO22 4WD","street":"56 Letsby Avenue"} | 10002 | Fred Bloggs | -// | {"city":"Southampton","postcode":"SO14 0MG","street":"1 Preddy Gate"} | 10003 | Jason Arthur | -// +-------------------------------------------------------------------------+-----------------+-----------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "address", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "id", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "name", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "{\"city\":\"Winchester\",\"postcode\":\"SO22 5PU\",\"street\":\"2 Long Road\"}", - "{\"city\":\"Winchester\",\"postcode\":\"SO22 4WD\",\"street\":\"56 Letsby Avenue\"}", - "{\"city\":\"Southampton\",\"postcode\":\"SO14 0MG\",\"street\":\"1 Preddy Gate\"}" - ], - [ - "10001", - "10002", - "10003" - ], - [ - "Joe Doe", - "Fred Bloggs", - "Jason Arthur" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestJSONFiles/library_loans.jsonc b/lib/go/anyframer/testdata/golden/TestJSONFiles/library_loans.jsonc deleted file mode 100644 index a61fe3b..0000000 --- a/lib/go/anyframer/testdata/golden/TestJSONFiles/library_loans.jsonc +++ /dev/null @@ -1,72 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 3 Fields by 3 Rows -// +-----------------+-----------------+-----------------+ -// | Name: customer | Name: isbn | Name: return | -// | Labels: | Labels: | Labels: | -// | Type: []*string | Type: []*string | Type: []*string | -// +-----------------+-----------------+-----------------+ -// | 10001 | 9780262510875 | 2016-12-05 | -// | 10003 | 9780201100884 | 2016-10-22 | -// | 10003 | 9780262510875 | 2016-12-22 | -// +-----------------+-----------------+-----------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "customer", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "isbn", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "return", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "10001", - "10003", - "10003" - ], - [ - "9780262510875", - "9780201100884", - "9780262510875" - ], - [ - "2016-12-05", - "2016-10-22", - "2016-12-22" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestJSONFiles/number-array.jsonc b/lib/go/anyframer/testdata/golden/TestJSONFiles/number-array.jsonc deleted file mode 100644 index 15ad4b4..0000000 --- a/lib/go/anyframer/testdata/golden/TestJSONFiles/number-array.jsonc +++ /dev/null @@ -1,46 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 1 Fields by 3 Rows -// +------------------+ -// | Name: response | -// | Labels: | -// | Type: []*float64 | -// +------------------+ -// | 123 | -// | 456.789 | -// | -123.456 | -// +------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "response", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - 123, - 456.789, - -123.456 - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestJSONFiles/number.jsonc b/lib/go/anyframer/testdata/golden/TestJSONFiles/number.jsonc deleted file mode 100644 index 4138813..0000000 --- a/lib/go/anyframer/testdata/golden/TestJSONFiles/number.jsonc +++ /dev/null @@ -1,42 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 1 Fields by 1 Rows -// +------------------+ -// | Name: response | -// | Labels: | -// | Type: []*float64 | -// +------------------+ -// | 123.456 | -// +------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "response", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - 123.456 - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestJSONFiles/org.jsonc b/lib/go/anyframer/testdata/golden/TestJSONFiles/org.jsonc deleted file mode 100644 index 0db97a5..0000000 --- a/lib/go/anyframer/testdata/golden/TestJSONFiles/org.jsonc +++ /dev/null @@ -1,75 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 4 Fields by 1 Rows -// +----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------+-----------------+ -// | Name: business_type | Name: employees | Name: is_public | Name: name | -// | Labels: | Labels: | Labels: | Labels: | -// | Type: []*string | Type: []*string | Type: []*bool | Type: []*string | -// +----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------+-----------------+ -// | Software Development | [{"age":38,"country":"USA","id":"leanne_graham","name":{"fullname":"Leanne Graham"},"occupation":"Devops Engineer","salary":3000,"skills":["devops","grafana","kubernetes"]},{"age":27,"country":"USA","id":"ervin_howell","name":{"fullname":"Ervin Howell"},"occupation":"Software Engineer","salary":2300,"skills":["python","java","grafana"]},{"age":17,"country":"Canada","id":"clementine_bauch","name":{"fullname":"Clementine_Bauch"},"occupation":"Student","salary":null},{"age":42,"country":"UK","id":"patricia_lebsack","name":{"fullname":"Patricia Lebsack"},"occupation":"Software Engineer","salary":2800,"skills":["python","kubernetes"]},{"age":38,"country":"USA","id":"leanne_bell","name":{"fullname":"Leanne Bell"},"occupation":"Senior Software Engineer","salary":4000,"skills":["python","kubernetes","grafana","scrum"]},{"age":32,"country":"USA","id":"chelsey_dietrich","name":{"firstname":"Chelsey","lastname":"Dietrich"},"occupation":"Software Engineer","salary":3500,"skills":["golang","kubernetes"]}] | false | Any Framer Org | -// +----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+-----------------+-----------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "business_type", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "employees", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "is_public", - "type": "boolean", - "typeInfo": { - "frame": "bool", - "nullable": true - } - }, - { - "name": "name", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "Software Development" - ], - [ - "[{\"age\":38,\"country\":\"USA\",\"id\":\"leanne_graham\",\"name\":{\"fullname\":\"Leanne Graham\"},\"occupation\":\"Devops Engineer\",\"salary\":3000,\"skills\":[\"devops\",\"grafana\",\"kubernetes\"]},{\"age\":27,\"country\":\"USA\",\"id\":\"ervin_howell\",\"name\":{\"fullname\":\"Ervin Howell\"},\"occupation\":\"Software Engineer\",\"salary\":2300,\"skills\":[\"python\",\"java\",\"grafana\"]},{\"age\":17,\"country\":\"Canada\",\"id\":\"clementine_bauch\",\"name\":{\"fullname\":\"Clementine_Bauch\"},\"occupation\":\"Student\",\"salary\":null},{\"age\":42,\"country\":\"UK\",\"id\":\"patricia_lebsack\",\"name\":{\"fullname\":\"Patricia Lebsack\"},\"occupation\":\"Software Engineer\",\"salary\":2800,\"skills\":[\"python\",\"kubernetes\"]},{\"age\":38,\"country\":\"USA\",\"id\":\"leanne_bell\",\"name\":{\"fullname\":\"Leanne Bell\"},\"occupation\":\"Senior Software Engineer\",\"salary\":4000,\"skills\":[\"python\",\"kubernetes\",\"grafana\",\"scrum\"]},{\"age\":32,\"country\":\"USA\",\"id\":\"chelsey_dietrich\",\"name\":{\"firstname\":\"Chelsey\",\"lastname\":\"Dietrich\"},\"occupation\":\"Software Engineer\",\"salary\":3500,\"skills\":[\"golang\",\"kubernetes\"]}]" - ], - [ - false - ], - [ - "Any Framer Org" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestJSONFiles/org_emplyees.jsonc b/lib/go/anyframer/testdata/golden/TestJSONFiles/org_emplyees.jsonc deleted file mode 100644 index bb1fd42..0000000 --- a/lib/go/anyframer/testdata/golden/TestJSONFiles/org_emplyees.jsonc +++ /dev/null @@ -1,148 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 7 Fields by 6 Rows -// +------------------+-----------------+------------------+-----------------------------------------------+--------------------------+------------------+-------------------------------------------+ -// | Name: age | Name: country | Name: id | Name: name | Name: occupation | Name: salary | Name: skills | -// | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | -// | Type: []*float64 | Type: []*string | Type: []*string | Type: []*string | Type: []*string | Type: []*float64 | Type: []*string | -// +------------------+-----------------+------------------+-----------------------------------------------+--------------------------+------------------+-------------------------------------------+ -// | 38 | USA | leanne_graham | {"fullname":"Leanne Graham"} | Devops Engineer | 3000 | ["devops","grafana","kubernetes"] | -// | 27 | USA | ervin_howell | {"fullname":"Ervin Howell"} | Software Engineer | 2300 | ["python","java","grafana"] | -// | 17 | Canada | clementine_bauch | {"fullname":"Clementine_Bauch"} | Student | null | null | -// | 42 | UK | patricia_lebsack | {"fullname":"Patricia Lebsack"} | Software Engineer | 2800 | ["python","kubernetes"] | -// | 38 | USA | leanne_bell | {"fullname":"Leanne Bell"} | Senior Software Engineer | 4000 | ["python","kubernetes","grafana","scrum"] | -// | 32 | USA | chelsey_dietrich | {"firstname":"Chelsey","lastname":"Dietrich"} | Software Engineer | 3500 | ["golang","kubernetes"] | -// +------------------+-----------------+------------------+-----------------------------------------------+--------------------------+------------------+-------------------------------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "age", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "country", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "id", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "name", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "occupation", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "salary", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "skills", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - 38, - 27, - 17, - 42, - 38, - 32 - ], - [ - "USA", - "USA", - "Canada", - "UK", - "USA", - "USA" - ], - [ - "leanne_graham", - "ervin_howell", - "clementine_bauch", - "patricia_lebsack", - "leanne_bell", - "chelsey_dietrich" - ], - [ - "{\"fullname\":\"Leanne Graham\"}", - "{\"fullname\":\"Ervin Howell\"}", - "{\"fullname\":\"Clementine_Bauch\"}", - "{\"fullname\":\"Patricia Lebsack\"}", - "{\"fullname\":\"Leanne Bell\"}", - "{\"firstname\":\"Chelsey\",\"lastname\":\"Dietrich\"}" - ], - [ - "Devops Engineer", - "Software Engineer", - "Student", - "Software Engineer", - "Senior Software Engineer", - "Software Engineer" - ], - [ - 3000, - 2300, - null, - 2800, - 4000, - 3500 - ], - [ - "[\"devops\",\"grafana\",\"kubernetes\"]", - "[\"python\",\"java\",\"grafana\"]", - "null", - "[\"python\",\"kubernetes\"]", - "[\"python\",\"kubernetes\",\"grafana\",\"scrum\"]", - "[\"golang\",\"kubernetes\"]" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestJSONFiles/string-array.jsonc b/lib/go/anyframer/testdata/golden/TestJSONFiles/string-array.jsonc deleted file mode 100644 index 41c64ac..0000000 --- a/lib/go/anyframer/testdata/golden/TestJSONFiles/string-array.jsonc +++ /dev/null @@ -1,46 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 1 Fields by 3 Rows -// +-----------------+ -// | Name: response | -// | Labels: | -// | Type: []*string | -// +-----------------+ -// | apple | -// | ball | -// | cat | -// +-----------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "response", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "apple", - "ball", - "cat" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestJSONFiles/string.jsonc b/lib/go/anyframer/testdata/golden/TestJSONFiles/string.jsonc deleted file mode 100644 index 4fbcfbc..0000000 --- a/lib/go/anyframer/testdata/golden/TestJSONFiles/string.jsonc +++ /dev/null @@ -1,42 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 1 Fields by 1 Rows -// +-----------------+ -// | Name: response | -// | Labels: | -// | Type: []*string | -// +-----------------+ -// | hello world | -// +-----------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "response", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "hello world" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestJSONFiles/user.jsonc b/lib/go/anyframer/testdata/golden/TestJSONFiles/user.jsonc deleted file mode 100644 index ab71305..0000000 --- a/lib/go/anyframer/testdata/golden/TestJSONFiles/user.jsonc +++ /dev/null @@ -1,119 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 8 Fields by 1 Rows -// +---------------------------------------------------------------------------------------------------------------------------------+------------------+------------------------+----------------------------------------+-----------------+------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -// | Name: address | Name: age | Name: hobbies | Name: name | Name: phone | Name: salary | Name: user_id | Name: websites | -// | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | -// | Type: []*string | Type: []*float64 | Type: []*string | Type: []*string | Type: []*string | Type: []*float64 | Type: []*string | Type: []*string | -// +---------------------------------------------------------------------------------------------------------------------------------+------------------+------------------------+----------------------------------------+-----------------+------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -// | {"city":"London","country":"United Kingdom","county":null,"door_no":35,"postcode":"ABC 123","street":"High Road, Canary wharf"} | 32 | ["swimming","cycling"] | {"first_name":"foo","last_name":"bar"} | +0-12345-67890 | 123.456 | foo_bar | [{"kind":"blog","url":"https://foo_bars_blog.blog"},{"kind":"twitter","url":"https://twitter.com"},{"kind":"github","url":"https://github.com"}] | -// +---------------------------------------------------------------------------------------------------------------------------------+------------------+------------------------+----------------------------------------+-----------------+------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "address", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "age", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "hobbies", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "name", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "phone", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "salary", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "user_id", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "websites", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "{\"city\":\"London\",\"country\":\"United Kingdom\",\"county\":null,\"door_no\":35,\"postcode\":\"ABC 123\",\"street\":\"High Road, Canary wharf\"}" - ], - [ - 32 - ], - [ - "[\"swimming\",\"cycling\"]" - ], - [ - "{\"first_name\":\"foo\",\"last_name\":\"bar\"}" - ], - [ - "+0-12345-67890" - ], - [ - 123.456 - ], - [ - "foo_bar" - ], - [ - "[{\"kind\":\"blog\",\"url\":\"https://foo_bars_blog.blog\"},{\"kind\":\"twitter\",\"url\":\"https://twitter.com\"},{\"kind\":\"github\",\"url\":\"https://github.com\"}]" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestJSONFiles/users.jsonc b/lib/go/anyframer/testdata/golden/TestJSONFiles/users.jsonc deleted file mode 100644 index 144ef08..0000000 --- a/lib/go/anyframer/testdata/golden/TestJSONFiles/users.jsonc +++ /dev/null @@ -1,140 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 9 Fields by 2 Rows -// +---------------------------------------------------------------------------------------------------------------------------------+------------------+------------------------+------------------+-------------------------------------------+-----------------+------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -// | Name: address | Name: age | Name: hobbies | Name: isPremimum | Name: name | Name: phone | Name: salary | Name: user_id | Name: websites | -// | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | -// | Type: []*string | Type: []*float64 | Type: []*string | Type: []*bool | Type: []*string | Type: []*string | Type: []*float64 | Type: []*string | Type: []*string | -// +---------------------------------------------------------------------------------------------------------------------------------+------------------+------------------------+------------------+-------------------------------------------+-----------------+------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -// | {"city":"London","country":"United Kingdom","county":null,"door_no":35,"postcode":"ABC 123","street":"High Road, Canary wharf"} | 32 | ["swimming","cycling"] | null | {"first_name":"foo","last_name":"bar"} | +0-12345-67890 | 123.456 | foo_bar | [{"kind":"blog","url":"https://foo_bars_blog.blog"},{"kind":"twitter","url":"https://twitter.com"},{"kind":"github","url":"https://github.com"}] | -// | {"city":"New York","country":"USA","county":null,"door_no":135,"postcode":"123456","street":"Somewhere, Nowhere"} | 18 | null | true | {"first_name":"alpha","last_name":"beta"} | +1-12345-67890 | null | alpha_beta | [{"kind":"blog","url":"https://alphas_blog.blog"},{"kind":"twitter","url":"https://twitter.com"},{"kind":"github","url":"https://github.com"}] | -// +---------------------------------------------------------------------------------------------------------------------------------+------------------+------------------------+------------------+-------------------------------------------+-----------------+------------------+-----------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "address", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "age", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "hobbies", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "isPremimum", - "type": "boolean", - "typeInfo": { - "frame": "bool", - "nullable": true - } - }, - { - "name": "name", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "phone", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "salary", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "user_id", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "websites", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "{\"city\":\"London\",\"country\":\"United Kingdom\",\"county\":null,\"door_no\":35,\"postcode\":\"ABC 123\",\"street\":\"High Road, Canary wharf\"}", - "{\"city\":\"New York\",\"country\":\"USA\",\"county\":null,\"door_no\":135,\"postcode\":\"123456\",\"street\":\"Somewhere, Nowhere\"}" - ], - [ - 32, - 18 - ], - [ - "[\"swimming\",\"cycling\"]", - "null" - ], - [ - null, - true - ], - [ - "{\"first_name\":\"foo\",\"last_name\":\"bar\"}", - "{\"first_name\":\"alpha\",\"last_name\":\"beta\"}" - ], - [ - "+0-12345-67890", - "+1-12345-67890" - ], - [ - 123.456, - null - ], - [ - "foo_bar", - "alpha_beta" - ], - [ - "[{\"kind\":\"blog\",\"url\":\"https://foo_bars_blog.blog\"},{\"kind\":\"twitter\",\"url\":\"https://twitter.com\"},{\"kind\":\"github\",\"url\":\"https://github.com\"}]", - "[{\"kind\":\"blog\",\"url\":\"https://alphas_blog.blog\"},{\"kind\":\"twitter\",\"url\":\"https://twitter.com\"},{\"kind\":\"github\",\"url\":\"https://github.com\"}]" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestRootSelector/array_selector_with_value.jsonc b/lib/go/anyframer/testdata/golden/TestRootSelector/array_selector_with_value.jsonc deleted file mode 100644 index 4881cbf..0000000 --- a/lib/go/anyframer/testdata/golden/TestRootSelector/array_selector_with_value.jsonc +++ /dev/null @@ -1,68 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 3 Fields by 2 Rows -// +-----------------+------------------+---------------------+ -// | Name: name | Name: salary | Name: self_employed | -// | Labels: | Labels: | Labels: | -// | Type: []*string | Type: []*float64 | Type: []*bool | -// +-----------------+------------------+---------------------+ -// | foo | 123 | false | -// | bar | 456.789 | true | -// +-----------------+------------------+---------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "name", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "salary", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "self_employed", - "type": "boolean", - "typeInfo": { - "frame": "bool", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "foo", - "bar" - ], - [ - 123, - 456.789 - ], - [ - false, - true - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestRootSelector/array_selector_without_value.jsonc b/lib/go/anyframer/testdata/golden/TestRootSelector/array_selector_without_value.jsonc deleted file mode 100644 index 8c43f01..0000000 --- a/lib/go/anyframer/testdata/golden/TestRootSelector/array_selector_without_value.jsonc +++ /dev/null @@ -1,24 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 0 Fields by 0 Rows -// + -// + -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [] - }, - "data": { - "values": [] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestSliceToFrame/array_of_array.jsonc b/lib/go/anyframer/testdata/golden/TestSliceToFrame/array_of_array.jsonc deleted file mode 100644 index ae96fba..0000000 --- a/lib/go/anyframer/testdata/golden/TestSliceToFrame/array_of_array.jsonc +++ /dev/null @@ -1,44 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: TestSliceToFrame/array_of_array -// Dimensions: 1 Fields by 2 Rows -// +---------------------------------------+ -// | Name: TestSliceToFrame/array_of_array | -// | Labels: | -// | Type: []*string | -// +---------------------------------------+ -// | ["hello","world"] | -// | [123.45,6] | -// +---------------------------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "TestSliceToFrame/array_of_array", - "fields": [ - { - "name": "TestSliceToFrame/array_of_array", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "[\"hello\",\"world\"]", - "[123.45,6]" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestSliceToFrame/array_of_boolean.jsonc b/lib/go/anyframer/testdata/golden/TestSliceToFrame/array_of_boolean.jsonc deleted file mode 100644 index 06139b1..0000000 --- a/lib/go/anyframer/testdata/golden/TestSliceToFrame/array_of_boolean.jsonc +++ /dev/null @@ -1,44 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: TestSliceToFrame/array_of_boolean -// Dimensions: 1 Fields by 2 Rows -// +-----------------------------------------+ -// | Name: TestSliceToFrame/array_of_boolean | -// | Labels: | -// | Type: []*bool | -// +-----------------------------------------+ -// | false | -// | true | -// +-----------------------------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "TestSliceToFrame/array_of_boolean", - "fields": [ - { - "name": "TestSliceToFrame/array_of_boolean", - "type": "boolean", - "typeInfo": { - "frame": "bool", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - false, - true - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestSliceToFrame/array_of_numbers.jsonc b/lib/go/anyframer/testdata/golden/TestSliceToFrame/array_of_numbers.jsonc deleted file mode 100644 index b865c81..0000000 --- a/lib/go/anyframer/testdata/golden/TestSliceToFrame/array_of_numbers.jsonc +++ /dev/null @@ -1,44 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: TestSliceToFrame/array_of_numbers -// Dimensions: 1 Fields by 2 Rows -// +-----------------------------------------+ -// | Name: TestSliceToFrame/array_of_numbers | -// | Labels: | -// | Type: []*float64 | -// +-----------------------------------------+ -// | 123.45 | -// | 6 | -// +-----------------------------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "TestSliceToFrame/array_of_numbers", - "fields": [ - { - "name": "TestSliceToFrame/array_of_numbers", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - 123.45, - 6 - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestSliceToFrame/array_of_objects.jsonc b/lib/go/anyframer/testdata/golden/TestSliceToFrame/array_of_objects.jsonc deleted file mode 100644 index ec61d74..0000000 --- a/lib/go/anyframer/testdata/golden/TestSliceToFrame/array_of_objects.jsonc +++ /dev/null @@ -1,104 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: TestSliceToFrame/array_of_objects -// Dimensions: 6 Fields by 2 Rows -// +------------------+-----------------+-----------------+-----------------+----------------+-----------------+ -// | Name: age | Name: city | Name: country | Name: hobbies | Name: salaried | Name: username | -// | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | -// | Type: []*float64 | Type: []*string | Type: []*string | Type: []*string | Type: []*bool | Type: []*string | -// +------------------+-----------------+-----------------+-----------------+----------------+-----------------+ -// | 123 | null | uk | ["swimming"] | true | foo | -// | 456.789 | chennai | null | ["painting"] | false | bar | -// +------------------+-----------------+-----------------+-----------------+----------------+-----------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "TestSliceToFrame/array_of_objects", - "fields": [ - { - "name": "age", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "city", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "country", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "hobbies", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "salaried", - "type": "boolean", - "typeInfo": { - "frame": "bool", - "nullable": true - } - }, - { - "name": "username", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - 123, - 456.789 - ], - [ - null, - "chennai" - ], - [ - "uk", - null - ], - [ - "[\"swimming\"]", - "[\"painting\"]" - ], - [ - true, - false - ], - [ - "foo", - "bar" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestSliceToFrame/array_of_objects_with_columns.jsonc b/lib/go/anyframer/testdata/golden/TestSliceToFrame/array_of_objects_with_columns.jsonc deleted file mode 100644 index d6f4a4d..0000000 --- a/lib/go/anyframer/testdata/golden/TestSliceToFrame/array_of_objects_with_columns.jsonc +++ /dev/null @@ -1,68 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: TestSliceToFrame/array_of_objects_with_columns -// Dimensions: 3 Fields by 2 Rows -// +-----------------+------------------+----------------+ -// | Name: User Name | Name: age | Name: salaried | -// | Labels: | Labels: | Labels: | -// | Type: []*string | Type: []*float64 | Type: []*bool | -// +-----------------+------------------+----------------+ -// | foo | 123 | true | -// | bar | 456.789 | false | -// +-----------------+------------------+----------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "TestSliceToFrame/array_of_objects_with_columns", - "fields": [ - { - "name": "User Name", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "age", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "salaried", - "type": "boolean", - "typeInfo": { - "frame": "bool", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "foo", - "bar" - ], - [ - 123, - 456.789 - ], - [ - true, - false - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestSliceToFrame/array_of_objects_with_columns_and_nested_selector.jsonc b/lib/go/anyframer/testdata/golden/TestSliceToFrame/array_of_objects_with_columns_and_nested_selector.jsonc deleted file mode 100644 index 6124397..0000000 --- a/lib/go/anyframer/testdata/golden/TestSliceToFrame/array_of_objects_with_columns_and_nested_selector.jsonc +++ /dev/null @@ -1,80 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: TestSliceToFrame/array_of_objects_with_columns_and_nested_selector -// Dimensions: 4 Fields by 2 Rows -// +-----------------+------------------+----------------+------------------+ -// | Name: User Name | Name: age | Name: salaried | Name: Post Code | -// | Labels: | Labels: | Labels: | Labels: | -// | Type: []*string | Type: []*float64 | Type: []*bool | Type: []*float64 | -// +-----------------+------------------+----------------+------------------+ -// | foo | 123 | true | 123 | -// | bar | 456.789 | false | 567.89 | -// +-----------------+------------------+----------------+------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "TestSliceToFrame/array_of_objects_with_columns_and_nested_selector", - "fields": [ - { - "name": "User Name", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "age", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "salaried", - "type": "boolean", - "typeInfo": { - "frame": "bool", - "nullable": true - } - }, - { - "name": "Post Code", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "foo", - "bar" - ], - [ - 123, - 456.789 - ], - [ - true, - false - ], - [ - 123, - 567.89 - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestSliceToFrame/array_of_strings.jsonc b/lib/go/anyframer/testdata/golden/TestSliceToFrame/array_of_strings.jsonc deleted file mode 100644 index 6a304d8..0000000 --- a/lib/go/anyframer/testdata/golden/TestSliceToFrame/array_of_strings.jsonc +++ /dev/null @@ -1,44 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: TestSliceToFrame/array_of_strings -// Dimensions: 1 Fields by 2 Rows -// +-----------------------------------------+ -// | Name: TestSliceToFrame/array_of_strings | -// | Labels: | -// | Type: []*string | -// +-----------------------------------------+ -// | hello | -// | world | -// +-----------------------------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "TestSliceToFrame/array_of_strings", - "fields": [ - { - "name": "TestSliceToFrame/array_of_strings", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "hello", - "world" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestStructToFrame/map_of_mixed_object_should_not_throw_error.jsonc b/lib/go/anyframer/testdata/golden/TestStructToFrame/map_of_mixed_object_should_not_throw_error.jsonc deleted file mode 100644 index 1ec125e..0000000 --- a/lib/go/anyframer/testdata/golden/TestStructToFrame/map_of_mixed_object_should_not_throw_error.jsonc +++ /dev/null @@ -1,361 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: TestStructToFrame/map_of_mixed_object_should_not_throw_error -// Dimensions: 30 Fields by 1 Rows -// +------------------+--------------------------+---------------------+-----------------------------+---------------------+-----------------------------+------------------+-------------------------+-------------------+---------------------------+-------------------+---------------------------+-------------------+---------------------------+------------------+--------------------------+--------------------+----------------------------+-------------------------------+-------------------------------+------------------+--------------------------+--------------------+----------------------------+--------------------+----------------------------+--------------------+----------------------------+-------------------+---------------------------+ -// | Name: valid bool | Name: valid bool pointer | Name: valid float32 | Name: valid float32 pointer | Name: valid float64 | Name: valid float64 pointer | Name: valid int | Name: valid int pointer | Name: valid int16 | Name: valid int16 pointer | Name: valid int32 | Name: valid int32 pointer | Name: valid int64 | Name: valid int64 pointer | Name: valid int8 | Name: valid int8 pointer | Name: valid string | Name: valid string pointer | Name: valid time | Name: valid time pointer | Name: valid uint | Name: valid uint pointer | Name: valid uint16 | Name: valid uint16 pointer | Name: valid uint32 | Name: valid uint32 pointer | Name: valid uint64 | Name: valid uint64 pointer | Name: valid uint8 | Name: valid uint8 pointer | -// | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | -// | Type: []*bool | Type: []*bool | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*string | Type: []*string | Type: []*time.Time | Type: []*time.Time | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | -// +------------------+--------------------------+---------------------+-----------------------------+---------------------+-----------------------------+------------------+-------------------------+-------------------+---------------------------+-------------------+---------------------------+-------------------+---------------------------+------------------+--------------------------+--------------------+----------------------------+-------------------------------+-------------------------------+------------------+--------------------------+--------------------+----------------------------+--------------------+----------------------------+--------------------+----------------------------+-------------------+---------------------------+ -// | true | true | 123.45600128173828 | 123.45600128173828 | 123.456 | 123.456 | 123 | 123 | 123 | 123 | 123 | 123 | 123 | 123 | 123 | 123 | foo | foo | 1970-01-01 01:00:01 +0100 BST | 1970-01-01 01:00:01 +0100 BST | 123 | 123 | 123 | 123 | 123 | 123 | 123 | 123 | 123 | 123 | -// +------------------+--------------------------+---------------------+-----------------------------+---------------------+-----------------------------+------------------+-------------------------+-------------------+---------------------------+-------------------+---------------------------+-------------------+---------------------------+------------------+--------------------------+--------------------+----------------------------+-------------------------------+-------------------------------+------------------+--------------------------+--------------------+----------------------------+--------------------+----------------------------+--------------------+----------------------------+-------------------+---------------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "TestStructToFrame/map_of_mixed_object_should_not_throw_error", - "fields": [ - { - "name": "valid bool", - "type": "boolean", - "typeInfo": { - "frame": "bool", - "nullable": true - } - }, - { - "name": "valid bool pointer", - "type": "boolean", - "typeInfo": { - "frame": "bool", - "nullable": true - } - }, - { - "name": "valid float32", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid float32 pointer", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid float64", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid float64 pointer", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid int", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid int pointer", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid int16", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid int16 pointer", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid int32", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid int32 pointer", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid int64", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid int64 pointer", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid int8", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid int8 pointer", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid string", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "valid string pointer", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "valid time", - "type": "time", - "typeInfo": { - "frame": "time.Time", - "nullable": true - } - }, - { - "name": "valid time pointer", - "type": "time", - "typeInfo": { - "frame": "time.Time", - "nullable": true - } - }, - { - "name": "valid uint", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid uint pointer", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid uint16", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid uint16 pointer", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid uint32", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid uint32 pointer", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid uint64", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid uint64 pointer", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid uint8", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid uint8 pointer", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - true - ], - [ - true - ], - [ - 123.45600128173828 - ], - [ - 123.45600128173828 - ], - [ - 123.456 - ], - [ - 123.456 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ], - [ - "foo" - ], - [ - "foo" - ], - [ - 1000 - ], - [ - 1000 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestStructToFrame/map_of_mixed_objects_should_parse_correctly.jsonc b/lib/go/anyframer/testdata/golden/TestStructToFrame/map_of_mixed_objects_should_parse_correctly.jsonc deleted file mode 100644 index c9f0ad6..0000000 --- a/lib/go/anyframer/testdata/golden/TestStructToFrame/map_of_mixed_objects_should_parse_correctly.jsonc +++ /dev/null @@ -1,361 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: TestStructToFrame/map_of_mixed_objects_should_parse_correctly -// Dimensions: 30 Fields by 1 Rows -// +------------------+--------------------------+---------------------+-----------------------------+---------------------+-----------------------------+------------------+-------------------------+-------------------+---------------------------+-------------------+---------------------------+-------------------+---------------------------+------------------+--------------------------+--------------------+----------------------------+-------------------------------+-------------------------------+------------------+--------------------------+--------------------+----------------------------+--------------------+----------------------------+--------------------+----------------------------+-------------------+---------------------------+ -// | Name: valid bool | Name: valid bool pointer | Name: valid float32 | Name: valid float32 pointer | Name: valid float64 | Name: valid float64 pointer | Name: valid int | Name: valid int pointer | Name: valid int16 | Name: valid int16 pointer | Name: valid int32 | Name: valid int32 pointer | Name: valid int64 | Name: valid int64 pointer | Name: valid int8 | Name: valid int8 pointer | Name: valid string | Name: valid string pointer | Name: valid time | Name: valid time pointer | Name: valid uint | Name: valid uint pointer | Name: valid uint16 | Name: valid uint16 pointer | Name: valid uint32 | Name: valid uint32 pointer | Name: valid uint64 | Name: valid uint64 pointer | Name: valid uint8 | Name: valid uint8 pointer | -// | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | Labels: | -// | Type: []*bool | Type: []*bool | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*string | Type: []*string | Type: []*time.Time | Type: []*time.Time | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | Type: []*float64 | -// +------------------+--------------------------+---------------------+-----------------------------+---------------------+-----------------------------+------------------+-------------------------+-------------------+---------------------------+-------------------+---------------------------+-------------------+---------------------------+------------------+--------------------------+--------------------+----------------------------+-------------------------------+-------------------------------+------------------+--------------------------+--------------------+----------------------------+--------------------+----------------------------+--------------------+----------------------------+-------------------+---------------------------+ -// | true | true | 123.45600128173828 | 123.45600128173828 | 123.456 | 123.456 | 123 | 123 | 123 | 123 | 123 | 123 | 123 | 123 | 123 | 123 | foo | foo | 1970-01-01 01:00:01 +0100 BST | 1970-01-01 01:00:01 +0100 BST | 123 | 123 | 123 | 123 | 123 | 123 | 123 | 123 | 123 | 123 | -// +------------------+--------------------------+---------------------+-----------------------------+---------------------+-----------------------------+------------------+-------------------------+-------------------+---------------------------+-------------------+---------------------------+-------------------+---------------------------+------------------+--------------------------+--------------------+----------------------------+-------------------------------+-------------------------------+------------------+--------------------------+--------------------+----------------------------+--------------------+----------------------------+--------------------+----------------------------+-------------------+---------------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "TestStructToFrame/map_of_mixed_objects_should_parse_correctly", - "fields": [ - { - "name": "valid bool", - "type": "boolean", - "typeInfo": { - "frame": "bool", - "nullable": true - } - }, - { - "name": "valid bool pointer", - "type": "boolean", - "typeInfo": { - "frame": "bool", - "nullable": true - } - }, - { - "name": "valid float32", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid float32 pointer", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid float64", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid float64 pointer", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid int", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid int pointer", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid int16", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid int16 pointer", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid int32", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid int32 pointer", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid int64", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid int64 pointer", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid int8", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid int8 pointer", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid string", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "valid string pointer", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "valid time", - "type": "time", - "typeInfo": { - "frame": "time.Time", - "nullable": true - } - }, - { - "name": "valid time pointer", - "type": "time", - "typeInfo": { - "frame": "time.Time", - "nullable": true - } - }, - { - "name": "valid uint", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid uint pointer", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid uint16", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid uint16 pointer", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid uint32", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid uint32 pointer", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid uint64", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid uint64 pointer", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid uint8", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "valid uint8 pointer", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - true - ], - [ - true - ], - [ - 123.45600128173828 - ], - [ - 123.45600128173828 - ], - [ - 123.456 - ], - [ - 123.456 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ], - [ - "foo" - ], - [ - "foo" - ], - [ - 1000 - ], - [ - 1000 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ], - [ - 123 - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestToFrame/basic_csv.jsonc b/lib/go/anyframer/testdata/golden/TestToFrame/basic_csv.jsonc deleted file mode 100644 index d923508..0000000 --- a/lib/go/anyframer/testdata/golden/TestToFrame/basic_csv.jsonc +++ /dev/null @@ -1,68 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 3 Fields by 2 Rows -// +-----------------+-----------------+-----------------+ -// | Name: a | Name: b | Name: c | -// | Labels: | Labels: | Labels: | -// | Type: []*string | Type: []*string | Type: []*string | -// +-----------------+-----------------+-----------------+ -// | 1 | 2 | 3 | -// | 4 | 5 | 6 | -// +-----------------+-----------------+-----------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "a", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "b", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "c", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "1", - "4" - ], - [ - "2", - "5" - ], - [ - "3", - "6" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestToFrame/basic_tsv.jsonc b/lib/go/anyframer/testdata/golden/TestToFrame/basic_tsv.jsonc deleted file mode 100644 index d923508..0000000 --- a/lib/go/anyframer/testdata/golden/TestToFrame/basic_tsv.jsonc +++ /dev/null @@ -1,68 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 3 Fields by 2 Rows -// +-----------------+-----------------+-----------------+ -// | Name: a | Name: b | Name: c | -// | Labels: | Labels: | Labels: | -// | Type: []*string | Type: []*string | Type: []*string | -// +-----------------+-----------------+-----------------+ -// | 1 | 2 | 3 | -// | 4 | 5 | 6 | -// +-----------------+-----------------+-----------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "a", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "b", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "c", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "1", - "4" - ], - [ - "2", - "5" - ], - [ - "3", - "6" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestToFrame/nested_json.jsonc b/lib/go/anyframer/testdata/golden/TestToFrame/nested_json.jsonc deleted file mode 100644 index 91456de..0000000 --- a/lib/go/anyframer/testdata/golden/TestToFrame/nested_json.jsonc +++ /dev/null @@ -1,42 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 1 Fields by 1 Rows -// +----------------------------------------------------------------------------------------------------------+ -// | Name: users | -// | Labels: | -// | Type: []*string | -// +----------------------------------------------------------------------------------------------------------+ -// | [{"name":"foo","salary":123,"self_employed":false},{"name":"bar","salary":456.789,"self_employed":true}] | -// +----------------------------------------------------------------------------------------------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "users", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "[{\"name\":\"foo\",\"salary\":123,\"self_employed\":false},{\"name\":\"bar\",\"salary\":456.789,\"self_employed\":true}]" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestToFrame/simple_boolean_array.jsonc b/lib/go/anyframer/testdata/golden/TestToFrame/simple_boolean_array.jsonc deleted file mode 100644 index d7bb077..0000000 --- a/lib/go/anyframer/testdata/golden/TestToFrame/simple_boolean_array.jsonc +++ /dev/null @@ -1,44 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 1 Fields by 2 Rows -// +----------------+ -// | Name: response | -// | Labels: | -// | Type: []*bool | -// +----------------+ -// | false | -// | true | -// +----------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "response", - "type": "boolean", - "typeInfo": { - "frame": "bool", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - false, - true - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestToFrame/simple_html.jsonc b/lib/go/anyframer/testdata/golden/TestToFrame/simple_html.jsonc deleted file mode 100644 index 961763d..0000000 --- a/lib/go/anyframer/testdata/golden/TestToFrame/simple_html.jsonc +++ /dev/null @@ -1,42 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 1 Fields by 1 Rows -// +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -// | Name: html | -// | Labels: | -// | Type: []*string | -// +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -// | {"body":{"table":{"-class":"table table-bordered table-hover table-condensed","tbody":{"tr":[{"td":["foo",{"#content":"123","-align":"right"},"false"]},{"td":["bar",{"#content":"456.789","-align":"right"},"true"]}]},"thead":{"tr":{"th":[{"#content":"name","-title":"Field #1"},{"#content":"salary","-title":"Field #2"},{"#content":"self_employed","-title":"Field #3"}]}}}}} | -// +---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "html", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "{\"body\":{\"table\":{\"-class\":\"table table-bordered table-hover table-condensed\",\"tbody\":{\"tr\":[{\"td\":[\"foo\",{\"#content\":\"123\",\"-align\":\"right\"},\"false\"]},{\"td\":[\"bar\",{\"#content\":\"456.789\",\"-align\":\"right\"},\"true\"]}]},\"thead\":{\"tr\":{\"th\":[{\"#content\":\"name\",\"-title\":\"Field #1\"},{\"#content\":\"salary\",\"-title\":\"Field #2\"},{\"#content\":\"self_employed\",\"-title\":\"Field #3\"}]}}}}}" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestToFrame/simple_html_with_root_selector.jsonc b/lib/go/anyframer/testdata/golden/TestToFrame/simple_html_with_root_selector.jsonc deleted file mode 100644 index 8e2d2fa..0000000 --- a/lib/go/anyframer/testdata/golden/TestToFrame/simple_html_with_root_selector.jsonc +++ /dev/null @@ -1,44 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 1 Fields by 2 Rows -// +--------------------------------------------------------+ -// | Name: td | -// | Labels: | -// | Type: []*string | -// +--------------------------------------------------------+ -// | ["foo",{"#content":"123","-align":"right"},"false"] | -// | ["bar",{"#content":"456.789","-align":"right"},"true"] | -// +--------------------------------------------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "td", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "[\"foo\",{\"#content\":\"123\",\"-align\":\"right\"},\"false\"]", - "[\"bar\",{\"#content\":\"456.789\",\"-align\":\"right\"},\"true\"]" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestToFrame/simple_numeric_array.jsonc b/lib/go/anyframer/testdata/golden/TestToFrame/simple_numeric_array.jsonc deleted file mode 100644 index e0514c4..0000000 --- a/lib/go/anyframer/testdata/golden/TestToFrame/simple_numeric_array.jsonc +++ /dev/null @@ -1,44 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 1 Fields by 2 Rows -// +------------------+ -// | Name: response | -// | Labels: | -// | Type: []*float64 | -// +------------------+ -// | 123 | -// | 456.789 | -// +------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "response", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - 123, - 456.789 - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestToFrame/simple_object_array.jsonc b/lib/go/anyframer/testdata/golden/TestToFrame/simple_object_array.jsonc deleted file mode 100644 index 4881cbf..0000000 --- a/lib/go/anyframer/testdata/golden/TestToFrame/simple_object_array.jsonc +++ /dev/null @@ -1,68 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 3 Fields by 2 Rows -// +-----------------+------------------+---------------------+ -// | Name: name | Name: salary | Name: self_employed | -// | Labels: | Labels: | Labels: | -// | Type: []*string | Type: []*float64 | Type: []*bool | -// +-----------------+------------------+---------------------+ -// | foo | 123 | false | -// | bar | 456.789 | true | -// +-----------------+------------------+---------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "name", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "salary", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - }, - { - "name": "self_employed", - "type": "boolean", - "typeInfo": { - "frame": "bool", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "foo", - "bar" - ], - [ - 123, - 456.789 - ], - [ - false, - true - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestToFrame/simple_string_array.jsonc b/lib/go/anyframer/testdata/golden/TestToFrame/simple_string_array.jsonc deleted file mode 100644 index 2cd9c3b..0000000 --- a/lib/go/anyframer/testdata/golden/TestToFrame/simple_string_array.jsonc +++ /dev/null @@ -1,44 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 1 Fields by 2 Rows -// +-----------------+ -// | Name: response | -// | Labels: | -// | Type: []*string | -// +-----------------+ -// | foo | -// | bar | -// +-----------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "response", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "foo", - "bar" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestToFrame/simple_xml.jsonc b/lib/go/anyframer/testdata/golden/TestToFrame/simple_xml.jsonc deleted file mode 100644 index 41d71db..0000000 --- a/lib/go/anyframer/testdata/golden/TestToFrame/simple_xml.jsonc +++ /dev/null @@ -1,42 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 1 Fields by 1 Rows -// +--------------------------------------------------------------------------------------------------------------------------+ -// | Name: root | -// | Labels: | -// | Type: []*string | -// +--------------------------------------------------------------------------------------------------------------------------+ -// | {"row":[{"name":"foo","salary":"123","self_employed":"false"},{"name":"bar","salary":"456.789","self_employed":"true"}]} | -// +--------------------------------------------------------------------------------------------------------------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "root", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "{\"row\":[{\"name\":\"foo\",\"salary\":\"123\",\"self_employed\":\"false\"},{\"name\":\"bar\",\"salary\":\"456.789\",\"self_employed\":\"true\"}]}" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestToFrame/simple_xml_with_root_selector.jsonc b/lib/go/anyframer/testdata/golden/TestToFrame/simple_xml_with_root_selector.jsonc deleted file mode 100644 index 4c1ebca..0000000 --- a/lib/go/anyframer/testdata/golden/TestToFrame/simple_xml_with_root_selector.jsonc +++ /dev/null @@ -1,68 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 3 Fields by 2 Rows -// +-----------------+-----------------+---------------------+ -// | Name: name | Name: salary | Name: self_employed | -// | Labels: | Labels: | Labels: | -// | Type: []*string | Type: []*string | Type: []*string | -// +-----------------+-----------------+---------------------+ -// | foo | 123 | false | -// | bar | 456.789 | true | -// +-----------------+-----------------+---------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "name", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "salary", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - }, - { - "name": "self_employed", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "foo", - "bar" - ], - [ - "123", - "456.789" - ], - [ - "false", - "true" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestToFrame/single_boolean.jsonc b/lib/go/anyframer/testdata/golden/TestToFrame/single_boolean.jsonc deleted file mode 100644 index c84d47a..0000000 --- a/lib/go/anyframer/testdata/golden/TestToFrame/single_boolean.jsonc +++ /dev/null @@ -1,42 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 1 Fields by 1 Rows -// +----------------+ -// | Name: response | -// | Labels: | -// | Type: []*bool | -// +----------------+ -// | true | -// +----------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "response", - "type": "boolean", - "typeInfo": { - "frame": "bool", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - true - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestToFrame/single_number.jsonc b/lib/go/anyframer/testdata/golden/TestToFrame/single_number.jsonc deleted file mode 100644 index 4138813..0000000 --- a/lib/go/anyframer/testdata/golden/TestToFrame/single_number.jsonc +++ /dev/null @@ -1,42 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 1 Fields by 1 Rows -// +------------------+ -// | Name: response | -// | Labels: | -// | Type: []*float64 | -// +------------------+ -// | 123.456 | -// +------------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "response", - "type": "number", - "typeInfo": { - "frame": "float64", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - 123.456 - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestToFrame/single_string.jsonc b/lib/go/anyframer/testdata/golden/TestToFrame/single_string.jsonc deleted file mode 100644 index aabc3ea..0000000 --- a/lib/go/anyframer/testdata/golden/TestToFrame/single_string.jsonc +++ /dev/null @@ -1,42 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 1 Fields by 1 Rows -// +-----------------+ -// | Name: response | -// | Labels: | -// | Type: []*string | -// +-----------------+ -// | hello | -// +-----------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "response", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "hello" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestToFrame/single_string_without_quotes.jsonc b/lib/go/anyframer/testdata/golden/TestToFrame/single_string_without_quotes.jsonc deleted file mode 100644 index 4fbcfbc..0000000 --- a/lib/go/anyframer/testdata/golden/TestToFrame/single_string_without_quotes.jsonc +++ /dev/null @@ -1,42 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 1 Fields by 1 Rows -// +-----------------+ -// | Name: response | -// | Labels: | -// | Type: []*string | -// +-----------------+ -// | hello world | -// +-----------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "response", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "hello world" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/golden/TestToFrame/single_string_without_quotes_and_numeric_values.jsonc b/lib/go/anyframer/testdata/golden/TestToFrame/single_string_without_quotes_and_numeric_values.jsonc deleted file mode 100644 index a0f2563..0000000 --- a/lib/go/anyframer/testdata/golden/TestToFrame/single_string_without_quotes_and_numeric_values.jsonc +++ /dev/null @@ -1,42 +0,0 @@ -// 🌟 This was machine generated. Do not edit. 🌟 -// -// Frame[0] -// Name: response -// Dimensions: 1 Fields by 1 Rows -// +-----------------+ -// | Name: response | -// | Labels: | -// | Type: []*string | -// +-----------------+ -// | hello 123 world | -// +-----------------+ -// -// -// 🌟 This was machine generated. Do not edit. 🌟 -{ - "status": 200, - "frames": [ - { - "schema": { - "name": "response", - "fields": [ - { - "name": "response", - "type": "string", - "typeInfo": { - "frame": "string", - "nullable": true - } - } - ] - }, - "data": { - "values": [ - [ - "hello 123 world" - ] - ] - } - } - ] -} \ No newline at end of file diff --git a/lib/go/anyframer/testdata/json/address.json b/lib/go/anyframer/testdata/json/address.json deleted file mode 100644 index c14398f..0000000 --- a/lib/go/anyframer/testdata/json/address.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "FirstName": "Fred", - "Surname": "Smith", - "Age": 28, - "Address": { - "Street": "Hursley Park", - "City": "Winchester", - "Postcode": "SO21 2JN" - }, - "Phone": [ - { - "type": "home", - "number": "0203 544 1234" - }, - { - "type": "office", - "number": "01962 001234" - }, - { - "type": "office", - "number": "01962 001235" - }, - { - "type": "mobile", - "number": "077 7700 1234" - } - ], - "Email": [ - { - "type": "office", - "address": ["fred.smith@my-work.com", "fsmith@my-work.com"] - }, - { - "type": "home", - "address": ["freddy@my-social.com", "frederic.smith@very-serious.com"] - } - ], - "Other": { - "Over 18 ?": true, - "Misc": null, - "Alternative.Address": { - "Street": "Brick Lane", - "City": "London", - "Postcode": "E1 6RF" - } - } -} diff --git a/lib/go/anyframer/testdata/json/boolean-array.json b/lib/go/anyframer/testdata/json/boolean-array.json deleted file mode 100644 index ca75414..0000000 --- a/lib/go/anyframer/testdata/json/boolean-array.json +++ /dev/null @@ -1 +0,0 @@ -[false, true, false] diff --git a/lib/go/anyframer/testdata/json/boolean.json b/lib/go/anyframer/testdata/json/boolean.json deleted file mode 100644 index 27ba77d..0000000 --- a/lib/go/anyframer/testdata/json/boolean.json +++ /dev/null @@ -1 +0,0 @@ -true diff --git a/lib/go/anyframer/testdata/json/invoice.json b/lib/go/anyframer/testdata/json/invoice.json deleted file mode 100644 index 8e1bb33..0000000 --- a/lib/go/anyframer/testdata/json/invoice.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "Account": { - "Account Name": "Firefly", - "Order": [ - { - "OrderID": "order103", - "Product": [ - { - "Product Name": "Bowler Hat", - "ProductID": 858383, - "SKU": "0406654608", - "Description": { - "Colour": "Purple", - "Width": 300, - "Height": 200, - "Depth": 210, - "Weight": 0.75 - }, - "Price": 34.45, - "Quantity": 2 - }, - { - "Product Name": "Trilby hat", - "ProductID": 858236, - "SKU": "0406634348", - "Description": { - "Colour": "Orange", - "Width": 300, - "Height": 200, - "Depth": 210, - "Weight": 0.6 - }, - "Price": 21.67, - "Quantity": 1 - } - ] - }, - { - "OrderID": "order104", - "Product": [ - { - "Product Name": "Bowler Hat", - "ProductID": 858383, - "SKU": "040657863", - "Description": { - "Colour": "Purple", - "Width": 300, - "Height": 200, - "Depth": 210, - "Weight": 0.75 - }, - "Price": 34.45, - "Quantity": 4 - }, - { - "ProductID": 345664, - "SKU": "0406654603", - "Product Name": "Cloak", - "Description": { - "Colour": "Black", - "Width": 30, - "Height": 20, - "Depth": 210, - "Weight": 2 - }, - "Price": 107.99, - "Quantity": 1 - } - ] - } - ] - } -} diff --git a/lib/go/anyframer/testdata/json/library.json b/lib/go/anyframer/testdata/json/library.json deleted file mode 100644 index 37b4422..0000000 --- a/lib/go/anyframer/testdata/json/library.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "library": { - "books": [ - { - "title": "Structure and Interpretation of Computer Programs", - "authors": ["Abelson", "Sussman"], - "isbn": "9780262510875", - "price": 38.9, - "copies": 2 - }, - { - "title": "The C Programming Language", - "authors": ["Kernighan", "Richie"], - "isbn": "9780131103627", - "price": 33.59, - "copies": 3 - }, - { - "title": "The AWK Programming Language", - "authors": ["Aho", "Kernighan", "Weinberger"], - "isbn": "9780201079814", - "copies": 1 - }, - { - "title": "Compilers: Principles, Techniques, and Tools", - "authors": ["Aho", "Lam", "Sethi", "Ullman"], - "isbn": "9780201100884", - "price": 23.38, - "copies": 1 - } - ], - "loans": [ - { - "customer": "10001", - "isbn": "9780262510875", - "return": "2016-12-05" - }, - { - "customer": "10003", - "isbn": "9780201100884", - "return": "2016-10-22" - }, - { - "customer": "10003", - "isbn": "9780262510875", - "return": "2016-12-22" - } - ], - "customers": [ - { - "id": "10001", - "name": "Joe Doe", - "address": { - "street": "2 Long Road", - "city": "Winchester", - "postcode": "SO22 5PU" - } - }, - { - "id": "10002", - "name": "Fred Bloggs", - "address": { - "street": "56 Letsby Avenue", - "city": "Winchester", - "postcode": "SO22 4WD" - } - }, - { - "id": "10003", - "name": "Jason Arthur", - "address": { - "street": "1 Preddy Gate", - "city": "Southampton", - "postcode": "SO14 0MG" - } - } - ] - } -} diff --git a/lib/go/anyframer/testdata/json/number-array.json b/lib/go/anyframer/testdata/json/number-array.json deleted file mode 100644 index 778b2bb..0000000 --- a/lib/go/anyframer/testdata/json/number-array.json +++ /dev/null @@ -1 +0,0 @@ -[123, 456.789, -123.456] diff --git a/lib/go/anyframer/testdata/json/number.json b/lib/go/anyframer/testdata/json/number.json deleted file mode 100644 index d5910a0..0000000 --- a/lib/go/anyframer/testdata/json/number.json +++ /dev/null @@ -1 +0,0 @@ -123.456 diff --git a/lib/go/anyframer/testdata/json/org.json b/lib/go/anyframer/testdata/json/org.json deleted file mode 100644 index 2f8e15e..0000000 --- a/lib/go/anyframer/testdata/json/org.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "name": "Any Framer Org", - "business_type": "Software Development", - "is_public": false, - "employees": [ - { - "id": "leanne_graham", - "name": { - "fullname": "Leanne Graham" - }, - "age": 38, - "skills": ["devops", "grafana", "kubernetes"], - "country": "USA", - "occupation": "Devops Engineer", - "salary": 3000 - }, - { - "id": "ervin_howell", - "name": { - "fullname": "Ervin Howell" - }, - "age": 27, - "skills": ["python", "java", "grafana"], - "country": "USA", - "occupation": "Software Engineer", - "salary": 2300 - }, - { - "id": "clementine_bauch", - "name": { - "fullname": "Clementine_Bauch" - }, - "age": 17, - "country": "Canada", - "occupation": "Student", - "salary": null - }, - { - "id": "patricia_lebsack", - "name": { - "fullname": "Patricia Lebsack" - }, - "age": 42, - "country": "UK", - "skills": ["python", "kubernetes"], - "occupation": "Software Engineer", - "salary": 2800 - }, - { - "id": "leanne_bell", - "name": { - "fullname": "Leanne Bell" - }, - "age": 38, - "country": "USA", - "skills": ["python", "kubernetes", "grafana", "scrum"], - "occupation": "Senior Software Engineer", - "salary": 4000 - }, - { - "id": "chelsey_dietrich", - "name": { - "firstname": "Chelsey", - "lastname": "Dietrich" - }, - "age": 32, - "country": "USA", - "skills": ["golang", "kubernetes"], - "occupation": "Software Engineer", - "salary": 3500 - } - ] -} diff --git a/lib/go/anyframer/testdata/json/string-array.json b/lib/go/anyframer/testdata/json/string-array.json deleted file mode 100644 index b13d054..0000000 --- a/lib/go/anyframer/testdata/json/string-array.json +++ /dev/null @@ -1 +0,0 @@ -["apple", "ball", "cat"] diff --git a/lib/go/anyframer/testdata/json/string.json b/lib/go/anyframer/testdata/json/string.json deleted file mode 100644 index cd4bc1a..0000000 --- a/lib/go/anyframer/testdata/json/string.json +++ /dev/null @@ -1 +0,0 @@ -"hello world" diff --git a/lib/go/anyframer/testdata/json/user.json b/lib/go/anyframer/testdata/json/user.json deleted file mode 100644 index 234302e..0000000 --- a/lib/go/anyframer/testdata/json/user.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "user_id": "foo_bar", - "name": { - "first_name": "foo", - "last_name": "bar" - }, - "age": 32, - "salary": 123.456, - "hobbies": ["swimming", "cycling"], - "address": { - "door_no": 35, - "street": "High Road, Canary wharf", - "city": "London", - "county": null, - "country": "United Kingdom", - "postcode": "ABC 123" - }, - "phone": "+0-12345-67890", - "websites": [ - { "kind": "blog", "url": "https://foo_bars_blog.blog" }, - { "kind": "twitter", "url": "https://twitter.com" }, - { "kind": "github", "url": "https://github.com" } - ] -} diff --git a/lib/go/anyframer/testdata/json/users.json b/lib/go/anyframer/testdata/json/users.json deleted file mode 100644 index b134fed..0000000 --- a/lib/go/anyframer/testdata/json/users.json +++ /dev/null @@ -1,49 +0,0 @@ -[ - { - "user_id": "foo_bar", - "name": { - "first_name": "foo", - "last_name": "bar" - }, - "age": 32, - "salary": 123.456, - "hobbies": ["swimming", "cycling"], - "address": { - "door_no": 35, - "street": "High Road, Canary wharf", - "city": "London", - "county": null, - "country": "United Kingdom", - "postcode": "ABC 123" - }, - "phone": "+0-12345-67890", - "websites": [ - { "kind": "blog", "url": "https://foo_bars_blog.blog" }, - { "kind": "twitter", "url": "https://twitter.com" }, - { "kind": "github", "url": "https://github.com" } - ] - }, - { - "user_id": "alpha_beta", - "name": { - "first_name": "alpha", - "last_name": "beta" - }, - "age": 18, - "isPremimum": true, - "address": { - "door_no": 135, - "street": "Somewhere, Nowhere", - "city": "New York", - "county": null, - "country": "USA", - "postcode": "123456" - }, - "phone": "+1-12345-67890", - "websites": [ - { "kind": "blog", "url": "https://alphas_blog.blog" }, - { "kind": "twitter", "url": "https://twitter.com" }, - { "kind": "github", "url": "https://github.com" } - ] - } -] diff --git a/lib/go/anyframer/testing_test.go b/lib/go/anyframer/testing_test.go deleted file mode 100644 index d687388..0000000 --- a/lib/go/anyframer/testing_test.go +++ /dev/null @@ -1,3 +0,0 @@ -package anyframer_test - -const updateGoldenFile = false diff --git a/lib/go/anyframer/timeUtils.go b/lib/go/anyframer/timeUtils.go deleted file mode 100644 index 5cc0ebb..0000000 --- a/lib/go/anyframer/timeUtils.go +++ /dev/null @@ -1,35 +0,0 @@ -package anyframer - -import ( - "fmt" - "strings" - "time" -) - -var possibleDateFormats = []string{"2006-01-02", "2006-1-2", "2006/01/02", "2006/1/2", "01/02/2006", "1/2/2006"} -var possibleDateTimeSeparators = []string{"T", " "} -var possibleTimeFormats = []string{"", "15:04", "15:04:05.999999", "15:04:05.999999Z", "15:04:05.999999 -07:00", "15:04:05 MST"} - -func getTimeFromString(input string, timeFormat string) *time.Time { - if timeFormat == "auto" { - timeFormat = "" - } - var possibleLayouts = []string{time.RFC3339, "2006", timeFormat} - for _, d := range possibleDateFormats { - for _, t := range possibleTimeFormats { - for _, s := range possibleDateTimeSeparators { - l := strings.TrimSpace(fmt.Sprintf("%s%s%s", d, s, t)) - if l != "" && !strings.HasSuffix(l, " T") { - possibleLayouts = append(possibleLayouts, l) - } - } - } - } - possibleLayouts = append(possibleLayouts, "2006-01", "2006/01", "01-2006", "01/2006") - for _, layout := range possibleLayouts { - if t, err := time.Parse(layout, input); err == nil && layout != "" { - return &t - } - } - return nil -} diff --git a/lib/go/anyframer/utils.go b/lib/go/anyframer/utils.go deleted file mode 100644 index 48f9ab4..0000000 --- a/lib/go/anyframer/utils.go +++ /dev/null @@ -1,103 +0,0 @@ -package anyframer - -import ( - "sort" - "time" -) - -func sortedKeys(in any) []string { - if input, ok := in.(map[string]any); ok { - keys := make([]string, len(input)) - var idx int - for key := range input { - keys[idx] = key - idx++ - } - sort.Strings(keys) - return keys - } - if input, ok := in.(map[string]map[int]any); ok { - keys := make([]string, len(input)) - var idx int - for key := range input { - keys[idx] = key - idx++ - } - sort.Strings(keys) - return keys - } - return []string{} -} - -func ToPointer(value any) any { - if value == nil { - return nil - } - switch v := value.(type) { - case int: - return &v - case *int: - return value - case int8: - return &v - case *int8: - return value - case int16: - return &v - case *int16: - return value - case int32: - return &v - case *int32: - return value - case int64: - return &v - case *int64: - return value - case uint: - return &v - case *uint: - return value - case uint8: - return &v - case *uint8: - return value - case uint16: - return &v - case *uint16: - return value - case uint32: - return &v - case *uint32: - return value - case uint64: - return &v - case *uint64: - return value - case float32: - return &v - case *float32: - return value - case float64: - return &v - case *float64: - return value - case string: - return &v - case *string: - return value - case bool: - return &v - case *bool: - return value - case time.Time: - return &v - case *time.Time: - return value - default: - noop(value) - return nil - } -} - -func noop(x any) {} diff --git a/package.json b/package.json index 91d8f1c..bc6ca7d 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "scripts": { "tidy": "turbo run tidy", "test": "turbo run test:backend", + "watch": "turbo watch test:backend", "spellcheck": "cspell -c cspell.config.json \"**/*.{ts,tsx,js,go,md,mdx,yml,yaml,json,scss,css}\"" }, "packageManager": "yarn@1.22.22",