diff --git a/.gitignore b/.gitignore index ce782bea3..367b1b09c 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ .envrc ci/*-local.yml *.coverprofile +coverprofile.out .vscode *.test .envrc-kafka diff --git a/apiserver/apiserver.go b/apiserver/apiserver.go index 1ffd2879e..3525f5290 100644 --- a/apiserver/apiserver.go +++ b/apiserver/apiserver.go @@ -14,6 +14,7 @@ import ( "fmt" "io/ioutil" "log" + "log/slog" "net/http" "os" "os/signal" @@ -25,14 +26,15 @@ import ( "code.cloudfoundry.org/lager/v3" "github.com/gorilla/mux" - "github.com/pivotal-cf/brokerapi/v10" - apiauth "github.com/pivotal-cf/brokerapi/v10/auth" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11" + apiauth "github.com/pivotal-cf/brokerapi/v11/auth" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pkg/errors" + "github.com/urfave/negroni" + "github.com/pivotal-cf/on-demand-service-broker/config" "github.com/pivotal-cf/on-demand-service-broker/loggerfactory" "github.com/pivotal-cf/on-demand-service-broker/mgmtapi" - "github.com/pkg/errors" - "github.com/urfave/negroni" ) //go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -generate @@ -188,8 +190,8 @@ func createNegroniLogger(serverLogger *log.Logger) *negroni.Logger { return negroniLogger } -func createBrokerAPILogger(componentName string, serverLogger *log.Logger) lager.Logger { +func createBrokerAPILogger(componentName string, serverLogger *log.Logger) *slog.Logger { brokerAPILogger := lager.NewLogger(componentName) brokerAPILogger.RegisterSink(lager.NewWriterSink(serverLogger.Writer(), lager.INFO)) - return brokerAPILogger + return slog.New(lager.NewHandler(brokerAPILogger)) } diff --git a/apiserver/fakes/combined_broker.go b/apiserver/fakes/combined_broker.go index a74dd84a9..d7df7214d 100644 --- a/apiserver/fakes/combined_broker.go +++ b/apiserver/fakes/combined_broker.go @@ -6,7 +6,7 @@ import ( "log" "sync" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" "github.com/pivotal-cf/on-demand-service-broker/apiserver" "github.com/pivotal-cf/on-demand-service-broker/broker" "github.com/pivotal-cf/on-demand-service-broker/cf" diff --git a/broker/bind.go b/broker/bind.go index 58d587a61..187012397 100644 --- a/broker/bind.go +++ b/broker/bind.go @@ -13,8 +13,8 @@ import ( "net/http" "github.com/pborman/uuid" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" "github.com/pivotal-cf/on-demand-service-broker/brokercontext" "github.com/pivotal-cf/on-demand-service-broker/serviceadapter" diff --git a/broker/bind_test.go b/broker/bind_test.go index bf71195b6..1386589d7 100644 --- a/broker/bind_test.go +++ b/broker/bind_test.go @@ -16,8 +16,8 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/pborman/uuid" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" "github.com/pivotal-cf/on-demand-service-broker/boshdirector" "github.com/pivotal-cf/on-demand-service-broker/broker" brokerfakes "github.com/pivotal-cf/on-demand-service-broker/broker/fakes" diff --git a/broker/broker.go b/broker/broker.go index 85b4fe820..10ab6edfd 100644 --- a/broker/broker.go +++ b/broker/broker.go @@ -16,7 +16,7 @@ import ( "github.com/pivotal-cf/on-demand-service-broker/broker/decider" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" "github.com/pivotal-cf/on-demand-service-broker/boshdirector" "github.com/pivotal-cf/on-demand-service-broker/cf" "github.com/pivotal-cf/on-demand-service-broker/config" diff --git a/broker/broker_helpers.go b/broker/broker_helpers.go index 1bde25cc4..4df692b11 100644 --- a/broker/broker_helpers.go +++ b/broker/broker_helpers.go @@ -12,8 +12,8 @@ import ( "fmt" "log" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" "github.com/pivotal-cf/on-demand-services-sdk/bosh" ) diff --git a/broker/broker_suite_test.go b/broker/broker_suite_test.go index 4df4250e4..643598820 100644 --- a/broker/broker_suite_test.go +++ b/broker/broker_suite_test.go @@ -14,7 +14,7 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" "github.com/pivotal-cf/on-demand-service-broker/broker" "github.com/pivotal-cf/on-demand-service-broker/broker/fakes" "github.com/pivotal-cf/on-demand-service-broker/cf" diff --git a/broker/catalog.go b/broker/catalog.go index 3fd817a55..3412b41ab 100644 --- a/broker/catalog.go +++ b/broker/catalog.go @@ -11,7 +11,7 @@ import ( "fmt" "log" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" "github.com/pivotal-cf/on-demand-service-broker/config" "github.com/pivotal-cf/on-demand-service-broker/serviceadapter" "github.com/pkg/errors" diff --git a/broker/catalog_test.go b/broker/catalog_test.go index 95321a753..65bb2da1f 100644 --- a/broker/catalog_test.go +++ b/broker/catalog_test.go @@ -20,7 +20,7 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" "github.com/pivotal-cf/on-demand-service-broker/broker" "github.com/pivotal-cf/on-demand-service-broker/config" "github.com/pivotal-cf/on-demand-service-broker/noopservicescontroller" diff --git a/broker/decider/decider.go b/broker/decider/decider.go index 73a47e1b2..065f65424 100644 --- a/broker/decider/decider.go +++ b/broker/decider/decider.go @@ -7,8 +7,8 @@ import ( "log" "net/http" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" ) var errInstanceMustBeUpgradedFirst = apiresponses.NewFailureResponseBuilder( diff --git a/broker/decider/decider_test.go b/broker/decider/decider_test.go index c7d88525a..e27db2900 100644 --- a/broker/decider/decider_test.go +++ b/broker/decider/decider_test.go @@ -10,8 +10,8 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" "github.com/pivotal-cf/on-demand-service-broker/broker/decider" "github.com/pivotal-cf/on-demand-service-broker/loggerfactory" ) diff --git a/broker/deprovision.go b/broker/deprovision.go index 21ca2bc5d..6c0e3e938 100644 --- a/broker/deprovision.go +++ b/broker/deprovision.go @@ -14,8 +14,8 @@ import ( "log" "github.com/pborman/uuid" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" "github.com/pivotal-cf/on-demand-service-broker/boshdirector" "github.com/pivotal-cf/on-demand-service-broker/brokercontext" "github.com/pivotal-cf/on-demand-service-broker/config" diff --git a/broker/deprovision_test.go b/broker/deprovision_test.go index 65277c180..f770e3e00 100644 --- a/broker/deprovision_test.go +++ b/broker/deprovision_test.go @@ -16,8 +16,8 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" "github.com/pivotal-cf/on-demand-service-broker/boshdirector" "github.com/pivotal-cf/on-demand-service-broker/broker" "github.com/pivotal-cf/on-demand-service-broker/config" diff --git a/broker/errors.go b/broker/errors.go index b70f958f3..25a63922d 100644 --- a/broker/errors.go +++ b/broker/errors.go @@ -11,7 +11,7 @@ import ( "errors" "fmt" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" "github.com/pivotal-cf/on-demand-service-broker/brokercontext" "github.com/pivotal-cf/on-demand-service-broker/serviceadapter" ) diff --git a/broker/fakes/fake_decider.go b/broker/fakes/fake_decider.go index 8f780a79f..e5d9acb1a 100644 --- a/broker/fakes/fake_decider.go +++ b/broker/fakes/fake_decider.go @@ -5,7 +5,7 @@ import ( "log" "sync" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" "github.com/pivotal-cf/on-demand-service-broker/broker" "github.com/pivotal-cf/on-demand-service-broker/broker/decider" ) diff --git a/broker/fakes/fake_service_adapter_client.go b/broker/fakes/fake_service_adapter_client.go index efa82a644..1c8d07eee 100644 --- a/broker/fakes/fake_service_adapter_client.go +++ b/broker/fakes/fake_service_adapter_client.go @@ -5,7 +5,7 @@ import ( "log" "sync" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" "github.com/pivotal-cf/on-demand-service-broker/broker" "github.com/pivotal-cf/on-demand-services-sdk/bosh" "github.com/pivotal-cf/on-demand-services-sdk/serviceadapter" diff --git a/broker/get_binding.go b/broker/get_binding.go index f031b730d..bc30a250e 100644 --- a/broker/get_binding.go +++ b/broker/get_binding.go @@ -4,8 +4,8 @@ import ( "context" "errors" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" ) func (b *Broker) GetBinding(ctx context.Context, instanceID, bindingID string, bindingsDetails domain.FetchBindingDetails) (domain.GetBindingSpec, error) { diff --git a/broker/get_binding_test.go b/broker/get_binding_test.go index c18dacda6..ea0dab0c8 100644 --- a/broker/get_binding_test.go +++ b/broker/get_binding_test.go @@ -2,13 +2,14 @@ package broker_test import ( "context" + "log/slog" "code.cloudfoundry.org/lager/v3" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" ) var _ = Describe("GetBinding", func() { @@ -17,6 +18,6 @@ var _ = Describe("GetBinding", func() { fresp, ok := err.(*apiresponses.FailureResponse) Expect(ok).To(BeTrue(), "err wasn't a FailureResponse") logger := lager.NewLogger("test") - Expect(fresp.ValidatedStatusCode(logger)).To(Equal(404)) + Expect(fresp.ValidatedStatusCode(slog.New(lager.NewHandler(logger)))).To(Equal(404)) }) }) diff --git a/broker/get_instance.go b/broker/get_instance.go index 3f155e2a7..0db17b187 100644 --- a/broker/get_instance.go +++ b/broker/get_instance.go @@ -4,8 +4,8 @@ import ( "context" "errors" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" ) func (b *Broker) GetInstance(ctx context.Context, instanceID string, instanceDetails domain.FetchInstanceDetails) (domain.GetInstanceDetailsSpec, error) { diff --git a/broker/get_instance_test.go b/broker/get_instance_test.go index e22e5abb7..1ab1b39fa 100644 --- a/broker/get_instance_test.go +++ b/broker/get_instance_test.go @@ -2,13 +2,14 @@ package broker_test import ( "context" + "log/slog" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" "code.cloudfoundry.org/lager/v3" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" ) var _ = Describe("GetInstance", func() { @@ -17,6 +18,6 @@ var _ = Describe("GetInstance", func() { fresp, ok := err.(*apiresponses.FailureResponse) Expect(ok).To(BeTrue(), "err wasn't a FailureResponse") logger := lager.NewLogger("test") - Expect(fresp.ValidatedStatusCode(logger)).To(Equal(404)) + Expect(fresp.ValidatedStatusCode(slog.New(lager.NewHandler(logger)))).To(Equal(404)) }) }) diff --git a/broker/last_binding_operation.go b/broker/last_binding_operation.go index 2ddb51e8e..5481acddc 100644 --- a/broker/last_binding_operation.go +++ b/broker/last_binding_operation.go @@ -4,8 +4,8 @@ import ( "context" "errors" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" ) func (b *Broker) LastBindingOperation(ctx context.Context, instanceID, bindingID string, details domain.PollDetails) (domain.LastOperation, error) { diff --git a/broker/last_binding_operation_test.go b/broker/last_binding_operation_test.go index 157ed215b..05e5d0fe3 100644 --- a/broker/last_binding_operation_test.go +++ b/broker/last_binding_operation_test.go @@ -2,12 +2,13 @@ package broker_test import ( "context" + "log/slog" "code.cloudfoundry.org/lager/v3" . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" ) var _ = Describe("LastBindingOperation", func() { @@ -16,6 +17,6 @@ var _ = Describe("LastBindingOperation", func() { fresp, ok := err.(*apiresponses.FailureResponse) Expect(ok).To(BeTrue(), "err wasn't a FailureResponse") logger := lager.NewLogger("test") - Expect(fresp.ValidatedStatusCode(logger)).To(Equal(404)) + Expect(fresp.ValidatedStatusCode(slog.New(lager.NewHandler(logger)))).To(Equal(404)) }) }) diff --git a/broker/last_operation.go b/broker/last_operation.go index 7b8f63f23..2b19bee78 100644 --- a/broker/last_operation.go +++ b/broker/last_operation.go @@ -14,7 +14,7 @@ import ( "log" "github.com/pborman/uuid" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" "github.com/pivotal-cf/on-demand-service-broker/boshdirector" "github.com/pivotal-cf/on-demand-service-broker/brokercontext" ) diff --git a/broker/last_operation_test.go b/broker/last_operation_test.go index c05286333..e53b2264a 100644 --- a/broker/last_operation_test.go +++ b/broker/last_operation_test.go @@ -14,7 +14,7 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" "github.com/pivotal-cf/on-demand-service-broker/boshdirector" "github.com/pivotal-cf/on-demand-service-broker/broker" ) diff --git a/broker/provision.go b/broker/provision.go index 6221823c2..f2f54eb60 100644 --- a/broker/provision.go +++ b/broker/provision.go @@ -23,8 +23,8 @@ import ( "net/http" "github.com/pborman/uuid" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" "github.com/pivotal-cf/on-demand-service-broker/boshdirector" "github.com/pivotal-cf/on-demand-service-broker/brokercontext" "github.com/pivotal-cf/on-demand-service-broker/config" diff --git a/broker/provision_test.go b/broker/provision_test.go index 92099d3ef..b12bb53a0 100644 --- a/broker/provision_test.go +++ b/broker/provision_test.go @@ -13,8 +13,8 @@ import ( "fmt" "net/http" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" "github.com/pivotal-cf/on-demand-service-broker/cf" . "github.com/onsi/ginkgo/v2" diff --git a/broker/recreate.go b/broker/recreate.go index 0bb6eea4f..22c5bc98b 100644 --- a/broker/recreate.go +++ b/broker/recreate.go @@ -6,7 +6,7 @@ import ( "fmt" "log" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" "github.com/pivotal-cf/on-demand-service-broker/serviceadapter" "github.com/pborman/uuid" diff --git a/broker/recreate_test.go b/broker/recreate_test.go index b614db455..09e161688 100644 --- a/broker/recreate_test.go +++ b/broker/recreate_test.go @@ -12,7 +12,7 @@ import ( "fmt" "log" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" "github.com/pivotal-cf/on-demand-service-broker/config" "github.com/pivotal-cf/on-demand-service-broker/serviceadapter" diff --git a/broker/services/response_converter.go b/broker/services/response_converter.go index 09c55ab5c..d71a69689 100644 --- a/broker/services/response_converter.go +++ b/broker/services/response_converter.go @@ -12,8 +12,8 @@ import ( "io/ioutil" "net/http" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" "github.com/pivotal-cf/on-demand-service-broker/broker" "github.com/pivotal-cf/on-demand-service-broker/mgmtapi" ) diff --git a/broker/services/response_converter_test.go b/broker/services/response_converter_test.go index 53776e0f4..d030db87d 100644 --- a/broker/services/response_converter_test.go +++ b/broker/services/response_converter_test.go @@ -15,8 +15,8 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" "github.com/pivotal-cf/on-demand-service-broker/broker" "github.com/pivotal-cf/on-demand-service-broker/broker/services" "github.com/pivotal-cf/on-demand-service-broker/mgmtapi" diff --git a/broker/services/services.go b/broker/services/services.go index 28fab0048..7cfc7e684 100644 --- a/broker/services/services.go +++ b/broker/services/services.go @@ -16,7 +16,7 @@ import ( "net/url" "strings" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" "github.com/pivotal-cf/on-demand-service-broker/authorizationheader" "github.com/pivotal-cf/on-demand-service-broker/broker" "github.com/pivotal-cf/on-demand-service-broker/mgmtapi" diff --git a/broker/services/services_test.go b/broker/services/services_test.go index ee3f8fa0d..2894f5b31 100644 --- a/broker/services/services_test.go +++ b/broker/services/services_test.go @@ -18,7 +18,7 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" "github.com/pivotal-cf/on-demand-service-broker/authorizationheader/fakes" "github.com/pivotal-cf/on-demand-service-broker/broker" "github.com/pivotal-cf/on-demand-service-broker/broker/services" diff --git a/broker/unbind.go b/broker/unbind.go index 78640ca30..ad26e03e2 100644 --- a/broker/unbind.go +++ b/broker/unbind.go @@ -11,7 +11,7 @@ import ( "fmt" "github.com/pborman/uuid" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" "github.com/pivotal-cf/on-demand-service-broker/brokercontext" ) diff --git a/broker/unbind_test.go b/broker/unbind_test.go index 8b8d8f629..66b4070bc 100644 --- a/broker/unbind_test.go +++ b/broker/unbind_test.go @@ -14,8 +14,8 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/pborman/uuid" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" "github.com/pivotal-cf/on-demand-service-broker/broker" "github.com/pivotal-cf/on-demand-service-broker/brokercontext" "github.com/pivotal-cf/on-demand-service-broker/serviceadapter" diff --git a/broker/update.go b/broker/update.go index 387102a93..a8e7e873d 100644 --- a/broker/update.go +++ b/broker/update.go @@ -16,8 +16,8 @@ import ( "github.com/pivotal-cf/on-demand-service-broker/broker/decider" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" "github.com/pivotal-cf/on-demand-service-broker/config" "github.com/pborman/uuid" diff --git a/broker/update_test.go b/broker/update_test.go index 15cb0351b..a1f7c818d 100644 --- a/broker/update_test.go +++ b/broker/update_test.go @@ -16,8 +16,8 @@ import ( "github.com/pivotal-cf/on-demand-service-broker/broker/decider" sdk "github.com/pivotal-cf/on-demand-services-sdk/serviceadapter" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" "github.com/pivotal-cf/on-demand-service-broker/config" . "github.com/onsi/ginkgo/v2" diff --git a/broker/upgrade.go b/broker/upgrade.go index aed502eb5..b33248154 100644 --- a/broker/upgrade.go +++ b/broker/upgrade.go @@ -15,7 +15,7 @@ import ( "github.com/pivotal-cf/on-demand-service-broker/serviceadapter" "github.com/pborman/uuid" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" ) func (b *Broker) Upgrade(ctx context.Context, instanceID string, details domain.UpdateDetails, logger *log.Logger) (OperationData, string, error) { diff --git a/broker/upgrade_test.go b/broker/upgrade_test.go index 6624178c1..781e022ad 100644 --- a/broker/upgrade_test.go +++ b/broker/upgrade_test.go @@ -18,7 +18,7 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" "github.com/pivotal-cf/on-demand-service-broker/broker" brokerfakes "github.com/pivotal-cf/on-demand-service-broker/broker/fakes" "github.com/pivotal-cf/on-demand-service-broker/config" diff --git a/collaboration_tests/on_demand_service_broker/binding_test.go b/collaboration_tests/on_demand_service_broker/binding_test.go index e15ef730d..29e204d41 100644 --- a/collaboration_tests/on_demand_service_broker/binding_test.go +++ b/collaboration_tests/on_demand_service_broker/binding_test.go @@ -16,8 +16,8 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/gbytes" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" brokerConfig "github.com/pivotal-cf/on-demand-service-broker/config" "github.com/pivotal-cf/on-demand-services-sdk/bosh" sdk "github.com/pivotal-cf/on-demand-services-sdk/serviceadapter" diff --git a/collaboration_tests/on_demand_service_broker/catalog_test.go b/collaboration_tests/on_demand_service_broker/catalog_test.go index 3b7b7932f..eda22e18a 100644 --- a/collaboration_tests/on_demand_service_broker/catalog_test.go +++ b/collaboration_tests/on_demand_service_broker/catalog_test.go @@ -22,7 +22,7 @@ import ( "net/http" "sync" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" brokerConfig "github.com/pivotal-cf/on-demand-service-broker/config" sdk "github.com/pivotal-cf/on-demand-services-sdk/serviceadapter" diff --git a/collaboration_tests/on_demand_service_broker/deprovision_test.go b/collaboration_tests/on_demand_service_broker/deprovision_test.go index 2d2f9801e..f7e777efd 100644 --- a/collaboration_tests/on_demand_service_broker/deprovision_test.go +++ b/collaboration_tests/on_demand_service_broker/deprovision_test.go @@ -25,7 +25,7 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/gbytes" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" "github.com/pivotal-cf/on-demand-service-broker/boshdirector" "github.com/pivotal-cf/on-demand-service-broker/broker" brokerConfig "github.com/pivotal-cf/on-demand-service-broker/config" diff --git a/collaboration_tests/on_demand_service_broker/http_test.go b/collaboration_tests/on_demand_service_broker/http_test.go index 409e9046e..118c91b90 100644 --- a/collaboration_tests/on_demand_service_broker/http_test.go +++ b/collaboration_tests/on_demand_service_broker/http_test.go @@ -19,7 +19,7 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" brokerConfig "github.com/pivotal-cf/on-demand-service-broker/config" ) diff --git a/collaboration_tests/on_demand_service_broker/last_operation_test.go b/collaboration_tests/on_demand_service_broker/last_operation_test.go index ddc995553..77f5a92d7 100644 --- a/collaboration_tests/on_demand_service_broker/last_operation_test.go +++ b/collaboration_tests/on_demand_service_broker/last_operation_test.go @@ -25,7 +25,7 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/gbytes" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" "github.com/pivotal-cf/on-demand-service-broker/boshdirector" "github.com/pivotal-cf/on-demand-service-broker/broker" brokerConfig "github.com/pivotal-cf/on-demand-service-broker/config" diff --git a/collaboration_tests/on_demand_service_broker/provision_test.go b/collaboration_tests/on_demand_service_broker/provision_test.go index 42331c17d..b32cde82b 100644 --- a/collaboration_tests/on_demand_service_broker/provision_test.go +++ b/collaboration_tests/on_demand_service_broker/provision_test.go @@ -25,8 +25,8 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/gbytes" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" "github.com/pivotal-cf/on-demand-service-broker/boshdirector" "github.com/pivotal-cf/on-demand-service-broker/broker" "github.com/pivotal-cf/on-demand-service-broker/cf" diff --git a/collaboration_tests/on_demand_service_broker/secure_bindings_test.go b/collaboration_tests/on_demand_service_broker/secure_bindings_test.go index dbb64bfb4..3ca860281 100644 --- a/collaboration_tests/on_demand_service_broker/secure_bindings_test.go +++ b/collaboration_tests/on_demand_service_broker/secure_bindings_test.go @@ -14,7 +14,7 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/gbytes" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" brokerConfig "github.com/pivotal-cf/on-demand-service-broker/config" sdk "github.com/pivotal-cf/on-demand-services-sdk/serviceadapter" ) diff --git a/collaboration_tests/on_demand_service_broker/unbind_test.go b/collaboration_tests/on_demand_service_broker/unbind_test.go index f34489412..fde07ae6c 100644 --- a/collaboration_tests/on_demand_service_broker/unbind_test.go +++ b/collaboration_tests/on_demand_service_broker/unbind_test.go @@ -20,7 +20,7 @@ import ( "fmt" "net/http" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" brokerConfig "github.com/pivotal-cf/on-demand-service-broker/config" "github.com/pkg/errors" diff --git a/collaboration_tests/on_demand_service_broker/update_test.go b/collaboration_tests/on_demand_service_broker/update_test.go index 86056bb93..698c1bc1d 100644 --- a/collaboration_tests/on_demand_service_broker/update_test.go +++ b/collaboration_tests/on_demand_service_broker/update_test.go @@ -23,8 +23,8 @@ import ( "net/http" "strings" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" "github.com/pivotal-cf/on-demand-service-broker/boshdirector" "github.com/pivotal-cf/on-demand-service-broker/cf" "github.com/pivotal-cf/on-demand-service-broker/serviceadapter" diff --git a/credhubbroker/credhubbroker.go b/credhubbroker/credhubbroker.go index 8609a7212..6fa403855 100644 --- a/credhubbroker/credhubbroker.go +++ b/credhubbroker/credhubbroker.go @@ -21,7 +21,7 @@ import ( "fmt" "github.com/pborman/uuid" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" "github.com/pivotal-cf/on-demand-service-broker/apiserver" "github.com/pivotal-cf/on-demand-service-broker/broker" "github.com/pivotal-cf/on-demand-service-broker/brokercontext" diff --git a/credhubbroker/credhubbroker_test.go b/credhubbroker/credhubbroker_test.go index 32bb37dcb..f6103d7c7 100644 --- a/credhubbroker/credhubbroker_test.go +++ b/credhubbroker/credhubbroker_test.go @@ -24,7 +24,7 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" apifakes "github.com/pivotal-cf/on-demand-service-broker/apiserver/fakes" "github.com/pivotal-cf/on-demand-service-broker/brokercontext" "github.com/pivotal-cf/on-demand-service-broker/credhubbroker" diff --git a/go.mod b/go.mod index 489101688..09752a931 100644 --- a/go.mod +++ b/go.mod @@ -5,19 +5,19 @@ go 1.22 toolchain go1.22.0 require ( - code.cloudfoundry.org/credhub-cli v0.0.0-20240408130546-41a93a2e6319 + code.cloudfoundry.org/credhub-cli v0.0.0-20240415130328-ccf34f5b6270 code.cloudfoundry.org/lager/v3 v3.0.3 github.com/blang/semver/v4 v4.0.0 github.com/cloudfoundry-community/go-uaa v0.3.2 github.com/cloudfoundry/bosh-cli/v7 v7.5.6 - github.com/cloudfoundry/bosh-utils v0.0.456 + github.com/cloudfoundry/bosh-utils v0.0.457 github.com/craigfurman/herottp v0.0.0-20190418132442-c546d62f2a8d github.com/gorilla/mux v1.8.1 github.com/maxbrunsfeld/counterfeiter/v6 v6.8.1 github.com/onsi/ginkgo/v2 v2.17.1 github.com/onsi/gomega v1.32.0 github.com/pborman/uuid v1.2.1 - github.com/pivotal-cf/brokerapi/v10 v10.2.0 + github.com/pivotal-cf/brokerapi/v11 v11.0.0 github.com/pivotal-cf/on-demand-services-sdk v0.45.5-0.20240412212149-512df882a3a1 github.com/pkg/errors v0.9.1 github.com/urfave/negroni v1.0.0 @@ -26,7 +26,7 @@ require ( ) require ( - code.cloudfoundry.org/tlsconfig v0.0.0-20240405144453-942277399864 // indirect + code.cloudfoundry.org/tlsconfig v0.0.0-20240410162701-78a97c114f7f // indirect github.com/bmatcuk/doublestar v1.3.4 // indirect github.com/charlievieth/fs v0.0.3 // indirect github.com/cloudfoundry/go-socks5 v0.0.0-20180221174514-54f73bdb8a8e // indirect @@ -40,14 +40,13 @@ require ( github.com/go-playground/validator/v10 v10.19.0 // indirect github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 // indirect github.com/google/go-cmp v0.6.0 // indirect - github.com/google/pprof v0.0.0-20240402174815-29b9bb013b0f // indirect + github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd // indirect github.com/google/uuid v1.6.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/jpillora/backoff v1.0.0 // indirect github.com/leodido/go-urn v1.4.0 // indirect github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d // indirect github.com/openzipkin/zipkin-go v0.4.2 // indirect - github.com/pivotal-cf/brokerapi/v11 v11.0.0 // indirect github.com/pivotal-cf/paraphernalia v0.0.0-20180203224945-a64ae2051c20 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect diff --git a/go.sum b/go.sum index df4928005..2a53baff1 100644 --- a/go.sum +++ b/go.sum @@ -1,12 +1,12 @@ cloud.google.com/go/compute/metadata v0.2.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= code.cloudfoundry.org/clock v1.1.0 h1:XLzC6W3Ah/Y7ht1rmZ6+QfPdt1iGWEAAtIZXgiaj57c= code.cloudfoundry.org/clock v1.1.0/go.mod h1:yA3fxddT9RINQL2XHS7PS+OXxKCGhfrZmlNUCIM6AKo= -code.cloudfoundry.org/credhub-cli v0.0.0-20240408130546-41a93a2e6319 h1:br9t/arpyiuy+45CEoeQXDCtvYYteuzUiNiHvp6jZTU= -code.cloudfoundry.org/credhub-cli v0.0.0-20240408130546-41a93a2e6319/go.mod h1:YR9+RYOIkumBDCDCDZzwnjQvPgtcAU8vfVrWvewByG4= +code.cloudfoundry.org/credhub-cli v0.0.0-20240415130328-ccf34f5b6270 h1:h98vN6/r060B5veMeqpZY15zQ3PgxipTo2iboDB1yzY= +code.cloudfoundry.org/credhub-cli v0.0.0-20240415130328-ccf34f5b6270/go.mod h1:eqR0agvjaNm/Cb9yKOFO2uyV8sjkvcgm148Jg4WEQ4I= code.cloudfoundry.org/lager/v3 v3.0.3 h1:/UTmadZfIaKuT/whEinSxK1mzRfNu1uPfvjFfGqiwzM= code.cloudfoundry.org/lager/v3 v3.0.3/go.mod h1:Zn5q1SrIuuHjEUE7xerMKt3ztunrJQCZETAo7rV0CH8= -code.cloudfoundry.org/tlsconfig v0.0.0-20240405144453-942277399864 h1:Q8lJnSeX88thHLZbkDkTV5f6xRt1qfL8O5r4nyflwFg= -code.cloudfoundry.org/tlsconfig v0.0.0-20240405144453-942277399864/go.mod h1:O/7cEB6LZ/0P5WVQPKurWCJNyYe8E0T0bOKkhPwh6CI= +code.cloudfoundry.org/tlsconfig v0.0.0-20240410162701-78a97c114f7f h1:Xftr0ImG0QFvqhzO0OW7fdyTFjVVNWTmDi0DHqykxKY= +code.cloudfoundry.org/tlsconfig v0.0.0-20240410162701-78a97c114f7f/go.mod h1:gWadw3Y5wh7DrpGzH8kxASbXeAQngtnHAcfJXF9YQsE= filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA= filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= @@ -19,8 +19,8 @@ github.com/cloudfoundry-community/go-uaa v0.3.2 h1:tZOyzrWuTRo02IwcUbIiNy9+ghgjH github.com/cloudfoundry-community/go-uaa v0.3.2/go.mod h1:G2QAAVe4I+AZf4yF2EGGUFb/X98nTLWrqscILUznX88= github.com/cloudfoundry/bosh-cli/v7 v7.5.6 h1:hHwZAy3Ug5/6/UFcEceTM3qZJRvMN8oUEE8yrMaAuSk= github.com/cloudfoundry/bosh-cli/v7 v7.5.6/go.mod h1:uVqJPkiZc5+dRVr+6v7gwyXpv4Z6ehKtdeG5+pBVAyE= -github.com/cloudfoundry/bosh-utils v0.0.456 h1:pxSOm8xD9lhVkbBeZObdc+hgVhuBkbgJdwTmUnSQpZ0= -github.com/cloudfoundry/bosh-utils v0.0.456/go.mod h1:zGnryiLJFOpxD1GMgmufIrhTiQhXqmPrHxQYETswmuc= +github.com/cloudfoundry/bosh-utils v0.0.457 h1:38ID6Ga0CJorT48xPXFXM+eicY2A9Y/fviiyviI5K04= +github.com/cloudfoundry/bosh-utils v0.0.457/go.mod h1:m79mK7OJsdrp0limAM4uo5Kh+EU9umCqaYid1JeDVFQ= github.com/cloudfoundry/go-socks5 v0.0.0-20180221174514-54f73bdb8a8e h1:FQdRViaoDphGRfgrotl2QGsX1gbloe57dbGBS5CG6KY= github.com/cloudfoundry/go-socks5 v0.0.0-20180221174514-54f73bdb8a8e/go.mod h1:PXmcacyJB/pJjSxEl15IU6rEIKXrhZQRzsr0UTkgNNs= github.com/cloudfoundry/socks5-proxy v0.2.116 h1:1zm31wkXnOdL9pXbtFUTFc/viIYBjF2xjbCOi/bzyNA= @@ -73,8 +73,8 @@ github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/ github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/google/pprof v0.0.0-20240402174815-29b9bb013b0f h1:f00RU+zOX+B3rLAmMMkzHUF2h1z4DeYR9tTCvEq2REY= -github.com/google/pprof v0.0.0-20240402174815-29b9bb013b0f/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= +github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd h1:gbpYu9NMq8jhDVbvlGkMFWCjLFlqqEZjEmObmhUy6Vo= +github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd/go.mod h1:kf6iHlnVGwgKolg33glAes7Yg/8iWP8ukqeldJSO7jw= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -117,8 +117,6 @@ github.com/openzipkin/zipkin-go v0.4.2 h1:zjqfqHjUpPmB3c1GlCvvgsM1G4LkvqQbBDueDO github.com/openzipkin/zipkin-go v0.4.2/go.mod h1:ZeVkFjuuBiSy13y8vpSDCjMi9GoI3hPpCJSBx/EYFhY= github.com/pborman/uuid v1.2.1 h1:+ZZIw58t/ozdjRaXh/3awHfmWRbzYxJoAdNJxe/3pvw= github.com/pborman/uuid v1.2.1/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= -github.com/pivotal-cf/brokerapi/v10 v10.2.0 h1:cdXk5FMkxuBONiaPS+H9aIu0v5aSYv4qvo5keBcUTGA= -github.com/pivotal-cf/brokerapi/v10 v10.2.0/go.mod h1:UEwbfVgaY8FpQ3NOfjoVRPLW/Ar0c7uYQP5TJj3r3OE= github.com/pivotal-cf/brokerapi/v11 v11.0.0 h1:FxIrKdrFNAUyX8NAgPpdkJjwQ0vHmjbaPoxTPcAvcmY= github.com/pivotal-cf/brokerapi/v11 v11.0.0/go.mod h1:MY40lQBKIChtmOpTVluTOyKQ9bW9p5fDszvXOEViIBQ= github.com/pivotal-cf/on-demand-services-sdk v0.45.5-0.20240412212149-512df882a3a1 h1:0Q4gqoRKnvLTwsYfesVYdfgHzg+HrsfAyKLE3MQrC4g= @@ -152,8 +150,8 @@ github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17 github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= -go.step.sm/crypto v0.44.2 h1:t3p3uQ7raP2jp2ha9P6xkQF85TJZh+87xmjSLaib+jk= -go.step.sm/crypto v0.44.2/go.mod h1:x1439EnFhadzhkuaGX7sz03LEMQ+jV4gRamf5LCZJQQ= +go.step.sm/crypto v0.44.3 h1:HA/eHC6mqw+WRP0wT2SqJq/Ch//Z4yJoSLV7kBmAIME= +go.step.sm/crypto v0.44.3/go.mod h1:gGYw4D+5J8uFhBY6dzOBvDE8iwUo+gaOpKPFLcQwv9Q= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= diff --git a/instanceiterator/bosh_triggerer.go b/instanceiterator/bosh_triggerer.go index be4f4953b..7373a45e0 100644 --- a/instanceiterator/bosh_triggerer.go +++ b/instanceiterator/bosh_triggerer.go @@ -18,7 +18,7 @@ package instanceiterator import ( "fmt" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" "github.com/pivotal-cf/on-demand-service-broker/broker" "github.com/pivotal-cf/on-demand-service-broker/broker/services" "github.com/pivotal-cf/on-demand-service-broker/service" diff --git a/instanceiterator/bosh_triggerer_test.go b/instanceiterator/bosh_triggerer_test.go index d0b27b13b..4a2e42018 100644 --- a/instanceiterator/bosh_triggerer_test.go +++ b/instanceiterator/bosh_triggerer_test.go @@ -21,7 +21,7 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" "github.com/pivotal-cf/on-demand-service-broker/broker" "github.com/pivotal-cf/on-demand-service-broker/broker/services" "github.com/pivotal-cf/on-demand-service-broker/instanceiterator" diff --git a/instanceiterator/fakes/fake_broker_services.go b/instanceiterator/fakes/fake_broker_services.go index 2bff3e616..fc2a7803c 100644 --- a/instanceiterator/fakes/fake_broker_services.go +++ b/instanceiterator/fakes/fake_broker_services.go @@ -4,7 +4,7 @@ package fakes import ( "sync" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" "github.com/pivotal-cf/on-demand-service-broker/broker" "github.com/pivotal-cf/on-demand-service-broker/broker/services" "github.com/pivotal-cf/on-demand-service-broker/instanceiterator" diff --git a/instanceiterator/iterator.go b/instanceiterator/iterator.go index 7db3c7d83..3a2034d9e 100644 --- a/instanceiterator/iterator.go +++ b/instanceiterator/iterator.go @@ -13,7 +13,7 @@ import ( "github.com/pkg/errors" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" "github.com/pivotal-cf/on-demand-service-broker/broker" "github.com/pivotal-cf/on-demand-service-broker/broker/services" "github.com/pivotal-cf/on-demand-service-broker/config" diff --git a/mgmtapi/api.go b/mgmtapi/api.go index e75c3c3b8..1fcd0e51e 100644 --- a/mgmtapi/api.go +++ b/mgmtapi/api.go @@ -16,8 +16,8 @@ import ( "github.com/gorilla/mux" "github.com/pborman/uuid" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" "github.com/pivotal-cf/on-demand-service-broker/broker" "github.com/pivotal-cf/on-demand-service-broker/brokercontext" "github.com/pivotal-cf/on-demand-service-broker/cf" diff --git a/mgmtapi/api_test.go b/mgmtapi/api_test.go index 8244802c4..24a684ae8 100644 --- a/mgmtapi/api_test.go +++ b/mgmtapi/api_test.go @@ -21,7 +21,7 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/gbytes" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" "github.com/pivotal-cf/on-demand-service-broker/broker" "github.com/pivotal-cf/on-demand-service-broker/cf" "github.com/pivotal-cf/on-demand-service-broker/config" diff --git a/mgmtapi/fake_manageable_broker/fake_manageable_broker.go b/mgmtapi/fake_manageable_broker/fake_manageable_broker.go index dc8f9df8a..3c32198ff 100644 --- a/mgmtapi/fake_manageable_broker/fake_manageable_broker.go +++ b/mgmtapi/fake_manageable_broker/fake_manageable_broker.go @@ -6,7 +6,7 @@ import ( "log" "sync" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" "github.com/pivotal-cf/on-demand-service-broker/broker" "github.com/pivotal-cf/on-demand-service-broker/cf" "github.com/pivotal-cf/on-demand-service-broker/mgmtapi" diff --git a/mockhttp/mockbroker/last_operation.go b/mockhttp/mockbroker/last_operation.go index c4e87a3ee..f4f504230 100644 --- a/mockhttp/mockbroker/last_operation.go +++ b/mockhttp/mockbroker/last_operation.go @@ -10,7 +10,7 @@ import ( "fmt" "net/url" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" "github.com/pivotal-cf/on-demand-service-broker/mockhttp" ) diff --git a/serviceadapter/generate_plan_schema.go b/serviceadapter/generate_plan_schema.go index e6d8a03f6..038717f7e 100644 --- a/serviceadapter/generate_plan_schema.go +++ b/serviceadapter/generate_plan_schema.go @@ -10,7 +10,7 @@ import ( "encoding/json" "log" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" sdk "github.com/pivotal-cf/on-demand-services-sdk/serviceadapter" ) diff --git a/serviceadapter/generate_plan_schema_test.go b/serviceadapter/generate_plan_schema_test.go index 2c953d9f4..cb3de9149 100644 --- a/serviceadapter/generate_plan_schema_test.go +++ b/serviceadapter/generate_plan_schema_test.go @@ -22,7 +22,7 @@ import ( "io" "log" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" "github.com/pivotal-cf/on-demand-service-broker/serviceadapter" "github.com/pivotal-cf/on-demand-service-broker/serviceadapter/fakes" diff --git a/system_tests/maintenance_info/maintenance_info_test.go b/system_tests/maintenance_info/maintenance_info_test.go index 986946bf3..bc1255117 100644 --- a/system_tests/maintenance_info/maintenance_info_test.go +++ b/system_tests/maintenance_info/maintenance_info_test.go @@ -10,8 +10,8 @@ import ( "time" "github.com/pborman/uuid" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" "github.com/pivotal-cf/on-demand-service-broker/broker" bosh "github.com/pivotal-cf/on-demand-service-broker/system_tests/test_helpers/bosh_helpers" "github.com/pivotal-cf/on-demand-service-broker/system_tests/test_helpers/service_helpers" diff --git a/system_tests/schema_tests/schema_test.go b/system_tests/schema_tests/schema_test.go index ef29d183f..72793e97e 100644 --- a/system_tests/schema_tests/schema_test.go +++ b/system_tests/schema_tests/schema_test.go @@ -22,7 +22,7 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" "github.com/onsi/gomega/gexec" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" cf "github.com/pivotal-cf/on-demand-service-broker/system_tests/test_helpers/cf_helpers" ) diff --git a/system_tests/test_helpers/brokerapi_helpers/brokerapi_helpers.go b/system_tests/test_helpers/brokerapi_helpers/brokerapi_helpers.go index b754434ea..e4f237b2c 100644 --- a/system_tests/test_helpers/brokerapi_helpers/brokerapi_helpers.go +++ b/system_tests/test_helpers/brokerapi_helpers/brokerapi_helpers.go @@ -11,8 +11,8 @@ import ( . "github.com/onsi/ginkgo/v2" . "github.com/onsi/gomega" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" ) type BrokerAPIClient struct { diff --git a/task/fakes/fake_service_adapter_client.go b/task/fakes/fake_service_adapter_client.go index 9b388f785..1305e5bd3 100644 --- a/task/fakes/fake_service_adapter_client.go +++ b/task/fakes/fake_service_adapter_client.go @@ -5,7 +5,7 @@ import ( "log" "sync" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" "github.com/pivotal-cf/on-demand-service-broker/task" "github.com/pivotal-cf/on-demand-services-sdk/serviceadapter" ) diff --git a/task/manifest_generator.go b/task/manifest_generator.go index 00746e1ae..022b53980 100644 --- a/task/manifest_generator.go +++ b/task/manifest_generator.go @@ -9,7 +9,7 @@ package task import ( "log" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" "github.com/pivotal-cf/on-demand-service-broker/broker" "github.com/pivotal-cf/on-demand-service-broker/config" "github.com/pivotal-cf/on-demand-services-sdk/serviceadapter" diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/LICENSE b/vendor/github.com/pivotal-cf/brokerapi/v10/LICENSE deleted file mode 100644 index 5c304d1a4..000000000 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ -Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright {yyyy} {name of copyright owner} - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/NOTICE b/vendor/github.com/pivotal-cf/brokerapi/v10/NOTICE deleted file mode 100644 index d5013b58c..000000000 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/NOTICE +++ /dev/null @@ -1,10 +0,0 @@ -brokerapi - -Copyright (c) 2014-2018 Pivotal Software, Inc. All Rights Reserved. - -This product is licensed to you under the Apache License, Version 2.0 (the "License"). -You may not use this product except in compliance with the License. - -This product may include a number of subcomponents with separate copyright notices -and license terms. Your use of these subcomponents is subject to the terms and -conditions of the subcomponent's license, as noted in the LICENSE file. diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/domain/experimental_volume_mount.go b/vendor/github.com/pivotal-cf/brokerapi/v10/domain/experimental_volume_mount.go deleted file mode 100644 index 66993a4f0..000000000 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/domain/experimental_volume_mount.go +++ /dev/null @@ -1,13 +0,0 @@ -package domain - -type ExperimentalVolumeMount struct { - ContainerPath string `json:"container_path"` - Mode string `json:"mode"` - Private ExperimentalVolumeMountPrivate `json:"private"` -} - -type ExperimentalVolumeMountPrivate struct { - Driver string `json:"driver"` - GroupID string `json:"group_id"` - Config string `json:"config"` -} diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/domain/maintenance_info.go b/vendor/github.com/pivotal-cf/brokerapi/v10/domain/maintenance_info.go deleted file mode 100644 index 8399b51c9..000000000 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/domain/maintenance_info.go +++ /dev/null @@ -1,16 +0,0 @@ -package domain - -import "reflect" - -type MaintenanceInfo struct { - Public map[string]string `json:"public,omitempty"` - Private string `json:"private,omitempty"` - Version string `json:"version,omitempty"` - Description string `json:"description,omitempty"` -} - -func (m *MaintenanceInfo) Equals(input MaintenanceInfo) bool { - return m.Version == input.Version && - m.Private == input.Private && - reflect.DeepEqual(m.Public, input.Public) -} diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/domain/service_broker.go b/vendor/github.com/pivotal-cf/brokerapi/v10/domain/service_broker.go deleted file mode 100644 index 3a9f34902..000000000 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/domain/service_broker.go +++ /dev/null @@ -1,245 +0,0 @@ -package domain - -import ( - "context" - "encoding/json" -) - -//go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -generate -//counterfeiter:generate -o ../fakes/auto_fake_service_broker.go -fake-name AutoFakeServiceBroker . ServiceBroker - -// Each method of the ServiceBroker interface maps to an individual endpoint of the Open Service Broker API. -// The specification is available here: https://github.com/openservicebrokerapi/servicebroker/blob/v2.14/spec.md -// The OpenAPI documentation is available here: http://petstore.swagger.io/?url=https://raw.githubusercontent.com/openservicebrokerapi/servicebroker/v2.14/openapi.yaml -type ServiceBroker interface { - - // Services gets the catalog of services offered by the service broker - // GET /v2/catalog - Services(ctx context.Context) ([]Service, error) - - // Provision creates a new service instance - // PUT /v2/service_instances/{instance_id} - Provision(ctx context.Context, instanceID string, details ProvisionDetails, asyncAllowed bool) (ProvisionedServiceSpec, error) - - // Deprovision deletes an existing service instance - // DELETE /v2/service_instances/{instance_id} - Deprovision(ctx context.Context, instanceID string, details DeprovisionDetails, asyncAllowed bool) (DeprovisionServiceSpec, error) - - // GetInstance fetches information about a service instance - // GET /v2/service_instances/{instance_id} - GetInstance(ctx context.Context, instanceID string, details FetchInstanceDetails) (GetInstanceDetailsSpec, error) - - // Update modifies an existing service instance - // PATCH /v2/service_instances/{instance_id} - Update(ctx context.Context, instanceID string, details UpdateDetails, asyncAllowed bool) (UpdateServiceSpec, error) - - // LastOperation fetches last operation state for a service instance - // GET /v2/service_instances/{instance_id}/last_operation - LastOperation(ctx context.Context, instanceID string, details PollDetails) (LastOperation, error) - - // Bind creates a new service binding - // PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id} - Bind(ctx context.Context, instanceID, bindingID string, details BindDetails, asyncAllowed bool) (Binding, error) - - // Unbind deletes an existing service binding - // DELETE /v2/service_instances/{instance_id}/service_bindings/{binding_id} - Unbind(ctx context.Context, instanceID, bindingID string, details UnbindDetails, asyncAllowed bool) (UnbindSpec, error) - - // GetBinding fetches an existing service binding - // GET /v2/service_instances/{instance_id}/service_bindings/{binding_id} - GetBinding(ctx context.Context, instanceID, bindingID string, details FetchBindingDetails) (GetBindingSpec, error) - - // LastBindingOperation fetches last operation state for a service binding - // GET /v2/service_instances/{instance_id}/service_bindings/{binding_id}/last_operation - LastBindingOperation(ctx context.Context, instanceID, bindingID string, details PollDetails) (LastOperation, error) -} - -type LastOperation struct { - State LastOperationState `json:"state"` - Description string `json:"description"` -} - -type LastOperationState string - -const ( - InProgress LastOperationState = "in progress" - Succeeded LastOperationState = "succeeded" - Failed LastOperationState = "failed" -) - -type VolumeMount struct { - Driver string `json:"driver"` - ContainerDir string `json:"container_dir"` - Mode string `json:"mode"` - DeviceType string `json:"device_type"` - Device SharedDevice `json:"device"` -} - -type SharedDevice struct { - VolumeId string `json:"volume_id"` - MountConfig map[string]interface{} `json:"mount_config"` -} - -type ProvisionDetails struct { - ServiceID string `json:"service_id"` - PlanID string `json:"plan_id"` - OrganizationGUID string `json:"organization_guid"` - SpaceGUID string `json:"space_guid"` - RawContext json.RawMessage `json:"context,omitempty"` - RawParameters json.RawMessage `json:"parameters,omitempty"` - MaintenanceInfo *MaintenanceInfo `json:"maintenance_info,omitempty"` -} - -type ProvisionedServiceSpec struct { - IsAsync bool - AlreadyExists bool - DashboardURL string - OperationData string - Metadata InstanceMetadata -} - -type InstanceMetadata struct { - Labels map[string]string `json:"labels,omitempty"` - Attributes map[string]string `json:"attributes,omitempty"` -} - -type DeprovisionDetails struct { - PlanID string `json:"plan_id"` - ServiceID string `json:"service_id"` - Force bool `json:"force"` -} - -type DeprovisionServiceSpec struct { - IsAsync bool - OperationData string -} - -type GetInstanceDetailsSpec struct { - ServiceID string `json:"service_id"` - PlanID string `json:"plan_id"` - DashboardURL string `json:"dashboard_url"` - Parameters interface{} `json:"parameters"` - Metadata InstanceMetadata -} - -type UpdateDetails struct { - ServiceID string `json:"service_id"` - PlanID string `json:"plan_id"` - RawParameters json.RawMessage `json:"parameters,omitempty"` - PreviousValues PreviousValues `json:"previous_values"` - RawContext json.RawMessage `json:"context,omitempty"` - MaintenanceInfo *MaintenanceInfo `json:"maintenance_info,omitempty"` -} - -type PreviousValues struct { - PlanID string `json:"plan_id"` - ServiceID string `json:"service_id"` - OrgID string `json:"organization_id"` - SpaceID string `json:"space_id"` - MaintenanceInfo *MaintenanceInfo `json:"maintenance_info,omitempty"` -} - -type UpdateServiceSpec struct { - IsAsync bool - DashboardURL string - OperationData string - Metadata InstanceMetadata -} - -type FetchInstanceDetails struct { - ServiceID string `json:"service_id"` - PlanID string `json:"plan_id"` -} - -type FetchBindingDetails struct { - ServiceID string `json:"service_id"` - PlanID string `json:"plan_id"` -} - -type PollDetails struct { - ServiceID string `json:"service_id"` - PlanID string `json:"plan_id"` - OperationData string `json:"operation"` -} - -type BindDetails struct { - AppGUID string `json:"app_guid"` - PlanID string `json:"plan_id"` - ServiceID string `json:"service_id"` - BindResource *BindResource `json:"bind_resource,omitempty"` - RawContext json.RawMessage `json:"context,omitempty"` - RawParameters json.RawMessage `json:"parameters,omitempty"` -} - -type BindResource struct { - AppGuid string `json:"app_guid,omitempty"` - SpaceGuid string `json:"space_guid,omitempty"` - Route string `json:"route,omitempty"` - CredentialClientID string `json:"credential_client_id,omitempty"` - BackupAgent bool `json:"backup_agent,omitempty"` -} - -type UnbindDetails struct { - PlanID string `json:"plan_id"` - ServiceID string `json:"service_id"` -} - -type UnbindSpec struct { - IsAsync bool - OperationData string -} - -type Binding struct { - IsAsync bool `json:"is_async"` - AlreadyExists bool `json:"already_exists"` - OperationData string `json:"operation_data"` - Credentials interface{} `json:"credentials"` - SyslogDrainURL string `json:"syslog_drain_url"` - RouteServiceURL string `json:"route_service_url"` - BackupAgentURL string `json:"backup_agent_url,omitempty"` - VolumeMounts []VolumeMount `json:"volume_mounts"` -} - -type GetBindingSpec struct { - Credentials interface{} - SyslogDrainURL string - RouteServiceURL string - VolumeMounts []VolumeMount - Parameters interface{} -} - -func (d ProvisionDetails) GetRawContext() json.RawMessage { - return d.RawContext -} - -func (d ProvisionDetails) GetRawParameters() json.RawMessage { - return d.RawParameters -} - -func (d BindDetails) GetRawContext() json.RawMessage { - return d.RawContext -} - -func (d BindDetails) GetRawParameters() json.RawMessage { - return d.RawParameters -} - -func (m InstanceMetadata) IsEmpty() bool { - return len(m.Attributes) == 0 && len(m.Labels) == 0 -} - -func (d UpdateDetails) GetRawContext() json.RawMessage { - return d.RawContext -} - -func (d UpdateDetails) GetRawParameters() json.RawMessage { - return d.RawParameters -} - -type DetailsWithRawParameters interface { - GetRawParameters() json.RawMessage -} - -type DetailsWithRawContext interface { - GetRawContext() json.RawMessage -} diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/domain/service_catalog.go b/vendor/github.com/pivotal-cf/brokerapi/v10/domain/service_catalog.go deleted file mode 100644 index fc02cb223..000000000 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/domain/service_catalog.go +++ /dev/null @@ -1,76 +0,0 @@ -package domain - -const ( - PermissionRouteForwarding = RequiredPermission("route_forwarding") - PermissionSyslogDrain = RequiredPermission("syslog_drain") - PermissionVolumeMount = RequiredPermission("volume_mount") - - additionalMetadataName = "AdditionalMetadata" -) - -type Service struct { - ID string `json:"id"` - Name string `json:"name"` - Description string `json:"description"` - Bindable bool `json:"bindable"` - InstancesRetrievable bool `json:"instances_retrievable,omitempty"` - BindingsRetrievable bool `json:"bindings_retrievable,omitempty"` - Tags []string `json:"tags,omitempty"` - PlanUpdatable bool `json:"plan_updateable"` - Plans []ServicePlan `json:"plans"` - Requires []RequiredPermission `json:"requires,omitempty"` - Metadata *ServiceMetadata `json:"metadata,omitempty"` - DashboardClient *ServiceDashboardClient `json:"dashboard_client,omitempty"` - AllowContextUpdates bool `json:"allow_context_updates,omitempty"` -} - -type ServicePlan struct { - ID string `json:"id"` - Name string `json:"name"` - Description string `json:"description"` - Free *bool `json:"free,omitempty"` - Bindable *bool `json:"bindable,omitempty"` - Metadata *ServicePlanMetadata `json:"metadata,omitempty"` - Schemas *ServiceSchemas `json:"schemas,omitempty"` - PlanUpdatable *bool `json:"plan_updateable,omitempty"` - MaximumPollingDuration *int `json:"maximum_polling_duration,omitempty"` - MaintenanceInfo *MaintenanceInfo `json:"maintenance_info,omitempty"` -} - -type ServiceSchemas struct { - Instance ServiceInstanceSchema `json:"service_instance,omitempty"` - Binding ServiceBindingSchema `json:"service_binding,omitempty"` -} - -type ServiceInstanceSchema struct { - Create Schema `json:"create,omitempty"` - Update Schema `json:"update,omitempty"` -} - -type ServiceBindingSchema struct { - Create Schema `json:"create,omitempty"` -} - -type Schema struct { - Parameters map[string]interface{} `json:"parameters"` -} - -type RequiredPermission string - -func FreeValue(v bool) *bool { - return &v -} - -func BindableValue(v bool) *bool { - return &v -} - -func PlanUpdatableValue(v bool) *bool { - return &v -} - -type ServiceDashboardClient struct { - ID string `json:"id"` - Secret string `json:"secret"` - RedirectURI string `json:"redirect_uri"` -} diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/domain/service_metadata.go b/vendor/github.com/pivotal-cf/brokerapi/v10/domain/service_metadata.go deleted file mode 100644 index 926aae23d..000000000 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/domain/service_metadata.go +++ /dev/null @@ -1,62 +0,0 @@ -package domain - -import ( - "encoding/json" - "reflect" - - "github.com/pkg/errors" -) - -type ServiceMetadata struct { - DisplayName string `json:"displayName,omitempty"` - ImageUrl string `json:"imageUrl,omitempty"` - LongDescription string `json:"longDescription,omitempty"` - ProviderDisplayName string `json:"providerDisplayName,omitempty"` - DocumentationUrl string `json:"documentationUrl,omitempty"` - SupportUrl string `json:"supportUrl,omitempty"` - Shareable *bool `json:"shareable,omitempty"` - AdditionalMetadata map[string]interface{} -} - -func (sm ServiceMetadata) MarshalJSON() ([]byte, error) { - type Alias ServiceMetadata - - b, err := json.Marshal(Alias(sm)) - if err != nil { - return []byte{}, errors.Wrap(err, "unmarshallable content in AdditionalMetadata") - } - - var m map[string]interface{} - json.Unmarshal(b, &m) - delete(m, additionalMetadataName) - - for k, v := range sm.AdditionalMetadata { - m[k] = v - } - return json.Marshal(m) -} - -func (sm *ServiceMetadata) UnmarshalJSON(data []byte) error { - type Alias ServiceMetadata - - if err := json.Unmarshal(data, (*Alias)(sm)); err != nil { - return err - } - - additionalMetadata := map[string]interface{}{} - if err := json.Unmarshal(data, &additionalMetadata); err != nil { - return err - } - - for _, jsonName := range GetJsonNames(reflect.ValueOf(sm).Elem()) { - if jsonName == additionalMetadataName { - continue - } - delete(additionalMetadata, jsonName) - } - - if len(additionalMetadata) > 0 { - sm.AdditionalMetadata = additionalMetadata - } - return nil -} diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/domain/service_plan_metadata.go b/vendor/github.com/pivotal-cf/brokerapi/v10/domain/service_plan_metadata.go deleted file mode 100644 index fbb329d82..000000000 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/domain/service_plan_metadata.go +++ /dev/null @@ -1,83 +0,0 @@ -package domain - -import ( - "encoding/json" - "reflect" - "strings" - - "github.com/pkg/errors" -) - -type ServicePlanMetadata struct { - DisplayName string `json:"displayName,omitempty"` - Bullets []string `json:"bullets,omitempty"` - Costs []ServicePlanCost `json:"costs,omitempty"` - AdditionalMetadata map[string]interface{} -} - -type ServicePlanCost struct { - Amount map[string]float64 `json:"amount"` - Unit string `json:"unit"` -} - -func (spm *ServicePlanMetadata) UnmarshalJSON(data []byte) error { - type Alias ServicePlanMetadata - - if err := json.Unmarshal(data, (*Alias)(spm)); err != nil { - return err - } - - additionalMetadata := map[string]interface{}{} - if err := json.Unmarshal(data, &additionalMetadata); err != nil { - return err - } - - s := reflect.ValueOf(spm).Elem() - for _, jsonName := range GetJsonNames(s) { - if jsonName == additionalMetadataName { - continue - } - delete(additionalMetadata, jsonName) - } - - if len(additionalMetadata) > 0 { - spm.AdditionalMetadata = additionalMetadata - } - return nil -} - -func (spm ServicePlanMetadata) MarshalJSON() ([]byte, error) { - type Alias ServicePlanMetadata - - b, err := json.Marshal(Alias(spm)) - if err != nil { - return []byte{}, errors.Wrap(err, "unmarshallable content in AdditionalMetadata") - } - - var m map[string]interface{} - json.Unmarshal(b, &m) - delete(m, additionalMetadataName) - - for k, v := range spm.AdditionalMetadata { - m[k] = v - } - - return json.Marshal(m) -} - -func GetJsonNames(s reflect.Value) (res []string) { - valType := s.Type() - for i := 0; i < s.NumField(); i++ { - field := valType.Field(i) - tag := field.Tag - jsonVal := tag.Get("json") - if jsonVal != "" { - components := strings.Split(jsonVal, ",") - jsonName := components[0] - res = append(res, jsonName) - } else { - res = append(res, field.Name) - } - } - return res -} diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/.gitignore b/vendor/github.com/pivotal-cf/brokerapi/v11/.gitignore similarity index 100% rename from vendor/github.com/pivotal-cf/brokerapi/v10/.gitignore rename to vendor/github.com/pivotal-cf/brokerapi/v11/.gitignore diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/CODE-OF-CONDUCT.md b/vendor/github.com/pivotal-cf/brokerapi/v11/CODE-OF-CONDUCT.md similarity index 100% rename from vendor/github.com/pivotal-cf/brokerapi/v10/CODE-OF-CONDUCT.md rename to vendor/github.com/pivotal-cf/brokerapi/v11/CODE-OF-CONDUCT.md diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/CONTRIBUTING.md b/vendor/github.com/pivotal-cf/brokerapi/v11/CONTRIBUTING.md similarity index 100% rename from vendor/github.com/pivotal-cf/brokerapi/v10/CONTRIBUTING.md rename to vendor/github.com/pivotal-cf/brokerapi/v11/CONTRIBUTING.md diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/Makefile b/vendor/github.com/pivotal-cf/brokerapi/v11/Makefile similarity index 100% rename from vendor/github.com/pivotal-cf/brokerapi/v10/Makefile rename to vendor/github.com/pivotal-cf/brokerapi/v11/Makefile diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/README.md b/vendor/github.com/pivotal-cf/brokerapi/v11/README.md similarity index 90% rename from vendor/github.com/pivotal-cf/brokerapi/v10/README.md rename to vendor/github.com/pivotal-cf/brokerapi/v11/README.md index f0c05e645..1f6e7356b 100644 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/README.md +++ b/vendor/github.com/pivotal-cf/brokerapi/v11/README.md @@ -1,10 +1,10 @@ # brokerapi -[![test](https://github.com/pivotal-cf/brokerapi/workflows/test/badge.svg?branch=main)](https://github.com/pivotal-cf/brokerapi/actions?query=workflow%3Atest+branch%3Amain) +[![test](https://github.com/pivotal-cf/brokerapi/workflows/run-tests/badge.svg?branch=main)](https://github.com/pivotal-cf/brokerapi/actions/workflows/run-tests.yml?query=branch%3Amain) A Go package for building [V2 Open Service Broker API](https://github.com/openservicebrokerapi/servicebroker/) compliant Service Brokers. -## [Docs](https://godoc.org/github.com/pivotal-cf/brokerapi/v10) +## [Docs](https://godoc.org/github.com/pivotal-cf/brokerapi/v11) ## Dependencies @@ -18,15 +18,15 @@ We appreciate and welcome open source contribution. We will try to review the ch ## Usage `brokerapi` defines a -[`ServiceBroker`](https://godoc.org/github.com/pivotal-cf/brokerapi/v10#ServiceBroker) +[`ServiceBroker`](https://godoc.org/github.com/pivotal-cf/brokerapi/v11#ServiceBroker) interface. Pass an implementation of this to -[`brokerapi.New`](https://godoc.org/github.com/pivotal-cf/brokerapi/v10#New) -or [`brokerapi.NewWithOptions`](https://pkg.go.dev/github.com/pivotal-cf/brokerapi/v10#NewWithOptions), +[`brokerapi.New`](https://godoc.org/github.com/pivotal-cf/brokerapi/v11#New) +or [`brokerapi.NewWithOptions`](https://pkg.go.dev/github.com/pivotal-cf/brokerapi/v11#NewWithOptions), which returns an `http.Handler` that you can use to serve handle HTTP requests. Alternatively, if you already have a `*chi.Mux` that you want to attach service broker routes to, you can use -[`brokerapi.AttachRoutes`](https://godoc.org/github.com/pivotal-cf/brokerapi/v10#AttachRoutes). +[`brokerapi.AttachRoutes`](https://godoc.org/github.com/pivotal-cf/brokerapi/v11#AttachRoutes). Note in this case, the Basic Authentication and Originating Identity middleware will not be set up, so you will have to attach them manually if required. diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/api.go b/vendor/github.com/pivotal-cf/brokerapi/v11/api.go similarity index 89% rename from vendor/github.com/pivotal-cf/brokerapi/v10/api.go rename to vendor/github.com/pivotal-cf/brokerapi/v11/api.go index 0fbb095fa..fee196529 100644 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/api.go +++ b/vendor/github.com/pivotal-cf/brokerapi/v11/api.go @@ -16,11 +16,11 @@ package brokerapi import ( + "log/slog" "net/http" - "code.cloudfoundry.org/lager/v3" "github.com/go-chi/chi/v5" - "github.com/pivotal-cf/brokerapi/v10/handlers" + "github.com/pivotal-cf/brokerapi/v11/handlers" ) type BrokerCredentials struct { @@ -28,19 +28,19 @@ type BrokerCredentials struct { Password string } -func New(serviceBroker ServiceBroker, logger lager.Logger, brokerCredentials BrokerCredentials) http.Handler { +func New(serviceBroker ServiceBroker, logger *slog.Logger, brokerCredentials BrokerCredentials) http.Handler { return NewWithOptions(serviceBroker, logger, WithBrokerCredentials(brokerCredentials)) } -func NewWithCustomAuth(serviceBroker ServiceBroker, logger lager.Logger, authMiddleware middlewareFunc) http.Handler { +func NewWithCustomAuth(serviceBroker ServiceBroker, logger *slog.Logger, authMiddleware middlewareFunc) http.Handler { return NewWithOptions(serviceBroker, logger, WithCustomAuth(authMiddleware)) } -func AttachRoutes(router chi.Router, serviceBroker ServiceBroker, logger lager.Logger) { +func AttachRoutes(router chi.Router, serviceBroker ServiceBroker, logger *slog.Logger) { attachRoutes(router, serviceBroker, logger) } -func attachRoutes(router chi.Router, serviceBroker ServiceBroker, logger lager.Logger) { +func attachRoutes(router chi.Router, serviceBroker ServiceBroker, logger *slog.Logger) { apiHandler := handlers.NewApiHandler(serviceBroker, logger) router.Get("/v2/catalog", apiHandler.Catalog) diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/api_options.go b/vendor/github.com/pivotal-cf/brokerapi/v11/api_options.go similarity index 84% rename from vendor/github.com/pivotal-cf/brokerapi/v10/api_options.go rename to vendor/github.com/pivotal-cf/brokerapi/v11/api_options.go index 69e51c215..ee6066164 100644 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/api_options.go +++ b/vendor/github.com/pivotal-cf/brokerapi/v11/api_options.go @@ -16,13 +16,13 @@ package brokerapi import ( + "log/slog" "net/http" - "code.cloudfoundry.org/lager/v3" "github.com/go-chi/chi/v5" - "github.com/pivotal-cf/brokerapi/v10/auth" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/middlewares" + "github.com/pivotal-cf/brokerapi/v11/auth" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/middlewares" ) type middlewareFunc func(http.Handler) http.Handler @@ -30,17 +30,13 @@ type middlewareFunc func(http.Handler) http.Handler type config struct { router chi.Router customRouter bool - logger lager.Logger additionalMiddleware []middlewareFunc } -func NewWithOptions(serviceBroker domain.ServiceBroker, logger lager.Logger, opts ...Option) http.Handler { - cfg := config{ - router: chi.NewRouter(), - logger: logger, - } +func NewWithOptions(serviceBroker domain.ServiceBroker, logger *slog.Logger, opts ...Option) http.Handler { + cfg := config{router: chi.NewRouter()} - WithOptions(append(opts, withDefaultMiddleware())...)(&cfg) + WithOptions(append(opts, withDefaultMiddleware(logger))...)(&cfg) attachRoutes(cfg.router, serviceBroker, logger) return cfg.router @@ -91,11 +87,11 @@ func WithEncodedPath() Option { return func(*config) {} } -func withDefaultMiddleware() Option { +func withDefaultMiddleware(logger *slog.Logger) Option { return func(c *config) { if !c.customRouter { defaults := []middlewareFunc{ - middlewares.APIVersionMiddleware{LoggerFactory: c.logger}.ValidateAPIVersionHdr, + middlewares.APIVersionMiddleware{Logger: logger}.ValidateAPIVersionHdr, middlewares.AddCorrelationIDToContext, middlewares.AddOriginatingIdentityToContext, middlewares.AddInfoLocationToContext, diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/auth/auth.go b/vendor/github.com/pivotal-cf/brokerapi/v11/auth/auth.go similarity index 100% rename from vendor/github.com/pivotal-cf/brokerapi/v10/auth/auth.go rename to vendor/github.com/pivotal-cf/brokerapi/v11/auth/auth.go diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/catalog.go b/vendor/github.com/pivotal-cf/brokerapi/v11/catalog.go similarity index 98% rename from vendor/github.com/pivotal-cf/brokerapi/v10/catalog.go rename to vendor/github.com/pivotal-cf/brokerapi/v11/catalog.go index 60f2d503e..5bc787683 100644 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/catalog.go +++ b/vendor/github.com/pivotal-cf/brokerapi/v11/catalog.go @@ -18,7 +18,7 @@ package brokerapi import ( "reflect" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" ) // Deprecated: Use github.com/pivotal-cf/brokerapi/domain diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/context_utils.go b/vendor/github.com/pivotal-cf/brokerapi/v11/context_utils.go similarity index 92% rename from vendor/github.com/pivotal-cf/brokerapi/v10/context_utils.go rename to vendor/github.com/pivotal-cf/brokerapi/v11/context_utils.go index 91532d9b1..0767e84b0 100644 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/context_utils.go +++ b/vendor/github.com/pivotal-cf/brokerapi/v11/context_utils.go @@ -3,7 +3,7 @@ package brokerapi import ( "context" - "github.com/pivotal-cf/brokerapi/v10/utils" + "github.com/pivotal-cf/brokerapi/v11/utils" ) func AddServiceToContext(ctx context.Context, service *Service) context.Context { diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/create_version_dir.sh b/vendor/github.com/pivotal-cf/brokerapi/v11/create_version_dir.sh similarity index 100% rename from vendor/github.com/pivotal-cf/brokerapi/v10/create_version_dir.sh rename to vendor/github.com/pivotal-cf/brokerapi/v11/create_version_dir.sh diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/domain/apiresponses/errors.go b/vendor/github.com/pivotal-cf/brokerapi/v11/domain/apiresponses/errors.go similarity index 100% rename from vendor/github.com/pivotal-cf/brokerapi/v10/domain/apiresponses/errors.go rename to vendor/github.com/pivotal-cf/brokerapi/v11/domain/apiresponses/errors.go diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/domain/apiresponses/failure_responses.go b/vendor/github.com/pivotal-cf/brokerapi/v11/domain/apiresponses/failure_responses.go similarity index 93% rename from vendor/github.com/pivotal-cf/brokerapi/v10/domain/apiresponses/failure_responses.go rename to vendor/github.com/pivotal-cf/brokerapi/v11/domain/apiresponses/failure_responses.go index cce328396..0dd48951a 100644 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/domain/apiresponses/failure_responses.go +++ b/vendor/github.com/pivotal-cf/brokerapi/v11/domain/apiresponses/failure_responses.go @@ -2,9 +2,8 @@ package apiresponses import ( "fmt" + "log/slog" "net/http" - - "code.cloudfoundry.org/lager/v3" ) // FailureResponse can be returned from any of the `ServiceBroker` interface methods @@ -45,10 +44,10 @@ func (f *FailureResponse) ErrorResponse() interface{} { // ValidatedStatusCode returns the HTTP response status code. If the code is not 4xx // or 5xx, an InternalServerError will be returned instead. -func (f *FailureResponse) ValidatedStatusCode(logger lager.Logger) int { +func (f *FailureResponse) ValidatedStatusCode(logger *slog.Logger) int { if f.statusCode < 400 || 600 <= f.statusCode { if logger != nil { - logger.Error("validating-status-code", fmt.Errorf("Invalid failure http response code: 600, expected 4xx or 5xx, returning internal server error: 500.")) + logger.Error("validating-status-code", slog.String("error", "Invalid failure http response code: 600, expected 4xx or 5xx, returning internal server error: 500.")) } return http.StatusInternalServerError } diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/domain/apiresponses/responses.go b/vendor/github.com/pivotal-cf/brokerapi/v11/domain/apiresponses/responses.go similarity index 98% rename from vendor/github.com/pivotal-cf/brokerapi/v10/domain/apiresponses/responses.go rename to vendor/github.com/pivotal-cf/brokerapi/v11/domain/apiresponses/responses.go index a5ccbb40f..4637a663d 100644 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/domain/apiresponses/responses.go +++ b/vendor/github.com/pivotal-cf/brokerapi/v11/domain/apiresponses/responses.go @@ -15,7 +15,7 @@ package apiresponses -import "github.com/pivotal-cf/brokerapi/v10/domain" +import "github.com/pivotal-cf/brokerapi/v11/domain" type EmptyResponse struct{} diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/failure_response.go b/vendor/github.com/pivotal-cf/brokerapi/v11/failure_response.go similarity index 97% rename from vendor/github.com/pivotal-cf/brokerapi/v10/failure_response.go rename to vendor/github.com/pivotal-cf/brokerapi/v11/failure_response.go index 11bcb6000..1f4dbace4 100644 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/failure_response.go +++ b/vendor/github.com/pivotal-cf/brokerapi/v11/failure_response.go @@ -7,7 +7,7 @@ package brokerapi import ( - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" ) // Deprecated: Use github.com/pivotal-cf/brokerapi/domain/apiresponses diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/handlers/api_handler.go b/vendor/github.com/pivotal-cf/brokerapi/v11/handlers/api_handler.go similarity index 77% rename from vendor/github.com/pivotal-cf/brokerapi/v10/handlers/api_handler.go rename to vendor/github.com/pivotal-cf/brokerapi/v11/handlers/api_handler.go index aed79480c..39622d749 100644 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/handlers/api_handler.go +++ b/vendor/github.com/pivotal-cf/brokerapi/v11/handlers/api_handler.go @@ -4,20 +4,18 @@ import ( "encoding/json" "errors" "fmt" + "log/slog" "net/http" - "code.cloudfoundry.org/lager/v3" - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/internal/blog" ) const ( invalidServiceDetailsErrorKey = "invalid-service-details" - instanceIDLogKey = "instance-id" serviceIdMissingKey = "service-id-missing" planIdMissingKey = "plan-id-missing" unknownErrorKey = "unknown-error" - - bindingIDLogKey = "binding-id" ) var ( @@ -29,11 +27,11 @@ var ( type APIHandler struct { serviceBroker domain.ServiceBroker - logger lager.Logger + logger blog.Blog } -func NewApiHandler(broker domain.ServiceBroker, logger lager.Logger) APIHandler { - return APIHandler{broker, logger} +func NewApiHandler(broker domain.ServiceBroker, logger *slog.Logger) APIHandler { + return APIHandler{serviceBroker: broker, logger: blog.New(logger)} } func (h APIHandler) respond(w http.ResponseWriter, status int, requestIdentity string, response interface{}) { @@ -47,7 +45,7 @@ func (h APIHandler) respond(w http.ResponseWriter, status int, requestIdentity s encoder.SetEscapeHTML(false) err := encoder.Encode(response) if err != nil { - h.logger.Error("encoding response", err, lager.Data{"status": status, "response": response}) + h.logger.Error("encoding response", err, slog.Int("status", status), slog.Any("response", response)) } } diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/handlers/bind.go b/vendor/github.com/pivotal-cf/brokerapi/v11/handlers/bind.go similarity index 88% rename from vendor/github.com/pivotal-cf/brokerapi/v10/handlers/bind.go rename to vendor/github.com/pivotal-cf/brokerapi/v11/handlers/bind.go index 4507b2f16..1047edcf7 100644 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/handlers/bind.go +++ b/vendor/github.com/pivotal-cf/brokerapi/v11/handlers/bind.go @@ -3,29 +3,26 @@ package handlers import ( "encoding/json" "fmt" + "log/slog" "net/http" - "code.cloudfoundry.org/lager/v3" "github.com/go-chi/chi/v5" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" - "github.com/pivotal-cf/brokerapi/v10/middlewares" - "github.com/pivotal-cf/brokerapi/v10/utils" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/internal/blog" + "github.com/pivotal-cf/brokerapi/v11/middlewares" ) const ( - invalidBindDetailsErrorKey = "invalid-bind-details" bindLogKey = "bind" + invalidBindDetailsErrorKey = "invalid-bind-details" ) func (h APIHandler) Bind(w http.ResponseWriter, req *http.Request) { instanceID := chi.URLParam(req, "instance_id") bindingID := chi.URLParam(req, "binding_id") - logger := h.logger.Session(bindLogKey, lager.Data{ - instanceIDLogKey: instanceID, - bindingIDLogKey: bindingID, - }, utils.DataForContext(req.Context(), middlewares.CorrelationIDKey, middlewares.RequestIdentityKey)) + logger := h.logger.Session(req.Context(), bindLogKey, blog.InstanceID(instanceID), blog.BindingID(bindingID)) version := getAPIVersion(req) asyncAllowed := false @@ -64,7 +61,7 @@ func (h APIHandler) Bind(w http.ResponseWriter, req *http.Request) { if err != nil { switch err := err.(type) { case *apiresponses.FailureResponse: - statusCode := err.ValidatedStatusCode(logger) + statusCode := err.ValidatedStatusCode(slog.New(logger)) errorResponse := err.ErrorResponse() if err == apiresponses.ErrInstanceDoesNotExist { // work around ErrInstanceDoesNotExist having different pre-refactor behaviour to other actions diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/handlers/catalog.go b/vendor/github.com/pivotal-cf/brokerapi/v11/handlers/catalog.go similarity index 65% rename from vendor/github.com/pivotal-cf/brokerapi/v10/handlers/catalog.go rename to vendor/github.com/pivotal-cf/brokerapi/v11/handlers/catalog.go index 9bb78a3cd..5ef4922f1 100644 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/handlers/catalog.go +++ b/vendor/github.com/pivotal-cf/brokerapi/v11/handlers/catalog.go @@ -2,18 +2,17 @@ package handlers import ( "fmt" + "log/slog" "net/http" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" - "github.com/pivotal-cf/brokerapi/v10/middlewares" - "github.com/pivotal-cf/brokerapi/v10/utils" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/middlewares" ) const getCatalogLogKey = "getCatalog" func (h *APIHandler) Catalog(w http.ResponseWriter, req *http.Request) { - logger := h.logger.Session(getCatalogLogKey, nil, - utils.DataForContext(req.Context(), middlewares.CorrelationIDKey, middlewares.RequestIdentityKey)) + logger := h.logger.Session(req.Context(), getCatalogLogKey) requestId := fmt.Sprintf("%v", req.Context().Value(middlewares.RequestIdentityKey)) services, err := h.serviceBroker.Services(req.Context()) @@ -21,7 +20,7 @@ func (h *APIHandler) Catalog(w http.ResponseWriter, req *http.Request) { switch err := err.(type) { case *apiresponses.FailureResponse: logger.Error(err.LoggerAction(), err) - h.respond(w, err.ValidatedStatusCode(logger), requestId, err.ErrorResponse()) + h.respond(w, err.ValidatedStatusCode(slog.New(logger)), requestId, err.ErrorResponse()) default: logger.Error(unknownErrorKey, err) h.respond(w, http.StatusInternalServerError, requestId, apiresponses.ErrorResponse{ diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/handlers/deprovision.go b/vendor/github.com/pivotal-cf/brokerapi/v11/handlers/deprovision.go similarity index 76% rename from vendor/github.com/pivotal-cf/brokerapi/v10/handlers/deprovision.go rename to vendor/github.com/pivotal-cf/brokerapi/v11/handlers/deprovision.go index 5d9793e07..33690c512 100644 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/handlers/deprovision.go +++ b/vendor/github.com/pivotal-cf/brokerapi/v11/handlers/deprovision.go @@ -2,14 +2,14 @@ package handlers import ( "fmt" + "log/slog" "net/http" - "code.cloudfoundry.org/lager/v3" "github.com/go-chi/chi/v5" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" - "github.com/pivotal-cf/brokerapi/v10/middlewares" - "github.com/pivotal-cf/brokerapi/v10/utils" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/internal/blog" + "github.com/pivotal-cf/brokerapi/v11/middlewares" ) const deprovisionLogKey = "deprovision" @@ -17,9 +17,7 @@ const deprovisionLogKey = "deprovision" func (h APIHandler) Deprovision(w http.ResponseWriter, req *http.Request) { instanceID := chi.URLParam(req, "instance_id") - logger := h.logger.Session(deprovisionLogKey, lager.Data{ - instanceIDLogKey: instanceID, - }, utils.DataForContext(req.Context(), middlewares.CorrelationIDKey, middlewares.RequestIdentityKey)) + logger := h.logger.Session(req.Context(), deprovisionLogKey, blog.InstanceID(instanceID)) details := domain.DeprovisionDetails{ PlanID: req.FormValue("plan_id"), @@ -52,7 +50,7 @@ func (h APIHandler) Deprovision(w http.ResponseWriter, req *http.Request) { switch err := err.(type) { case *apiresponses.FailureResponse: logger.Error(err.LoggerAction(), err) - h.respond(w, err.ValidatedStatusCode(logger), requestId, err.ErrorResponse()) + h.respond(w, err.ValidatedStatusCode(slog.New(logger)), requestId, err.ErrorResponse()) default: logger.Error(unknownErrorKey, err) h.respond(w, http.StatusInternalServerError, requestId, apiresponses.ErrorResponse{ diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/handlers/get_binding.go b/vendor/github.com/pivotal-cf/brokerapi/v11/handlers/get_binding.go similarity index 74% rename from vendor/github.com/pivotal-cf/brokerapi/v10/handlers/get_binding.go rename to vendor/github.com/pivotal-cf/brokerapi/v11/handlers/get_binding.go index 72d4dd306..cf55992c1 100644 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/handlers/get_binding.go +++ b/vendor/github.com/pivotal-cf/brokerapi/v11/handlers/get_binding.go @@ -3,14 +3,14 @@ package handlers import ( "errors" "fmt" + "log/slog" "net/http" - "code.cloudfoundry.org/lager/v3" "github.com/go-chi/chi/v5" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" - "github.com/pivotal-cf/brokerapi/v10/middlewares" - "github.com/pivotal-cf/brokerapi/v10/utils" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/internal/blog" + "github.com/pivotal-cf/brokerapi/v11/middlewares" ) const getBindLogKey = "getBinding" @@ -19,10 +19,7 @@ func (h APIHandler) GetBinding(w http.ResponseWriter, req *http.Request) { instanceID := chi.URLParam(req, "instance_id") bindingID := chi.URLParam(req, "binding_id") - logger := h.logger.Session(getBindLogKey, lager.Data{ - instanceIDLogKey: instanceID, - bindingIDLogKey: bindingID, - }, utils.DataForContext(req.Context(), middlewares.CorrelationIDKey, middlewares.RequestIdentityKey)) + logger := h.logger.Session(req.Context(), getBindLogKey, blog.InstanceID(instanceID), blog.BindingID(bindingID)) requestId := fmt.Sprintf("%v", req.Context().Value(middlewares.RequestIdentityKey)) @@ -46,7 +43,7 @@ func (h APIHandler) GetBinding(w http.ResponseWriter, req *http.Request) { switch err := err.(type) { case *apiresponses.FailureResponse: logger.Error(err.LoggerAction(), err) - h.respond(w, err.ValidatedStatusCode(logger), requestId, err.ErrorResponse()) + h.respond(w, err.ValidatedStatusCode(slog.New(logger)), requestId, err.ErrorResponse()) default: logger.Error(unknownErrorKey, err) h.respond(w, http.StatusInternalServerError, requestId, apiresponses.ErrorResponse{ diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/handlers/get_instance.go b/vendor/github.com/pivotal-cf/brokerapi/v11/handlers/get_instance.go similarity index 75% rename from vendor/github.com/pivotal-cf/brokerapi/v10/handlers/get_instance.go rename to vendor/github.com/pivotal-cf/brokerapi/v11/handlers/get_instance.go index 406cd0265..4bae384e0 100644 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/handlers/get_instance.go +++ b/vendor/github.com/pivotal-cf/brokerapi/v11/handlers/get_instance.go @@ -3,14 +3,15 @@ package handlers import ( "errors" "fmt" + "log/slog" "net/http" - "code.cloudfoundry.org/lager/v3" + "github.com/pivotal-cf/brokerapi/v11/internal/blog" + "github.com/go-chi/chi/v5" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" - "github.com/pivotal-cf/brokerapi/v10/middlewares" - "github.com/pivotal-cf/brokerapi/v10/utils" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/middlewares" ) const getInstanceLogKey = "getInstance" @@ -18,9 +19,7 @@ const getInstanceLogKey = "getInstance" func (h APIHandler) GetInstance(w http.ResponseWriter, req *http.Request) { instanceID := chi.URLParam(req, "instance_id") - logger := h.logger.Session(getInstanceLogKey, lager.Data{ - instanceIDLogKey: instanceID, - }, utils.DataForContext(req.Context(), middlewares.CorrelationIDKey, middlewares.RequestIdentityKey)) + logger := h.logger.Session(req.Context(), getInstanceLogKey, blog.InstanceID(instanceID)) requestId := fmt.Sprintf("%v", req.Context().Value(middlewares.RequestIdentityKey)) @@ -44,7 +43,7 @@ func (h APIHandler) GetInstance(w http.ResponseWriter, req *http.Request) { switch err := err.(type) { case *apiresponses.FailureResponse: logger.Error(err.LoggerAction(), err) - h.respond(w, err.ValidatedStatusCode(logger), requestId, err.ErrorResponse()) + h.respond(w, err.ValidatedStatusCode(slog.New(logger)), requestId, err.ErrorResponse()) default: logger.Error(unknownErrorKey, err) h.respond(w, http.StatusInternalServerError, requestId, apiresponses.ErrorResponse{ diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/handlers/last_binding_operation.go b/vendor/github.com/pivotal-cf/brokerapi/v11/handlers/last_binding_operation.go similarity index 72% rename from vendor/github.com/pivotal-cf/brokerapi/v10/handlers/last_binding_operation.go rename to vendor/github.com/pivotal-cf/brokerapi/v11/handlers/last_binding_operation.go index 2e112c363..867bf3c93 100644 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/handlers/last_binding_operation.go +++ b/vendor/github.com/pivotal-cf/brokerapi/v11/handlers/last_binding_operation.go @@ -3,14 +3,14 @@ package handlers import ( "errors" "fmt" + "log/slog" "net/http" - "code.cloudfoundry.org/lager/v3" "github.com/go-chi/chi/v5" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" - "github.com/pivotal-cf/brokerapi/v10/middlewares" - "github.com/pivotal-cf/brokerapi/v10/utils" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/internal/blog" + "github.com/pivotal-cf/brokerapi/v11/middlewares" ) const lastBindingOperationLogKey = "lastBindingOperation" @@ -24,9 +24,7 @@ func (h APIHandler) LastBindingOperation(w http.ResponseWriter, req *http.Reques OperationData: req.FormValue("operation"), } - logger := h.logger.Session(lastBindingOperationLogKey, lager.Data{ - instanceIDLogKey: instanceID, - }, utils.DataForContext(req.Context(), middlewares.CorrelationIDKey, middlewares.RequestIdentityKey)) + logger := h.logger.Session(req.Context(), lastBindingOperationLogKey, blog.InstanceID(instanceID), blog.BindingID(bindingID)) requestId := fmt.Sprintf("%v", req.Context().Value(middlewares.RequestIdentityKey)) @@ -47,7 +45,7 @@ func (h APIHandler) LastBindingOperation(w http.ResponseWriter, req *http.Reques switch err := err.(type) { case *apiresponses.FailureResponse: logger.Error(err.LoggerAction(), err) - h.respond(w, err.ValidatedStatusCode(logger), requestId, err.ErrorResponse()) + h.respond(w, err.ValidatedStatusCode(slog.New(logger)), requestId, err.ErrorResponse()) default: logger.Error(unknownErrorKey, err) h.respond(w, http.StatusInternalServerError, requestId, apiresponses.ErrorResponse{ @@ -57,7 +55,7 @@ func (h APIHandler) LastBindingOperation(w http.ResponseWriter, req *http.Reques return } - logger.WithData(lager.Data{"state": lastOperation.State}).Info("done-check-for-binding-operation") + logger.Info("done-check-for-binding-operation", slog.Any("state", lastOperation.State)) lastOperationResponse := apiresponses.LastOperationResponse{ State: lastOperation.State, diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/handlers/last_operation.go b/vendor/github.com/pivotal-cf/brokerapi/v11/handlers/last_operation.go similarity index 66% rename from vendor/github.com/pivotal-cf/brokerapi/v10/handlers/last_operation.go rename to vendor/github.com/pivotal-cf/brokerapi/v11/handlers/last_operation.go index a3e394f25..13cca2cfc 100644 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/handlers/last_operation.go +++ b/vendor/github.com/pivotal-cf/brokerapi/v11/handlers/last_operation.go @@ -2,14 +2,14 @@ package handlers import ( "fmt" + "log/slog" "net/http" - "code.cloudfoundry.org/lager/v3" "github.com/go-chi/chi/v5" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" - "github.com/pivotal-cf/brokerapi/v10/middlewares" - "github.com/pivotal-cf/brokerapi/v10/utils" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/internal/blog" + "github.com/pivotal-cf/brokerapi/v11/middlewares" ) const lastOperationLogKey = "lastOperation" @@ -22,9 +22,7 @@ func (h APIHandler) LastOperation(w http.ResponseWriter, req *http.Request) { OperationData: req.FormValue("operation"), } - logger := h.logger.Session(lastOperationLogKey, lager.Data{ - instanceIDLogKey: instanceID, - }, utils.DataForContext(req.Context(), middlewares.CorrelationIDKey, middlewares.RequestIdentityKey)) + logger := h.logger.Session(req.Context(), lastOperationLogKey, blog.InstanceID(instanceID)) logger.Info("starting-check-for-operation") @@ -35,7 +33,7 @@ func (h APIHandler) LastOperation(w http.ResponseWriter, req *http.Request) { switch err := err.(type) { case *apiresponses.FailureResponse: logger.Error(err.LoggerAction(), err) - h.respond(w, err.ValidatedStatusCode(logger), requestId, err.ErrorResponse()) + h.respond(w, err.ValidatedStatusCode(slog.New(logger)), requestId, err.ErrorResponse()) default: logger.Error(unknownErrorKey, err) h.respond(w, http.StatusInternalServerError, requestId, apiresponses.ErrorResponse{ @@ -45,7 +43,7 @@ func (h APIHandler) LastOperation(w http.ResponseWriter, req *http.Request) { return } - logger.WithData(lager.Data{"state": lastOperation.State}).Info("done-check-for-operation") + logger.Info("done-check-for-operation", slog.Any("state", lastOperation.State)) lastOperationResponse := apiresponses.LastOperationResponse{ State: lastOperation.State, diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/handlers/provision.go b/vendor/github.com/pivotal-cf/brokerapi/v11/handlers/provision.go similarity index 82% rename from vendor/github.com/pivotal-cf/brokerapi/v10/handlers/provision.go rename to vendor/github.com/pivotal-cf/brokerapi/v11/handlers/provision.go index 17daf3360..ddd4e8180 100644 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/handlers/provision.go +++ b/vendor/github.com/pivotal-cf/brokerapi/v11/handlers/provision.go @@ -3,31 +3,28 @@ package handlers import ( "encoding/json" "fmt" + "log/slog" "net/http" - "code.cloudfoundry.org/lager/v3" "github.com/go-chi/chi/v5" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" - "github.com/pivotal-cf/brokerapi/v10/middlewares" - "github.com/pivotal-cf/brokerapi/v10/utils" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/internal/blog" + "github.com/pivotal-cf/brokerapi/v11/middlewares" + "github.com/pivotal-cf/brokerapi/v11/utils" ) const ( - provisionLogKey = "provision" - + provisionLogKey = "provision" instanceDetailsLogKey = "instance-details" - - invalidServiceID = "invalid-service-id" - invalidPlanID = "invalid-plan-id" + invalidServiceID = "invalid-service-id" + invalidPlanID = "invalid-plan-id" ) func (h *APIHandler) Provision(w http.ResponseWriter, req *http.Request) { instanceID := chi.URLParam(req, "instance_id") - logger := h.logger.Session(provisionLogKey, lager.Data{ - instanceIDLogKey: instanceID, - }, utils.DataForContext(req.Context(), middlewares.CorrelationIDKey, middlewares.RequestIdentityKey)) + logger := h.logger.Session(req.Context(), provisionLogKey, blog.InstanceID(instanceID)) requestId := fmt.Sprintf("%v", req.Context().Value(middlewares.RequestIdentityKey)) @@ -93,9 +90,7 @@ func (h *APIHandler) Provision(w http.ResponseWriter, req *http.Request) { asyncAllowed := req.FormValue("accepts_incomplete") == "true" - logger = logger.WithData(lager.Data{ - instanceDetailsLogKey: details, - }) + logger = logger.With(slog.Any(instanceDetailsLogKey, details)) provisionResponse, err := h.serviceBroker.Provision(req.Context(), instanceID, details, asyncAllowed) @@ -103,7 +98,7 @@ func (h *APIHandler) Provision(w http.ResponseWriter, req *http.Request) { switch err := err.(type) { case *apiresponses.FailureResponse: logger.Error(err.LoggerAction(), err) - h.respond(w, err.ValidatedStatusCode(logger), requestId, err.ErrorResponse()) + h.respond(w, err.ValidatedStatusCode(slog.New(logger)), requestId, err.ErrorResponse()) default: logger.Error(unknownErrorKey, err) h.respond(w, http.StatusInternalServerError, requestId, apiresponses.ErrorResponse{ diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/handlers/unbind.go b/vendor/github.com/pivotal-cf/brokerapi/v11/handlers/unbind.go similarity index 75% rename from vendor/github.com/pivotal-cf/brokerapi/v10/handlers/unbind.go rename to vendor/github.com/pivotal-cf/brokerapi/v11/handlers/unbind.go index ca0078bbb..ec2180d52 100644 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/handlers/unbind.go +++ b/vendor/github.com/pivotal-cf/brokerapi/v11/handlers/unbind.go @@ -2,14 +2,14 @@ package handlers import ( "fmt" + "log/slog" "net/http" - "code.cloudfoundry.org/lager/v3" "github.com/go-chi/chi/v5" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" - "github.com/pivotal-cf/brokerapi/v10/middlewares" - "github.com/pivotal-cf/brokerapi/v10/utils" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/internal/blog" + "github.com/pivotal-cf/brokerapi/v11/middlewares" ) const unbindLogKey = "unbind" @@ -18,10 +18,7 @@ func (h APIHandler) Unbind(w http.ResponseWriter, req *http.Request) { instanceID := chi.URLParam(req, "instance_id") bindingID := chi.URLParam(req, "binding_id") - logger := h.logger.Session(unbindLogKey, lager.Data{ - instanceIDLogKey: instanceID, - bindingIDLogKey: bindingID, - }, utils.DataForContext(req.Context(), middlewares.CorrelationIDKey, middlewares.RequestIdentityKey)) + logger := h.logger.Session(req.Context(), unbindLogKey, blog.InstanceID(instanceID), blog.BindingID(bindingID)) requestId := fmt.Sprintf("%v", req.Context().Value(middlewares.RequestIdentityKey)) @@ -52,7 +49,7 @@ func (h APIHandler) Unbind(w http.ResponseWriter, req *http.Request) { switch err := err.(type) { case *apiresponses.FailureResponse: logger.Error(err.LoggerAction(), err) - h.respond(w, err.ValidatedStatusCode(logger), requestId, err.ErrorResponse()) + h.respond(w, err.ValidatedStatusCode(slog.New(logger)), requestId, err.ErrorResponse()) default: logger.Error(unknownErrorKey, err) h.respond(w, http.StatusInternalServerError, requestId, apiresponses.ErrorResponse{ @@ -69,5 +66,4 @@ func (h APIHandler) Unbind(w http.ResponseWriter, req *http.Request) { } else { h.respond(w, http.StatusOK, requestId, apiresponses.EmptyResponse{}) } - } diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/handlers/update.go b/vendor/github.com/pivotal-cf/brokerapi/v11/handlers/update.go similarity index 71% rename from vendor/github.com/pivotal-cf/brokerapi/v10/handlers/update.go rename to vendor/github.com/pivotal-cf/brokerapi/v11/handlers/update.go index 84c57df42..8cbdf9f91 100644 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/handlers/update.go +++ b/vendor/github.com/pivotal-cf/brokerapi/v11/handlers/update.go @@ -3,15 +3,15 @@ package handlers import ( "encoding/json" "fmt" + "log/slog" "net/http" "strconv" - "code.cloudfoundry.org/lager/v3" "github.com/go-chi/chi/v5" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" - "github.com/pivotal-cf/brokerapi/v10/middlewares" - "github.com/pivotal-cf/brokerapi/v10/utils" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/internal/blog" + "github.com/pivotal-cf/brokerapi/v11/middlewares" ) const updateLogKey = "update" @@ -19,15 +19,13 @@ const updateLogKey = "update" func (h APIHandler) Update(w http.ResponseWriter, req *http.Request) { instanceID := chi.URLParam(req, "instance_id") - logger := h.logger.Session(updateLogKey, lager.Data{ - instanceIDLogKey: instanceID, - }, utils.DataForContext(req.Context(), middlewares.CorrelationIDKey, middlewares.RequestIdentityKey)) + logger := h.logger.Session(req.Context(), updateLogKey, blog.InstanceID(instanceID)) requestId := fmt.Sprintf("%v", req.Context().Value(middlewares.RequestIdentityKey)) var details domain.UpdateDetails if err := json.NewDecoder(req.Body).Decode(&details); err != nil { - h.logger.Error(invalidServiceDetailsErrorKey, err) + logger.Error(invalidServiceDetailsErrorKey, err) h.respond(w, http.StatusUnprocessableEntity, requestId, apiresponses.ErrorResponse{ Description: err.Error(), }) @@ -48,10 +46,10 @@ func (h APIHandler) Update(w http.ResponseWriter, req *http.Request) { if err != nil { switch err := err.(type) { case *apiresponses.FailureResponse: - h.logger.Error(err.LoggerAction(), err) - h.respond(w, err.ValidatedStatusCode(h.logger), requestId, err.ErrorResponse()) + logger.Error(err.LoggerAction(), err) + h.respond(w, err.ValidatedStatusCode(slog.New(logger)), requestId, err.ErrorResponse()) default: - h.logger.Error(unknownErrorKey, err) + logger.Error(unknownErrorKey, err) h.respond(w, http.StatusInternalServerError, requestId, apiresponses.ErrorResponse{ Description: err.Error(), }) diff --git a/vendor/github.com/pivotal-cf/brokerapi/v11/internal/blog/blog.go b/vendor/github.com/pivotal-cf/brokerapi/v11/internal/blog/blog.go new file mode 100644 index 000000000..54d5237c3 --- /dev/null +++ b/vendor/github.com/pivotal-cf/brokerapi/v11/internal/blog/blog.go @@ -0,0 +1,122 @@ +// Package blog is the brokerapi logger +// BrokerAPI was originally written to use the CloudFoundry Lager logger (https://github.com/cloudfoundry/lager), +// and it relied on some idiosyncrasies of that logger that are not found in the (subsequently written) +// Go standard library log/slog logger. This package is a wrapper around log/slog that adds back the +// idiosyncrasies of lager, minimizes boilerplate code, and keeps the behavior as similar as possible. +// It also implements the slog.Handler interface so that it can easily be converted into a slog.Logger. +// This is useful when calling public APIs (such as FailureResponse.ValidatedStatusCode) which take a +// slog.Logger as an input, and because they are public cannot take a Blog as an input. +package blog + +import ( + "context" + "log/slog" + "strings" + + "github.com/pivotal-cf/brokerapi/v11/middlewares" +) + +const ( + instanceIDLogKey = "instance-id" + bindingIDLogKey = "binding-id" + errorKey = "error" +) + +type Blog struct { + logger *slog.Logger + prefix string +} + +func New(logger *slog.Logger) Blog { + return Blog{logger: logger} +} + +// Session emulates a Lager logger session. It returns a new logger that will always log the +// attributes, prefix, and data from the context. +func (b Blog) Session(ctx context.Context, prefix string, attr ...any) Blog { + for _, key := range []middlewares.ContextKey{middlewares.CorrelationIDKey, middlewares.RequestIdentityKey} { + if value := ctx.Value(key); value != nil { + attr = append(attr, slog.Any(string(key), value)) + } + } + + return Blog{ + logger: b.logger.With(attr...), + prefix: appendPrefix(b.prefix, prefix), + } +} + +// Error logs an error. It takes an error type as a convenience, which is different to slog.Logger.Error() +func (b Blog) Error(message string, err error, attr ...any) { + b.logger.Error(join(b.prefix, message), append([]any{slog.Any(errorKey, err)}, attr...)...) +} + +// Info logs information. It behaves a lot file slog.Logger.Info() +func (b Blog) Info(message string, attr ...any) { + b.logger.Info(join(b.prefix, message), attr...) +} + +// With returns a logger that always logs the specified attributes +func (b Blog) With(attr ...any) Blog { + b.logger = b.logger.With(attr...) + return b +} + +// Enabled is required implement the slog.Handler interface +func (b Blog) Enabled(context.Context, slog.Level) bool { + return true +} + +// WithAttrs is required implement the slog.Handler interface +func (b Blog) WithAttrs(attrs []slog.Attr) slog.Handler { + var attributes []any + for _, a := range attrs { + attributes = append(attributes, a) + } + return b.With(attributes...) +} + +// WithGroup is required implement the slog.Handler interface +func (b Blog) WithGroup(string) slog.Handler { + return b +} + +// Handle is required implement the slog.Handler interface +func (b Blog) Handle(_ context.Context, record slog.Record) error { + msg := join(b.prefix, record.Message) + switch record.Level { + case slog.LevelDebug: + b.logger.Debug(msg) + case slog.LevelInfo: + b.logger.Info(msg) + case slog.LevelWarn: + b.logger.Warn(msg) + default: + b.logger.Error(msg) + } + + return nil +} + +// InstanceID creates an attribute from an instance ID +func InstanceID(instanceID string) slog.Attr { + return slog.String(instanceIDLogKey, instanceID) +} + +// BindingID creates an attribute from an binding ID +func BindingID(bindingID string) slog.Attr { + return slog.String(bindingIDLogKey, bindingID) +} + +func join(s ...string) string { + return strings.Join(s, ".") +} + +func appendPrefix(existing, addition string) string { + switch existing { + case "": + return addition + default: + return join(existing, addition) + } +} diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/maintenance_info.go b/vendor/github.com/pivotal-cf/brokerapi/v11/maintenance_info.go similarity index 74% rename from vendor/github.com/pivotal-cf/brokerapi/v10/maintenance_info.go rename to vendor/github.com/pivotal-cf/brokerapi/v11/maintenance_info.go index 86529748d..e9fe54292 100644 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/maintenance_info.go +++ b/vendor/github.com/pivotal-cf/brokerapi/v11/maintenance_info.go @@ -1,7 +1,7 @@ package brokerapi import ( - "github.com/pivotal-cf/brokerapi/v10/domain" + "github.com/pivotal-cf/brokerapi/v11/domain" ) // Deprecated: Use github.com/pivotal-cf/brokerapi/domain diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/middlewares/api_version_header.go b/vendor/github.com/pivotal-cf/brokerapi/v11/middlewares/api_version_header.go similarity index 81% rename from vendor/github.com/pivotal-cf/brokerapi/v10/middlewares/api_version_header.go rename to vendor/github.com/pivotal-cf/brokerapi/v11/middlewares/api_version_header.go index cd272572b..08df623d4 100644 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/middlewares/api_version_header.go +++ b/vendor/github.com/pivotal-cf/brokerapi/v11/middlewares/api_version_header.go @@ -19,15 +19,18 @@ import ( "encoding/json" "errors" "fmt" + "log/slog" "net/http" - - "code.cloudfoundry.org/lager/v3" ) -const ApiVersionInvalidKey = "broker-api-version-invalid" +const ( + ApiVersionInvalidKey = "broker-api-version-invalid" + + apiVersionLogKey = "version-header-check" +) type APIVersionMiddleware struct { - LoggerFactory lager.Logger + Logger *slog.Logger } type ErrorResponse struct { @@ -36,11 +39,9 @@ type ErrorResponse struct { func (m APIVersionMiddleware) ValidateAPIVersionHdr(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, req *http.Request) { - logger := m.LoggerFactory.Session("version-header-check", lager.Data{}) - err := checkBrokerAPIVersionHdr(req) if err != nil { - logger.Error(ApiVersionInvalidKey, err) + m.Logger.Error(fmt.Sprintf("%s.%s", apiVersionLogKey, ApiVersionInvalidKey), slog.Any("error", err)) w.Header().Set("Content-type", "application/json") setBrokerRequestIdentityHeader(req, w) @@ -50,9 +51,8 @@ func (m APIVersionMiddleware) ValidateAPIVersionHdr(next http.Handler) http.Hand errorResp := ErrorResponse{ Description: err.Error(), } - err = json.NewEncoder(w).Encode(errorResp) - if err != nil { - logger.Error("encoding response", err, lager.Data{"status": statusResponse, "response": errorResp}) + if err := json.NewEncoder(w).Encode(errorResp); err != nil { + m.Logger.Error(fmt.Sprintf("%s.%s", apiVersionLogKey, "encoding response"), slog.Any("error", err), slog.Int("status", statusResponse), slog.Any("response", errorResp)) } return diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/middlewares/context_keys.go b/vendor/github.com/pivotal-cf/brokerapi/v11/middlewares/context_keys.go similarity index 100% rename from vendor/github.com/pivotal-cf/brokerapi/v10/middlewares/context_keys.go rename to vendor/github.com/pivotal-cf/brokerapi/v11/middlewares/context_keys.go diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/middlewares/correlation_id_header.go b/vendor/github.com/pivotal-cf/brokerapi/v11/middlewares/correlation_id_header.go similarity index 100% rename from vendor/github.com/pivotal-cf/brokerapi/v10/middlewares/correlation_id_header.go rename to vendor/github.com/pivotal-cf/brokerapi/v11/middlewares/correlation_id_header.go diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/middlewares/info_location_header.go b/vendor/github.com/pivotal-cf/brokerapi/v11/middlewares/info_location_header.go similarity index 100% rename from vendor/github.com/pivotal-cf/brokerapi/v10/middlewares/info_location_header.go rename to vendor/github.com/pivotal-cf/brokerapi/v11/middlewares/info_location_header.go diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/middlewares/originating_identity_header.go b/vendor/github.com/pivotal-cf/brokerapi/v11/middlewares/originating_identity_header.go similarity index 100% rename from vendor/github.com/pivotal-cf/brokerapi/v10/middlewares/originating_identity_header.go rename to vendor/github.com/pivotal-cf/brokerapi/v11/middlewares/originating_identity_header.go diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/middlewares/request_identity_header.go b/vendor/github.com/pivotal-cf/brokerapi/v11/middlewares/request_identity_header.go similarity index 100% rename from vendor/github.com/pivotal-cf/brokerapi/v10/middlewares/request_identity_header.go rename to vendor/github.com/pivotal-cf/brokerapi/v11/middlewares/request_identity_header.go diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/response.go b/vendor/github.com/pivotal-cf/brokerapi/v11/response.go similarity index 96% rename from vendor/github.com/pivotal-cf/brokerapi/v10/response.go rename to vendor/github.com/pivotal-cf/brokerapi/v11/response.go index aca2946c6..fda18c010 100644 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/response.go +++ b/vendor/github.com/pivotal-cf/brokerapi/v11/response.go @@ -16,8 +16,8 @@ package brokerapi import ( - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" ) // Deprecated: Use github.com/pivotal-cf/brokerapi/domain/apiresponses diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/service_broker.go b/vendor/github.com/pivotal-cf/brokerapi/v11/service_broker.go similarity index 97% rename from vendor/github.com/pivotal-cf/brokerapi/v10/service_broker.go rename to vendor/github.com/pivotal-cf/brokerapi/v11/service_broker.go index 277f32133..c3b3b23c9 100644 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/service_broker.go +++ b/vendor/github.com/pivotal-cf/brokerapi/v11/service_broker.go @@ -16,8 +16,8 @@ package brokerapi import ( - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/domain/apiresponses" + "github.com/pivotal-cf/brokerapi/v11/domain" + "github.com/pivotal-cf/brokerapi/v11/domain/apiresponses" ) //go:generate go run github.com/maxbrunsfeld/counterfeiter/v6 -generate diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/staticcheck.conf b/vendor/github.com/pivotal-cf/brokerapi/v11/staticcheck.conf similarity index 100% rename from vendor/github.com/pivotal-cf/brokerapi/v10/staticcheck.conf rename to vendor/github.com/pivotal-cf/brokerapi/v11/staticcheck.conf diff --git a/vendor/github.com/pivotal-cf/brokerapi/v10/utils/context.go b/vendor/github.com/pivotal-cf/brokerapi/v11/utils/context.go similarity index 70% rename from vendor/github.com/pivotal-cf/brokerapi/v10/utils/context.go rename to vendor/github.com/pivotal-cf/brokerapi/v11/utils/context.go index bd4f45678..74a85f112 100644 --- a/vendor/github.com/pivotal-cf/brokerapi/v10/utils/context.go +++ b/vendor/github.com/pivotal-cf/brokerapi/v11/utils/context.go @@ -3,9 +3,7 @@ package utils import ( "context" - "code.cloudfoundry.org/lager/v3" - "github.com/pivotal-cf/brokerapi/v10/domain" - "github.com/pivotal-cf/brokerapi/v10/middlewares" + "github.com/pivotal-cf/brokerapi/v11/domain" ) type contextKey string @@ -42,14 +40,3 @@ func RetrieveServicePlanFromContext(ctx context.Context) *domain.ServicePlan { } return nil } - -func DataForContext(context context.Context, dataKeys ...middlewares.ContextKey) lager.Data { - data := lager.Data{} - for _, key := range dataKeys { - if value := context.Value(key); value != nil { - data[string(key)] = value - } - } - - return data -} diff --git a/vendor/modules.txt b/vendor/modules.txt index 6c05041f0..cd2471029 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,4 +1,4 @@ -# code.cloudfoundry.org/credhub-cli v0.0.0-20240408130546-41a93a2e6319 +# code.cloudfoundry.org/credhub-cli v0.0.0-20240415130328-ccf34f5b6270 ## explicit; go 1.21.6 code.cloudfoundry.org/credhub-cli/credhub code.cloudfoundry.org/credhub-cli/credhub/auth @@ -12,7 +12,7 @@ code.cloudfoundry.org/credhub-cli/credhub/server ## explicit; go 1.19 code.cloudfoundry.org/lager/v3 code.cloudfoundry.org/lager/v3/internal/truncate -# code.cloudfoundry.org/tlsconfig v0.0.0-20240405144453-942277399864 +# code.cloudfoundry.org/tlsconfig v0.0.0-20240410162701-78a97c114f7f ## explicit; go 1.19 code.cloudfoundry.org/tlsconfig # github.com/blang/semver/v4 v4.0.0 @@ -34,7 +34,7 @@ github.com/cloudfoundry/bosh-cli/v7/common/util github.com/cloudfoundry/bosh-cli/v7/director github.com/cloudfoundry/bosh-cli/v7/io github.com/cloudfoundry/bosh-cli/v7/uaa -# github.com/cloudfoundry/bosh-utils v0.0.456 +# github.com/cloudfoundry/bosh-utils v0.0.457 ## explicit; go 1.21.0 github.com/cloudfoundry/bosh-utils/crypto github.com/cloudfoundry/bosh-utils/errors @@ -89,7 +89,7 @@ github.com/google/go-cmp/cmp/internal/diff github.com/google/go-cmp/cmp/internal/flags github.com/google/go-cmp/cmp/internal/function github.com/google/go-cmp/cmp/internal/value -# github.com/google/pprof v0.0.0-20240402174815-29b9bb013b0f +# github.com/google/pprof v0.0.0-20240409012703-83162a5b38cd ## explicit; go 1.19 github.com/google/pprof/profile # github.com/google/uuid v1.6.0 @@ -161,18 +161,16 @@ github.com/openzipkin/zipkin-go/model # github.com/pborman/uuid v1.2.1 ## explicit github.com/pborman/uuid -# github.com/pivotal-cf/brokerapi/v10 v10.2.0 -## explicit; go 1.20 -github.com/pivotal-cf/brokerapi/v10 -github.com/pivotal-cf/brokerapi/v10/auth -github.com/pivotal-cf/brokerapi/v10/domain -github.com/pivotal-cf/brokerapi/v10/domain/apiresponses -github.com/pivotal-cf/brokerapi/v10/handlers -github.com/pivotal-cf/brokerapi/v10/middlewares -github.com/pivotal-cf/brokerapi/v10/utils # github.com/pivotal-cf/brokerapi/v11 v11.0.0 ## explicit; go 1.21 +github.com/pivotal-cf/brokerapi/v11 +github.com/pivotal-cf/brokerapi/v11/auth github.com/pivotal-cf/brokerapi/v11/domain +github.com/pivotal-cf/brokerapi/v11/domain/apiresponses +github.com/pivotal-cf/brokerapi/v11/handlers +github.com/pivotal-cf/brokerapi/v11/internal/blog +github.com/pivotal-cf/brokerapi/v11/middlewares +github.com/pivotal-cf/brokerapi/v11/utils # github.com/pivotal-cf/on-demand-services-sdk v0.45.5-0.20240412212149-512df882a3a1 ## explicit; go 1.21 github.com/pivotal-cf/on-demand-services-sdk/bosh