Skip to content

Commit 8e6c7ea

Browse files
committed
feat: add list tables
1 parent a4f30ba commit 8e6c7ea

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ require (
1616
github.com/jackc/pgtype v1.14.0
1717
github.com/nats-io/nats.go v1.36.0
1818
github.com/opengovern/og-util v1.7.2
19-
github.com/opengovern/opencomply v0.0.0-20250115121742-8f098cd41cc1
19+
github.com/opengovern/opencomply v0.0.0-20250115135113-a7dc767fb942
2020
github.com/opengovern/resilient-bridge v0.0.0-20241223164127-85ad8f42a67d
2121
github.com/shurcooL/githubv4 v0.0.0-20240727222349-48295856cce7
2222
github.com/spf13/cobra v1.8.1

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -741,6 +741,8 @@ github.com/opengovern/og-util v1.7.2 h1:eLGgqSHQmYuSehRBXJcn61pD7uslCzZe9wbwJaEK
741741
github.com/opengovern/og-util v1.7.2/go.mod h1:ob8RSaNZG3RWnLH3lDXQaVpIf+B8Ry7ds3twYlDJPp0=
742742
github.com/opengovern/opencomply v0.0.0-20250115121742-8f098cd41cc1 h1:W0LSq51JIDJi2kPwg+8ElsQHe8I74XEP9tfEAB6IFKI=
743743
github.com/opengovern/opencomply v0.0.0-20250115121742-8f098cd41cc1/go.mod h1:DCq6ryCRpy85BFP/bEfz/HS0O8oEsU4l/cl9IoDVj/o=
744+
github.com/opengovern/opencomply v0.0.0-20250115135113-a7dc767fb942 h1:EwxeWdEVYfqYyTs05yurHA6nOki8ZdVKiEot3AF0/sg=
745+
github.com/opengovern/opencomply v0.0.0-20250115135113-a7dc767fb942/go.mod h1:DCq6ryCRpy85BFP/bEfz/HS0O8oEsU4l/cl9IoDVj/o=
744746
github.com/opengovern/opencomply v0.582.4-dev.0.0.20250110161755-c56630852bf4 h1:yKyA73PTmg1uGlofJp8zMbK5OPCV+2B4cOmTANQvfHI=
745747
github.com/opengovern/opencomply v0.582.4-dev.0.0.20250110161755-c56630852bf4/go.mod h1:DCq6ryCRpy85BFP/bEfz/HS0O8oEsU4l/cl9IoDVj/o=
746748
github.com/opengovern/resilient-bridge v0.0.0-20241223164127-85ad8f42a67d h1:OnoG1Za89armxN1ZlEbr/eKvAdbRN6UGKXCFxee58s0=

plugin/integration/integration/github_account.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package integration
33
import (
44
"encoding/json"
55
"github.com/jackc/pgtype"
6+
"github.com/opengovern/og-describer-github/describer/pkg/wrapper"
67
"github.com/opengovern/og-describer-github/plugin/integration/configs"
78
"github.com/opengovern/og-describer-github/plugin/integration/discovery"
89
"github.com/opengovern/og-describer-github/plugin/integration/healthcheck"
@@ -107,3 +108,17 @@ func (i *Integration) GetResourceTypeFromTableName(tableName string) string {
107108
func (i *Integration) GetIntegrationType() integration.Type {
108109
return configs.IntegrationTypeGithubAccount
109110
}
111+
112+
func (i *Integration) ListAllTables() map[string][]string {
113+
plugin := wrapper.Plugin()
114+
tables := make(map[string][]string)
115+
for tableKey, table := range plugin.TableMap {
116+
columnNames := make([]string, 0, len(table.Columns))
117+
for _, column := range table.Columns {
118+
columnNames = append(columnNames, column.Name)
119+
}
120+
tables[tableKey] = columnNames
121+
}
122+
123+
return tables
124+
}

0 commit comments

Comments
 (0)