Skip to content

Commit d50087c

Browse files
committed
refactor: updated table registration
1 parent 90ec9ca commit d50087c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tables/audit_log_table.go

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55

66
"github.com/rs/xid"
77

8-
"github.com/turbot/tailpipe-plugin-github/config"
98
"github.com/turbot/tailpipe-plugin-github/mappers"
109
"github.com/turbot/tailpipe-plugin-github/rows"
1110
"github.com/turbot/tailpipe-plugin-sdk/artifact_source"
@@ -19,19 +18,22 @@ const AuditLogTableIdentifier = "github_audit_log"
1918

2019
// register the table from the package init function
2120
func init() {
22-
table.RegisterTable[*rows.AuditLog, *AuditLogTable]()
21+
// Register the table, with type parameters:
22+
// 1. row struct
23+
// 2. table config struct
24+
// 3. table implementation
25+
table.RegisterTable[*rows.AuditLog, *AuditLogTableConfig, *AuditLogTable]()
2326
}
2427

2528
// AuditLogTable - table for github audit logs
2629
type AuditLogTable struct {
27-
table.TableImpl[*rows.AuditLog, *AuditLogTableConfig, *config.GitHubConnection]
2830
}
2931

3032
func (c *AuditLogTable) Identifier() string {
3133
return AuditLogTableIdentifier
3234
}
3335

34-
func (c *AuditLogTable) SupportedSources() []*table.SourceMetadata[*rows.AuditLog] {
36+
func (c *AuditLogTable) SupportedSources(_ *AuditLogTableConfig) []*table.SourceMetadata[*rows.AuditLog] {
3537
return []*table.SourceMetadata[*rows.AuditLog]{
3638
{
3739
SourceName: constants.ArtifactSourceIdentifier,

0 commit comments

Comments
 (0)