Skip to content

Commit

Permalink
feat!: import path changes for v13 (#353)
Browse files Browse the repository at this point in the history
The repo has moved, so creating a new major version to reflect import path change

Technically the import path change is a new major version, but to avoid any
confusion between versions, we are creating a v13 to make it clear that this
is the successor to all earlier versions.
  • Loading branch information
blgm authored Feb 27, 2025
1 parent 6f7bc1b commit 94be725
Show file tree
Hide file tree
Showing 43 changed files with 156 additions and 156 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ jobs:
call-dependabot-pr-workflow:
needs: test
if: ${{ success() && github.actor == 'dependabot[bot]' }}
uses: pivotal-cf/brokerapi/.github/workflows/dependabot-test.yml@main
uses: cloudfoundry/brokerapi/.github/workflows/dependabot-test.yml@main
with:
pr_number: ${{ github.event.number }}
10 changes: 5 additions & 5 deletions api.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ import (
"log/slog"
"net/http"

"github.com/pivotal-cf/brokerapi/v12/internal/middleware"
"code.cloudfoundry.org/brokerapi/v13/internal/middleware"

"github.com/pivotal-cf/brokerapi/v12/auth"
"github.com/pivotal-cf/brokerapi/v12/domain"
"github.com/pivotal-cf/brokerapi/v12/handlers"
"github.com/pivotal-cf/brokerapi/v12/middlewares"
"code.cloudfoundry.org/brokerapi/v13/auth"
"code.cloudfoundry.org/brokerapi/v13/domain"
"code.cloudfoundry.org/brokerapi/v13/handlers"
"code.cloudfoundry.org/brokerapi/v13/middlewares"
)

type BrokerCredentials struct {
Expand Down
6 changes: 3 additions & 3 deletions api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ import (
"net/url"
"strings"

"code.cloudfoundry.org/brokerapi/v13"
"code.cloudfoundry.org/brokerapi/v13/fakes"
"code.cloudfoundry.org/brokerapi/v13/middlewares"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gbytes"
"github.com/pivotal-cf/brokerapi/v12"
"github.com/pivotal-cf/brokerapi/v12/fakes"
"github.com/pivotal-cf/brokerapi/v12/middlewares"
)

var _ = Describe("Service Broker API", func() {
Expand Down
2 changes: 1 addition & 1 deletion auth/auth_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"github.com/pivotal-cf/brokerapi/v12/auth"
"code.cloudfoundry.org/brokerapi/v13/auth"
)

var _ = Describe("Auth Wrapper", func() {
Expand Down
32 changes: 16 additions & 16 deletions catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,60 +18,60 @@ package brokerapi
import (
"reflect"

"github.com/pivotal-cf/brokerapi/v12/domain"
"code.cloudfoundry.org/brokerapi/v13/domain"
)

// Deprecated: Use github.com/pivotal-cf/brokerapi/domain
// Deprecated: Use code.cloudfoundry.org/brokerapi/v13/domain
type Service = domain.Service

// Deprecated: Use github.com/pivotal-cf/brokerapi/domain
// Deprecated: Use code.cloudfoundry.org/brokerapi/v13/domain
type ServiceDashboardClient = domain.ServiceDashboardClient

// Deprecated: Use github.com/pivotal-cf/brokerapi/domain
// Deprecated: Use code.cloudfoundry.org/brokerapi/v13/domain
type ServicePlan = domain.ServicePlan

// Deprecated: Use github.com/pivotal-cf/brokerapi/domain
// Deprecated: Use code.cloudfoundry.org/brokerapi/v13/domain
type ServiceSchemas = domain.ServiceSchemas

// Deprecated: Use github.com/pivotal-cf/brokerapi/domain
// Deprecated: Use code.cloudfoundry.org/brokerapi/v13/domain
type ServiceInstanceSchema = domain.ServiceInstanceSchema

// Deprecated: Use github.com/pivotal-cf/brokerapi/domain
// Deprecated: Use code.cloudfoundry.org/brokerapi/v13/domain
type ServiceBindingSchema = domain.ServiceBindingSchema

// Deprecated: Use github.com/pivotal-cf/brokerapi/domain
// Deprecated: Use code.cloudfoundry.org/brokerapi/v13/domain
type Schema = domain.Schema

// Deprecated: Use github.com/pivotal-cf/brokerapi/domain
// Deprecated: Use code.cloudfoundry.org/brokerapi/v13/domain
type ServicePlanMetadata = domain.ServicePlanMetadata

// Deprecated: Use github.com/pivotal-cf/brokerapi/domain
// Deprecated: Use code.cloudfoundry.org/brokerapi/v13/domain
type ServicePlanCost = domain.ServicePlanCost

// Deprecated: Use github.com/pivotal-cf/brokerapi/domain
// Deprecated: Use code.cloudfoundry.org/brokerapi/v13/domain
type ServiceMetadata = domain.ServiceMetadata

// Deprecated: Use github.com/pivotal-cf/brokerapi/domain
// Deprecated: Use code.cloudfoundry.org/brokerapi/v13/domain
func FreeValue(v bool) *bool {
return domain.FreeValue(v)
}

// Deprecated: Use github.com/pivotal-cf/brokerapi/domain
// Deprecated: Use code.cloudfoundry.org/brokerapi/v13/domain
func BindableValue(v bool) *bool {
return domain.BindableValue(v)
}

// Deprecated: Use github.com/pivotal-cf/brokerapi/domain
// Deprecated: Use code.cloudfoundry.org/brokerapi/v13/domain
type RequiredPermission = domain.RequiredPermission

// Deprecated: Use github.com/pivotal-cf/brokerapi/domain
// Deprecated: Use code.cloudfoundry.org/brokerapi/v13/domain
const (
PermissionRouteForwarding = domain.PermissionRouteForwarding
PermissionSyslogDrain = domain.PermissionSyslogDrain
PermissionVolumeMount = domain.PermissionVolumeMount
)

// Deprecated: Use github.com/pivotal-cf/brokerapi/domain
// Deprecated: Use code.cloudfoundry.org/brokerapi/v13/domain
func GetJsonNames(s reflect.Value) (res []string) {
return domain.GetJsonNames(s)
}
2 changes: 1 addition & 1 deletion catalog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ import (
"reflect"
"sync"

"code.cloudfoundry.org/brokerapi/v13"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/pivotal-cf/brokerapi/v12"
)

var _ = Describe("Catalog", func() {
Expand Down
2 changes: 1 addition & 1 deletion context_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package brokerapi
import (
"context"

"github.com/pivotal-cf/brokerapi/v12/utils"
"code.cloudfoundry.org/brokerapi/v13/utils"
)

func AddServiceToContext(ctx context.Context, service *Service) context.Context {
Expand Down
2 changes: 1 addition & 1 deletion context_utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"

"github.com/pivotal-cf/brokerapi/v12"
"code.cloudfoundry.org/brokerapi/v13"
)

var _ = Describe("Context Utilities", func() {
Expand Down
2 changes: 1 addition & 1 deletion domain/apiresponses/failure_responses_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"log/slog"
"net/http"

"code.cloudfoundry.org/brokerapi/v13/domain/apiresponses"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gbytes"
"github.com/pivotal-cf/brokerapi/v12/domain/apiresponses"
)

var _ = Describe("FailureResponse", func() {
Expand Down
2 changes: 1 addition & 1 deletion domain/apiresponses/responses.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

package apiresponses

import "github.com/pivotal-cf/brokerapi/v12/domain"
import "code.cloudfoundry.org/brokerapi/v13/domain"

type EmptyResponse struct{}

Expand Down
4 changes: 2 additions & 2 deletions domain/apiresponses/responses_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ package apiresponses_test
import (
"encoding/json"

"code.cloudfoundry.org/brokerapi/v13/domain"
"code.cloudfoundry.org/brokerapi/v13/domain/apiresponses"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/pivotal-cf/brokerapi/v12/domain"
"github.com/pivotal-cf/brokerapi/v12/domain/apiresponses"
)

var _ = Describe("Catalog Response", func() {
Expand Down
2 changes: 1 addition & 1 deletion domain/maintenance_info_test.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package domain_test

import (
"code.cloudfoundry.org/brokerapi/v13/domain"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/pivotal-cf/brokerapi/v12/domain"
)

var _ = Describe("MaintenanceInfo", func() {
Expand Down
2 changes: 1 addition & 1 deletion domain/service_catalog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ package domain_test
import (
"encoding/json"

"code.cloudfoundry.org/brokerapi/v13/domain"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/pivotal-cf/brokerapi/v12/domain"
)

var maximumPollingDuration = 3600
Expand Down
2 changes: 1 addition & 1 deletion domain/service_metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ import (
"encoding/json"
"sync"

"code.cloudfoundry.org/brokerapi/v13/domain"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/pivotal-cf/brokerapi/v12/domain"
)

var _ = Describe("ServiceMetadata", func() {
Expand Down
4 changes: 2 additions & 2 deletions domain/service_plan_metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"reflect"
"sync"

"code.cloudfoundry.org/brokerapi/v13"
"code.cloudfoundry.org/brokerapi/v13/domain"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/pivotal-cf/brokerapi/v12"
"github.com/pivotal-cf/brokerapi/v12/domain"
)

var _ = Describe("ServicePlanMetadata", func() {
Expand Down
10 changes: 5 additions & 5 deletions failure_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
package brokerapi

import (
"github.com/pivotal-cf/brokerapi/v12/domain/apiresponses"
"code.cloudfoundry.org/brokerapi/v13/domain/apiresponses"
)

// Deprecated: Use github.com/pivotal-cf/brokerapi/domain/apiresponses
// Deprecated: Use code.cloudfoundry.org/brokerapi/v13/domain/apiresponses
// FailureResponse can be returned from any of the `ServiceBroker` interface methods
// which allow an error to be returned. Doing so will provide greater control over
// the HTTP response.
type FailureResponse = apiresponses.FailureResponse

// Deprecated: Use github.com/pivotal-cf/brokerapi/domain/apiresponses
// Deprecated: Use code.cloudfoundry.org/brokerapi/v13/domain/apiresponses
// NewFailureResponse returns an error of type FailureResponse.
// err will by default be used as both a logging message and HTTP response description.
// statusCode is the HTTP status code to be returned, must be 4xx or 5xx
Expand All @@ -25,11 +25,11 @@ func NewFailureResponse(err error, statusCode int, loggerAction string) error {
return apiresponses.NewFailureResponse(err, statusCode, loggerAction)
}

// Deprecated: Use github.com/pivotal-cf/brokerapi/domain/apiresponses
// Deprecated: Use code.cloudfoundry.org/brokerapi/v13/domain/apiresponses
// FailureResponseBuilder provides a fluent set of methods to build a *FailureResponse.
type FailureResponseBuilder = apiresponses.FailureResponseBuilder

// Deprecated: Use github.com/pivotal-cf/brokerapi/domain/apiresponses
// Deprecated: Use code.cloudfoundry.org/brokerapi/v13/domain/apiresponses
// NewFailureResponseBuilder returns a pointer to a newly instantiated FailureResponseBuilder
// Accepts required arguments to create a FailureResponse.
func NewFailureResponseBuilder(err error, statusCode int, loggerAction string) *FailureResponseBuilder {
Expand Down
4 changes: 2 additions & 2 deletions failure_response_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ import (
"log/slog"
"net/http"

"code.cloudfoundry.org/brokerapi/v13"
"code.cloudfoundry.org/brokerapi/v13/domain/apiresponses"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/onsi/gomega/gbytes"
"github.com/pivotal-cf/brokerapi/v12"
"github.com/pivotal-cf/brokerapi/v12/domain/apiresponses"
)

var _ = Describe("FailureResponse", func() {
Expand Down
2 changes: 1 addition & 1 deletion fakes/auto_fake_service_broker.go

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

6 changes: 3 additions & 3 deletions fakes/fake_service_broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ import (
"errors"
"reflect"

"github.com/pivotal-cf/brokerapi/v12"
"github.com/pivotal-cf/brokerapi/v12/domain"
"github.com/pivotal-cf/brokerapi/v12/domain/apiresponses"
"code.cloudfoundry.org/brokerapi/v13"
"code.cloudfoundry.org/brokerapi/v13/domain"
"code.cloudfoundry.org/brokerapi/v13/domain/apiresponses"
)

type FakeServiceBroker struct {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/pivotal-cf/brokerapi/v12
module code.cloudfoundry.org/brokerapi/v13

go 1.23

Expand Down
4 changes: 2 additions & 2 deletions handlers/api_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"log/slog"
"net/http"

"github.com/pivotal-cf/brokerapi/v12/domain"
"github.com/pivotal-cf/brokerapi/v12/internal/blog"
"code.cloudfoundry.org/brokerapi/v13/domain"
"code.cloudfoundry.org/brokerapi/v13/internal/blog"
)

const (
Expand Down
8 changes: 4 additions & 4 deletions handlers/bind.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import (
"log/slog"
"net/http"

"github.com/pivotal-cf/brokerapi/v12/domain"
"github.com/pivotal-cf/brokerapi/v12/domain/apiresponses"
"github.com/pivotal-cf/brokerapi/v12/internal/blog"
"github.com/pivotal-cf/brokerapi/v12/middlewares"
"code.cloudfoundry.org/brokerapi/v13/domain"
"code.cloudfoundry.org/brokerapi/v13/domain/apiresponses"
"code.cloudfoundry.org/brokerapi/v13/internal/blog"
"code.cloudfoundry.org/brokerapi/v13/middlewares"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions handlers/catalog.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"log/slog"
"net/http"

"github.com/pivotal-cf/brokerapi/v12/domain/apiresponses"
"github.com/pivotal-cf/brokerapi/v12/middlewares"
"code.cloudfoundry.org/brokerapi/v13/domain/apiresponses"
"code.cloudfoundry.org/brokerapi/v13/middlewares"
)

const getCatalogLogKey = "getCatalog"
Expand Down
12 changes: 6 additions & 6 deletions handlers/catalog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ import (
"log/slog"
"net/http"

"code.cloudfoundry.org/brokerapi/v13/domain"
"code.cloudfoundry.org/brokerapi/v13/domain/apiresponses"
brokerFakes "code.cloudfoundry.org/brokerapi/v13/fakes"
"code.cloudfoundry.org/brokerapi/v13/handlers"
"code.cloudfoundry.org/brokerapi/v13/handlers/fakes"
"code.cloudfoundry.org/brokerapi/v13/middlewares"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/pivotal-cf/brokerapi/v12/domain"
"github.com/pivotal-cf/brokerapi/v12/domain/apiresponses"
brokerFakes "github.com/pivotal-cf/brokerapi/v12/fakes"
"github.com/pivotal-cf/brokerapi/v12/handlers"
"github.com/pivotal-cf/brokerapi/v12/handlers/fakes"
"github.com/pivotal-cf/brokerapi/v12/middlewares"
)

var _ = Describe("Services", func() {
Expand Down
8 changes: 4 additions & 4 deletions handlers/deprovision.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"log/slog"
"net/http"

"github.com/pivotal-cf/brokerapi/v12/domain"
"github.com/pivotal-cf/brokerapi/v12/domain/apiresponses"
"github.com/pivotal-cf/brokerapi/v12/internal/blog"
"github.com/pivotal-cf/brokerapi/v12/middlewares"
"code.cloudfoundry.org/brokerapi/v13/domain"
"code.cloudfoundry.org/brokerapi/v13/domain/apiresponses"
"code.cloudfoundry.org/brokerapi/v13/internal/blog"
"code.cloudfoundry.org/brokerapi/v13/middlewares"
)

const deprovisionLogKey = "deprovision"
Expand Down
Loading

0 comments on commit 94be725

Please sign in to comment.