Skip to content

Commit bb9faa4

Browse files
author
MB Burch
committed
Update sdk to v0.3.10 and update config
1 parent 4d03771 commit bb9faa4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+6015
-979
lines changed

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ module github.com/conductorone/baton-postgresql
33
go 1.23.4
44

55
require (
6-
github.com/conductorone/baton-sdk v0.2.93
6+
github.com/conductorone/baton-sdk v0.3.10
77
github.com/ennyjfrick/ruleguard-logfatal v0.0.2
88
github.com/georgysavva/scany v1.2.2
99
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0
1010
github.com/jackc/pgconn v1.14.3
1111
github.com/jackc/pgx/v4 v4.18.3
1212
github.com/quasilyte/go-ruleguard/dsl v0.3.22
13-
github.com/spf13/viper v1.19.0
1413
go.uber.org/zap v1.27.0
1514
)
1615

@@ -91,6 +90,7 @@ require (
9190
github.com/spf13/cast v1.7.1 // indirect
9291
github.com/spf13/cobra v1.8.1 // indirect
9392
github.com/spf13/pflag v1.0.6 // indirect
93+
github.com/spf13/viper v1.19.0 // indirect
9494
github.com/subosito/gotenv v1.6.0 // indirect
9595
github.com/tklauser/go-sysconf v0.3.14 // indirect
9696
github.com/tklauser/numcpus v0.9.0 // indirect

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I
6363
github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
6464
github.com/cockroachdb/cockroach-go/v2 v2.2.0 h1:/5znzg5n373N/3ESjHF5SMLxiW4RKB05Ql//KWfeTFs=
6565
github.com/cockroachdb/cockroach-go/v2 v2.2.0/go.mod h1:u3MiKYGupPPjkn3ozknpMUpxPaNLTFWAya419/zv6eI=
66-
github.com/conductorone/baton-sdk v0.2.93 h1:zAj0CdZ0T9EcwDD0S26QBOJABp9KR8em4G5LCj3CSbw=
67-
github.com/conductorone/baton-sdk v0.2.93/go.mod h1:nUgHSAf9P0lfamti5NlOSpeh1t99UNzMjIwf0I7n4/g=
66+
github.com/conductorone/baton-sdk v0.3.10 h1:e1J0Y2knHTbzn9bAsjElmhv5lRpYwI6ixw0Ak+gx0JY=
67+
github.com/conductorone/baton-sdk v0.3.10/go.mod h1:lWZHgu025Rsgs5jvBrhilGti0zWF2+YfaFY/bWOS/g0=
6868
github.com/conductorone/dpop v0.2.3 h1:s91U3845GHQ6P6FWrdNr2SEOy1ES/jcFs1JtKSl2S+o=
6969
github.com/conductorone/dpop v0.2.3/go.mod h1:gyo8TtzB9SCFCsjsICH4IaLZ7y64CcrDXMOPBwfq/3s=
7070
github.com/conductorone/dpop/integrations/dpop_grpc v0.2.3 h1:kLMCNIh0Mo2vbvvkCmJ3ixsPbXEJ6HPcW53Ku9yje3s=

pkg/config/config.go

Lines changed: 40 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,46 @@ import (
55
)
66

77
var (
8-
dsn = field.StringField("dsn", field.WithRequired(true), field.WithDescription("The DSN to connect to the database"))
9-
schemas = field.StringSliceField("schemas", field.WithDefaultValue([]string{"public"}), field.WithDescription("The schemas to include in the sync"))
10-
includeColumns = field.BoolField("include-columns", field.WithDescription("Include column privileges when syncing. This can result in large amounts of data"))
11-
includeLargeObjects = field.BoolField("include-large-objects", field.WithDescription("Include large objects when syncing. This can result in large amounts of data"))
12-
syncAllDatabases = field.BoolField("sync-all-databases", field.WithDescription("Sync all databases. This can result in large amounts of data"), field.WithDefaultValue(false))
8+
dsn = field.StringField(
9+
"dsn",
10+
field.WithDisplayName("DSN"),
11+
field.WithRequired(true),
12+
field.WithDescription("The DSN to connect to the database"),
13+
field.WithIsSecret(true),
14+
)
15+
schemas = field.StringSliceField(
16+
"schemas",
17+
field.WithDisplayName("Schemas"),
18+
field.WithDefaultValue([]string{"public"}),
19+
field.WithDescription("The schemas to include in the sync"),
20+
)
21+
includeColumns = field.BoolField(
22+
"include-columns",
23+
field.WithDisplayName("Include Columns"),
24+
field.WithDescription("Include column privileges when syncing. This can result in large amounts of data"),
25+
)
26+
includeLargeObjects = field.BoolField(
27+
"include-large-objects",
28+
field.WithDisplayName("Include Large Objects"),
29+
field.WithDescription("Include large objects when syncing. This can result in large amounts of data"),
30+
)
31+
syncAllDatabases = field.BoolField(
32+
"sync-all-databases",
33+
field.WithDisplayName("Sync All Databases"),
34+
field.WithDescription("Sync all databases. This can result in large amounts of data"),
35+
field.WithDefaultValue(false),
36+
)
1337
)
1438

15-
var relationships = []field.SchemaFieldRelationship{}
16-
1739
//go:generate go run ./gen
18-
var Config = field.NewConfiguration([]field.SchemaField{
19-
dsn, schemas, includeColumns, includeLargeObjects, syncAllDatabases,
20-
}, relationships...)
40+
var Config = field.NewConfiguration(
41+
[]field.SchemaField{
42+
dsn,
43+
schemas,
44+
includeColumns,
45+
includeLargeObjects,
46+
syncAllDatabases,
47+
},
48+
field.WithConnectorDisplayName("PostgreSQL"),
49+
field.WithHelpUrl("/docs/baton/postgresql"),
50+
)

vendor/github.com/conductorone/baton-sdk/internal/connector/connector.go

Lines changed: 18 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/config.pb.go

Lines changed: 36 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/conductorone/baton-sdk/pb/c1/config/v1/config.pb.validate.go

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/github.com/conductorone/baton-sdk/pb/c1/connector/v2/annotation_raw_id.pb.go

Lines changed: 130 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)