Skip to content

Commit

Permalink
generated code from the lastest merge in go-cosmosdb repo
Browse files Browse the repository at this point in the history
  • Loading branch information
anshulvermapatel committed Jun 7, 2024
1 parent 300ddf1 commit d643fd3
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 49 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ require (
github.com/gorilla/sessions v1.2.2
github.com/hashicorp/go-multierror v1.1.1
github.com/itchyny/gojq v0.12.13
github.com/jewzaam/go-cosmosdb v0.0.0-20240320220716-88298caebe4a
github.com/jewzaam/go-cosmosdb v0.0.0-20240603205015-e096456eff37
github.com/jongio/azidext/go/azidext v0.5.0
github.com/microsoft/kiota-abstractions-go v1.2.0
github.com/microsoft/kiota-http-go v1.0.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,8 @@ github.com/itchyny/gojq v0.12.13/go.mod h1:JzwzAqenfhrPUuwbmEz3nu3JQmFLlQTQMUcOd
github.com/itchyny/timefmt-go v0.1.5 h1:G0INE2la8S6ru/ZI5JecgyzbbJNs5lG1RcBqa7Jm6GE=
github.com/itchyny/timefmt-go v0.1.5/go.mod h1:nEP7L+2YmAbT2kZ2HfSs1d8Xtw9LY8D2stDBckWakZ8=
github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
github.com/jewzaam/go-cosmosdb v0.0.0-20240320220716-88298caebe4a h1:x8omH/WFc+AYa/2zTNQCLkpPQDxxpSAiYkCpXqRhtUI=
github.com/jewzaam/go-cosmosdb v0.0.0-20240320220716-88298caebe4a/go.mod h1:hEk8/SoE/NBT9ofV69Gzs98vbGyF155SaYl1p9bxKb8=
github.com/jewzaam/go-cosmosdb v0.0.0-20240603205015-e096456eff37 h1:69P76EErLYvPuva+ITbDvOIaA+KH9153kU8QeGhJijk=
github.com/jewzaam/go-cosmosdb v0.0.0-20240603205015-e096456eff37/go.mod h1:hEk8/SoE/NBT9ofV69Gzs98vbGyF155SaYl1p9bxKb8=
github.com/jinzhu/copier v0.4.0 h1:w3ciUoD19shMCRargcpm0cm91ytaBhDvuRpz1ODO/U8=
github.com/jinzhu/copier v0.4.0/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg=
github.com/jmespath/go-jmespath v0.3.0/go.mod h1:9QtRXoHjLGCJ5IBSaohpXITPlowMeeYCZ7fLUTSywik=
Expand Down
3 changes: 1 addition & 2 deletions pkg/database/cosmosdb/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ package cosmosdb
// Copyright (c) Microsoft Corporation.
// Licensed under the Apache License 2.0.

// removed generation from github.com/jewzaam/go-cosmosdb/ for time being as I have manually added the code. Waiting for https://github.com/jewzaam/go-cosmosdb/pull/22 to merge.

//go:generate go run ../../../vendor/github.com/jewzaam/go-cosmosdb/cmd/gencosmosdb github.com/Azure/ARO-RP/pkg/api,AsyncOperationDocument github.com/Azure/ARO-RP/pkg/api,BillingDocument github.com/Azure/ARO-RP/pkg/api,GatewayDocument github.com/Azure/ARO-RP/pkg/api,MonitorDocument github.com/Azure/ARO-RP/pkg/api,OpenShiftClusterDocument github.com/Azure/ARO-RP/pkg/api,SubscriptionDocument github.com/Azure/ARO-RP/pkg/api,OpenShiftVersionDocument github.com/Azure/ARO-RP/pkg/api,ClusterManagerConfigurationDocument github.com/Azure/ARO-RP/pkg/api,PlatformWorkloadIdentityRoleSetDocument
//go:generate go run ../../../vendor/golang.org/x/tools/cmd/goimports -local=github.com/Azure/ARO-RP -e -w ./
//go:generate go run ../../../vendor/github.com/golang/mock/mockgen -destination=../../util/mocks/$GOPACKAGE/$GOPACKAGE.go github.com/Azure/ARO-RP/pkg/database/$GOPACKAGE PermissionClient
//go:generate go run ../../../vendor/golang.org/x/tools/cmd/goimports -local=github.com/Azure/ARO-RP -e -w ../../util/mocks/$GOPACKAGE/$GOPACKAGE.go
64 changes: 28 additions & 36 deletions pkg/database/cosmosdb/zz_generated_authorizer.go

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

6 changes: 2 additions & 4 deletions pkg/database/cosmosdb/zz_generated_cosmosdb.go

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

2 changes: 1 addition & 1 deletion pkg/database/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ func createTriggers(ctx context.Context, sqlResourceClient *sdkcosmos.SQLResourc
ctx, cancel := context.WithTimeout(ctx, time.Minute*5)
defer cancel()

poller, err := sqlResourceClient.BeginCreateUpdateSQLTrigger(ctx, resourceGroup, dbAccountName, dbName, collBilling, *triggerResource.ID, createUpdateSQLTriggerParameters, nil)
poller, err := sqlResourceClient.BeginCreateUpdateSQLTrigger(ctx, resourceGroup, dbAccountName, dbName, containerName, *triggerResource.ID, createUpdateSQLTriggerParameters, nil)
if err != nil {
return err
}
Expand Down
Loading

0 comments on commit d643fd3

Please sign in to comment.