Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: generate code & bump to golang 1.21 #316

Merged
merged 6 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,29 +36,29 @@ version: 2
jobs:
generate-schema:
docker:
- image: circleci/golang:1.16
- image: cimg/go:1.22
environment:
GOLANG_VERSION: "1.16"
GOLANG_VERSION: "1.22"
steps:
- checkout
- restore_cache:
key: dependency-cache-1.16{{ checksum "go.sum" }}
key: dependency-cache-1.22{{ checksum "go.sum" }}
- run: ./schema/generate.sh

golang-1.16:
golang-1.22:
requires:
- generate-schema
docker:
- image: cimg/go:1.16
- image: cimg/go:1.22
environment:
GOLANG_VERSION: "1.16"
GOLANG_VERSION: "1.22"
steps:
- checkout
- restore_cache:
key: dependency-cache-1.16{{ checksum "go.sum" }}
key: dependency-cache-1.22{{ checksum "go.sum" }}
- run: *build
- save_cache:
key: dependency-cache-1.16{{ checksum "go.sum" }}
key: dependency-cache-1.22{{ checksum "go.sum" }}
paths:
- "/go/pkg/mod"
- run: *lint
Expand All @@ -67,20 +67,20 @@ jobs:
- run: go test -v -race ./release/verval
- run: *examples

golang-1.17:
golang-1.21:
requires:
- generate-schema
docker:
- image: cimg/go:1.17
- image: cimg/go:1.21
environment:
GOLANG_VERSION: "1.17"
GOLANG_VERSION: "1.21"
steps:
- checkout
- restore_cache:
key: dependency-cache-1.17{{ checksum "go.sum" }}
key: dependency-cache-1.21{{ checksum "go.sum" }}
- run: *build
- save_cache:
key: dependency-cache-1.17{{ checksum "go.sum" }}
key: dependency-cache-1.21{{ checksum "go.sum" }}
paths:
- "/go/pkg/mod"
- run: *lint
Expand All @@ -89,20 +89,20 @@ jobs:
- run: go test -v -race ./release/verval
- run: *examples

golang-1.18:
golang-1.20:
requires:
- generate-schema
docker:
- image: cimg/go:1.18
- image: cimg/go:1.20
environment:
GOLANG_VERSION: "1.18"
GOLANG_VERSION: "1.20"
steps:
- checkout
- restore_cache:
key: dependency-cache-1.18{{ checksum "go.sum" }}
key: dependency-cache-1.20{{ checksum "go.sum" }}
- run: *build
- save_cache:
key: dependency-cache-1.18{{ checksum "go.sum" }}
key: dependency-cache-1.20{{ checksum "go.sum" }}
paths:
- "/go/pkg/mod"
- run: *lint
Expand All @@ -116,17 +116,17 @@ workflows:
build:
jobs:
- generate-schema
- golang-1.16:
- golang-1.22:
filters:
tags:
only:
- /v.*/
- golang-1.17:
- golang-1.21:
filters:
tags:
only:
- /v.*/
- golang-1.18:
- golang-1.20:
filters:
tags:
only:
Expand Down
126 changes: 89 additions & 37 deletions api-spec.json

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions dialer.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ type (
// DialRaw establishes a connection to Qlik Associative Engine using the settings set in the Dialer.
// The returned remote object points to the Global object of the session with handle -1.
// DialRaw can be used with custom specifications by wrapping the returned RemoteObject in a generated schema type like so:
// remoteObject, err := enigma.Dialer{}.DialRaw(ctx, "ws://...", nil)
// mySpecialGlobal := &specialSchemaPackage.SpecialGlobal{RemoteObject: remoteObject}
//
// remoteObject, err := enigma.Dialer{}.DialRaw(ctx, "ws://...", nil)
// mySpecialGlobal := &specialSchemaPackage.SpecialGlobal{RemoteObject: remoteObject}
func (dialer Dialer) DialRaw(ctx context.Context, url string, httpHeader http.Header) (*RemoteObject, error) {
// Set empty http header if omitted
if httpHeader == nil {
Expand Down
2 changes: 1 addition & 1 deletion dialer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"github.com/stretchr/testify/assert"
)

//This example shows how to connect to a locally running Qlik Associative Engine, print the version number and disconnect again.
// This example shows how to connect to a locally running Qlik Associative Engine, print the version number and disconnect again.
func Example() {
ctx := context.Background()
global, err := enigma.Dialer{}.Dial(ctx, "ws://localhost:9076", nil)
Expand Down
4 changes: 2 additions & 2 deletions doc.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Package enigma is a library that helps you communicate with Qlik Associative Engine.
// Examples of use may be building your own analytics tools, back-end services, or other tools communicating with Qlik Associative Engine.
//
// Schemas
// # Schemas
//
// enigma-go includes generated API code that is based on the latest available Qlik Associative Engine schema.
// When a new schema is available a new version of enigma-go will be made available
//
// Getting started
// # Getting started
//
// Connecting to Qlik Associative Engine and intreract with a document/app involves at least the following steps:
//
Expand Down
4 changes: 2 additions & 2 deletions float.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"strconv"
)

//Float64 is an enigma-go equivalent of float64 which adds support for the Qlik Associative Engine specific way of marshalling and unmarshalling "Infinity", "-Infinity" and "NaN" as json strings.
//It can always safely be typecasted to plain float64 including these special cases.
// Float64 is an enigma-go equivalent of float64 which adds support for the Qlik Associative Engine specific way of marshalling and unmarshalling "Infinity", "-Infinity" and "NaN" as json strings.
// It can always safely be typecasted to plain float64 including these special cases.
type Float64 float64

// UnmarshalJSON implements the Unmarshaler interface for custom unmarshalling.
Expand Down
15 changes: 10 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
module github.com/qlik-oss/enigma-go/v4

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/goccy/go-json v0.10.2
github.com/golang-jwt/jwt/v4 v4.2.0
github.com/gorilla/websocket v1.5.0
github.com/jaytaylor/html2text v0.0.0-20230321000545-74c2419ad056
github.com/mattn/go-runewidth v0.0.4 // indirect
github.com/olekukonko/tablewriter v0.0.1 // indirect
github.com/pkg/errors v0.9.1
github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf // indirect
github.com/stretchr/testify v1.7.0
golang.org/x/net v0.7.0
)

go 1.13
require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/mattn/go-runewidth v0.0.4 // indirect
github.com/olekukonko/tablewriter v0.0.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf // indirect
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c // indirect
)

go 1.21
26 changes: 0 additions & 26 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -22,34 +22,8 @@ github.com/ssor/bom v0.0.0-20170718123548-6386211fdfcf/go.mod h1:RJID2RhlZKId02n
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
golang.org/x/net v0.7.0 h1:rJrUqqhjsgNp7KqAIc25s9pZnjU7TUcSY7HcVZjdn1g=
golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
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.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
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.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
Expand Down
2 changes: 1 addition & 1 deletion qix_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func ensureEncodable(val interface{}) interface{} {
}
}

//Translates byte arrays into json.RawMessage
// Translates byte arrays into json.RawMessage
func ensureAllEncodable(params []interface{}) []interface{} {
result := make([]interface{}, len(params), len(params))
for i := range params {
Expand Down
Loading
Loading