Skip to content

Commit

Permalink
Merge pull request #436 from meroxa/confluentcloud
Browse files Browse the repository at this point in the history
Add Confluent Cloud to CLI
  • Loading branch information
ericcheatham authored Sep 13, 2022
2 parents 1ca0c6b + 66b7fb8 commit d334c77
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 29 deletions.
14 changes: 14 additions & 0 deletions cmd/meroxa/root/apps/describe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,19 +89,31 @@ func TestDescribeApplicationExecution(t *testing.T) {
Destination: null.StringFrom("destination"),
},
},
{
EntityIdentifier: meroxa.EntityIdentifier{
Name: null.StringFrom("res3"),
},
Collection: meroxa.ResourceCollection{
Name: null.StringFrom("res3"),
Destination: null.StringFrom("destination"),
},
},
}
resources := []*meroxa.Resource{
{Name: "res1", UUID: "abc-def", Type: meroxa.ResourceTypePostgres},
{Name: "res2", UUID: "abc-def", Type: meroxa.ResourceTypeBigquery},
{Name: "res3", UUID: "abc-def", Type: meroxa.ResourceTypeConfluentCloud},
}

a.Connectors = []meroxa.EntityIdentifier{
{Name: null.StringFrom("conn1")},
{Name: null.StringFrom("conn2")},
{Name: null.StringFrom("conn3")},
}
connectors := []*meroxa.Connector{
{Name: "conn1", ResourceName: "res1", Type: meroxa.ConnectorTypeSource, State: meroxa.ConnectorStateRunning},
{Name: "conn2", ResourceName: "res2", Type: meroxa.ConnectorTypeDestination, State: meroxa.ConnectorStateRunning},
{Name: "conn3", ResourceName: "res3", Type: meroxa.ConnectorTypeDestination, State: meroxa.ConnectorStateRunning},
}

functions := []*meroxa.Function{
Expand All @@ -114,8 +126,10 @@ func TestDescribeApplicationExecution(t *testing.T) {
client.EXPECT().GetApplication(ctx, a.Name).Return(&a, nil)
client.EXPECT().GetResourceByNameOrID(ctx, "res1").Return(resources[0], nil)
client.EXPECT().GetResourceByNameOrID(ctx, "res2").Return(resources[1], nil)
client.EXPECT().GetResourceByNameOrID(ctx, "res3").Return(resources[2], nil)
client.EXPECT().GetConnectorByNameOrID(ctx, "conn1").Return(connectors[0], nil)
client.EXPECT().GetConnectorByNameOrID(ctx, "conn2").Return(connectors[1], nil)
client.EXPECT().GetConnectorByNameOrID(ctx, "conn3").Return(connectors[2], nil)
client.EXPECT().GetFunction(ctx, "fun1").Return(functions[0], nil)

dc := &Describe{
Expand Down
10 changes: 9 additions & 1 deletion cmd/meroxa/root/resources/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,15 @@ $ meroxa resource create snowflake \
--type snowflakedb \
-u "snowflake://$SNOWFLAKE_URL/meroxa_db/stream_data" \
--username meroxa_user \
--password $SNOWFLAKE_PRIVATE_KEY`,
--password $SNOWFLAKE_PRIVATE_KEY
$ meroxa resource create sourcedb \
--type kafka \
--url kafka+sasl+ssl://$KAFKA_USER:$KAFKA_PASS@<$BOOTSTRAP_SERVER>?sasl_mechanism=plain
$ meroxa resource create sourcedb \
--type confluentcloud \
--url kafka+sasl+ssl://$API_KEY:$API_SECRET@<$BOOTSTRAP_SERVER>?sasl_mechanism=plain`,
}
}

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ require (
github.com/manifoldco/promptui v0.8.0
github.com/mattn/go-colorable v0.1.12 // indirect
github.com/mattn/go-runewidth v0.0.10 // indirect
github.com/meroxa/meroxa-go v0.0.0-20220810182408-f05df5bf6f6e
github.com/meroxa/meroxa-go v0.0.0-20220912230249-20686297f457
github.com/nirasan/go-oauth-pkce-code-verifier v0.0.0-20170819232839-0fbfe93532da
github.com/pkg/browser v0.0.0-20210115035449-ce105d075bb4
github.com/rivo/uniseg v0.2.0 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -515,8 +515,8 @@ github.com/mattn/go-shellwords v1.0.12/go.mod h1:EZzvwXDESEeg03EKmM+RmDnNOPKG4lL
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4=
github.com/maxbrunsfeld/counterfeiter/v6 v6.2.2/go.mod h1:eD9eIE7cdwcMi9rYluz88Jz2VyhSmden33/aXg4oVIY=
github.com/meroxa/meroxa-go v0.0.0-20220810182408-f05df5bf6f6e h1:342YniWwgpSnG3afpXwI+yer2peDX6MSw3yjl3O6dSs=
github.com/meroxa/meroxa-go v0.0.0-20220810182408-f05df5bf6f6e/go.mod h1:qczCsZeXwn2R+JeEVjPkgtIMGROQ1Si8ox+OC2nfOYg=
github.com/meroxa/meroxa-go v0.0.0-20220912230249-20686297f457 h1:+ZwU/WVSFwfoZish4Siiv1/6oObE5zffKl1cocU19/I=
github.com/meroxa/meroxa-go v0.0.0-20220912230249-20686297f457/go.mod h1:qczCsZeXwn2R+JeEVjPkgtIMGROQ1Si8ox+OC2nfOYg=
github.com/meroxa/turbine-go v0.0.0-20220808165302-ff929376e177 h1:IlAZCm/UlMnC+5V+OAYlKXa16yGzlLxO1+6EN6PcwxM=
github.com/meroxa/turbine-go v0.0.0-20220808165302-ff929376e177/go.mod h1:x6qIhTUBt8961KrUUioSTd1sCsRKMBvZ3LSS2BDUhJo=
github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WTFxgs=
Expand Down
3 changes: 1 addition & 2 deletions vendor/github.com/meroxa/meroxa-go/pkg/meroxa/api_errors.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions vendor/github.com/meroxa/meroxa-go/pkg/meroxa/auth.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 3 additions & 6 deletions vendor/github.com/meroxa/meroxa-go/pkg/meroxa/environment.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion vendor/github.com/meroxa/meroxa-go/pkg/meroxa/meroxa.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 14 additions & 13 deletions vendor/github.com/meroxa/meroxa-go/pkg/meroxa/resource_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions vendor/github.com/meroxa/meroxa-go/pkg/meroxa/transform.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ github.com/mattn/go-runewidth
# github.com/mattn/go-shellwords v1.0.12
## explicit; go 1.13
github.com/mattn/go-shellwords
# github.com/meroxa/meroxa-go v0.0.0-20220810182408-f05df5bf6f6e
# github.com/meroxa/meroxa-go v0.0.0-20220912230249-20686297f457
## explicit; go 1.17
github.com/meroxa/meroxa-go/pkg/meroxa
github.com/meroxa/meroxa-go/pkg/mock
Expand Down

0 comments on commit d334c77

Please sign in to comment.