Skip to content

Commit

Permalink
Merge pull request #1137 from jacobbednarz/modernise-workers
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbednarz committed Dec 9, 2022
2 parents d7efda7 + f7fe839 commit 3839b5e
Show file tree
Hide file tree
Showing 17 changed files with 1,263 additions and 1,591 deletions.
39 changes: 39 additions & 0 deletions .changelog/1137.txt
@@ -0,0 +1,39 @@
```release-note:note
workers: all worker methods have been split into product ownership(-ish) files
```

```release-note:note
workers: all worker methods now require an explicit `ResourceContainer` for endpoints instead of relying on the globally defined `api.AccountID`
```

```release-note:breaking-change
workers: method signatures have been updated to align with the upcoming client conventions
```

```release-note:breaking-change
workers: API operations now target account level resources instead of older zone level resources (these are a 1:1 now)
```

```release-note:breaking-change
workers_bindings: method signatures have been updated to align with the upcoming client conventions
```

```release-note:breaking-change
workers_kv: method signatures have been updated to align with the upcoming client conventions
```

```release-note:breaking-change
workers_tails: method signatures have been updated to align with the upcoming client conventions
```

```release-note:breaking-change
workers_secrets: method signatures have been updated to align with the upcoming client conventions
```

```release-note:breaking-change
workers_routes: method signatures have been updated to align with the upcoming client conventions
```

```release-note:breaking-change
workers_cron_triggers: method signatures have been updated to align with the upcoming client conventions
```
5 changes: 4 additions & 1 deletion errors.go
Expand Up @@ -29,7 +29,8 @@ const (
errAPIKeysAndTokensAreMutuallyExclusive = "API keys and tokens are mutually exclusive" //nolint:gosec
errMissingCredentials = "no credentials provided"

errInvalidResourceContainerAccess = "requested resource container (%q) is not supported for this endpoint"
errInvalidResourceContainerAccess = "requested resource container (%q) is not supported for this endpoint"
errRequiredAccountLevelResourceContainer = "this endpoint requires using an account level resource container and identifiers"
)

var (
Expand All @@ -40,6 +41,8 @@ var (
ErrAccountIDOrZoneIDAreRequired = errors.New(errMissingAccountOrZoneID)
ErrAccountIDAndZoneIDAreMutuallyExclusive = errors.New(errAccountIDAndZoneIDAreMutuallyExclusive)
ErrMissingResourceIdentifier = errors.New(errMissingResourceIdentifier)

ErrRequiredAccountLevelResourceContainer = errors.New(errRequiredAccountLevelResourceContainer)
)

type ErrorType string
Expand Down

0 comments on commit 3839b5e

Please sign in to comment.