Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
MathieuGilet committed Oct 16, 2024
1 parent 3122439 commit 8edd05c
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
install:
go build -o ~/.steampipe/plugins/hub.steampipe.io/plugins/1024pix/metabase@latest/steampipe-plugin-metabase.plugin *.go
go build -o ~/.steampipe/plugins/hub.steampipe.io/plugins/1024pix/metabase@ce6b0f9ad22647ca6321fb2c9bfa21169eed5861/steampipe-plugin-metabase.plugin *.go
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.22.4
toolchain go1.23.1

require (
github.com/1024pix/go-metabase v1.2.1
github.com/1024pix/go-metabase v1.2.2-0.20241016140730-0ae2fe27b22c
github.com/grokify/goauth v0.20.12
github.com/turbot/steampipe-plugin-sdk/v5 v5.10.4
)
Expand Down
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ github.com/1024pix/go-metabase v1.2.0 h1:kLtX1RVss66o4NeYXI6gVEXBnNtl3QbQ+vbrKQR
github.com/1024pix/go-metabase v1.2.0/go.mod h1:wBjwHqp2yUhtJgUSWoiNb+oq8n3XIlQIIRpzEvo/yE0=
github.com/1024pix/go-metabase v1.2.1 h1:0qmZdkEwpcElKZ7wmwrENtp2ZV3hlzCabc7yRgzNp1s=
github.com/1024pix/go-metabase v1.2.1/go.mod h1:wBjwHqp2yUhtJgUSWoiNb+oq8n3XIlQIIRpzEvo/yE0=
github.com/1024pix/go-metabase v1.2.2-0.20241016132446-a8541f68dd3c h1:8xvPOBWmWzBW90uUmzTUxI9TkagUYXRO66qw0wt3Q7Q=
github.com/1024pix/go-metabase v1.2.2-0.20241016132446-a8541f68dd3c/go.mod h1:wBjwHqp2yUhtJgUSWoiNb+oq8n3XIlQIIRpzEvo/yE0=
github.com/1024pix/go-metabase v1.2.2-0.20241016140730-0ae2fe27b22c h1:aE5IMX/5pVtVRRFXq7W3RtQAlZRq5pzE7qEIl/KQI4A=
github.com/1024pix/go-metabase v1.2.2-0.20241016140730-0ae2fe27b22c/go.mod h1:wBjwHqp2yUhtJgUSWoiNb+oq8n3XIlQIIRpzEvo/yE0=
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
Expand Down
9 changes: 7 additions & 2 deletions metabase/table_metabase_permission.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import (
"context"
"fmt"
"strconv"
"encoding/json"

go_kit "github.com/turbot/go-kit/types"
"github.com/1024pix/go-metabase/metabase"
"github.com/turbot/steampipe-plugin-sdk/v5/grpc/proto"
"github.com/turbot/steampipe-plugin-sdk/v5/plugin"
Expand All @@ -15,7 +17,7 @@ type Permission struct {
GroupID int
DbId int
ViewData *string
CreateQueries *string
CreateQueries *interface{}
}

func tableMetabasePermission() *plugin.Table {
Expand Down Expand Up @@ -94,11 +96,14 @@ func createPermission(methodCallStack string, ctx context.Context, groups *map[s
return nil, err
}

var createQueries interface{}
json.Unmarshal([]byte(go_kit.SafeString(data.CreateQueries)), &createQueries)

permissions = append(permissions, Permission{
GroupID: gId,
DbId: dId,
ViewData: data.ViewData,
CreateQueries: data.CreateQueries,
CreateQueries: createQueries,

Check failure on line 106 in metabase/table_metabase_permission.go

View workflow job for this annotation

GitHub Actions / build

cannot use createQueries (variable of type interface{}) as *interface{} value in struct literal: interface{} does not implement *interface{} (type *interface{} is pointer to interface, not interface)
})
}
}
Expand Down

0 comments on commit 8edd05c

Please sign in to comment.