Skip to content

Commit

Permalink
Update provider based on openapi.yaml changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pmalek committed Nov 25, 2024
1 parent e870055 commit f259a13
Show file tree
Hide file tree
Showing 43 changed files with 1,400 additions and 288 deletions.
10 changes: 5 additions & 5 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ id: b81e5def-5b1e-4753-ae7c-0efccc2e6f61
management:
docChecksum: 621f79fe092199d80a95ca5aa0238ebc
docVersion: 0.0.1
speakeasyVersion: 1.441.0
generationVersion: 2.460.1
releaseVersion: 0.1.7
configChecksum: db304f60e3a64fc47b514a7de5d55c5b
speakeasyVersion: 1.444.4
generationVersion: 2.461.4
releaseVersion: 0.1.8
configChecksum: df33a88d43c66b96ed2dbd72421eaee2
features:
go:
additionalDependencies: 0.1.0
Expand All @@ -25,7 +25,7 @@ features:
nameOverrides: 2.81.2
nullables: 0.1.0
responseFormat: 0.1.2
retries: 2.83.0
retries: 2.83.1
sdkHooks: 0.1.0
tests: 0.6.0
unions: 2.85.10
Expand Down
38 changes: 31 additions & 7 deletions acls.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/Kong/sdk-konnect-go/models/components"
"github.com/Kong/sdk-konnect-go/models/operations"
"github.com/Kong/sdk-konnect-go/models/sdkerrors"
"github.com/cenkalti/backoff/v4"
"github.com/Kong/sdk-konnect-go/retry"
"net/http"
)

Expand Down Expand Up @@ -109,7 +109,11 @@ func (s *ACLs) ListACL(ctx context.Context, request operations.ListACLRequest, o

req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, backoff.Permanent(err)
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}

return nil, retry.Permanent(err)
}

httpRes, err := s.sdkConfiguration.Client.Do(req)
Expand Down Expand Up @@ -317,7 +321,11 @@ func (s *ACLs) ListACLWithConsumer(ctx context.Context, request operations.ListA

req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, backoff.Permanent(err)
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}

return nil, retry.Permanent(err)
}

httpRes, err := s.sdkConfiguration.Client.Do(req)
Expand Down Expand Up @@ -506,7 +514,11 @@ func (s *ACLs) CreateACLWithConsumer(ctx context.Context, request operations.Cre

req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, backoff.Permanent(err)
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}

return nil, retry.Permanent(err)
}

httpRes, err := s.sdkConfiguration.Client.Do(req)
Expand Down Expand Up @@ -689,7 +701,11 @@ func (s *ACLs) DeleteACLWithConsumer(ctx context.Context, request operations.Del

req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, backoff.Permanent(err)
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}

return nil, retry.Permanent(err)
}

httpRes, err := s.sdkConfiguration.Client.Do(req)
Expand Down Expand Up @@ -852,7 +868,11 @@ func (s *ACLs) GetACLWithConsumer(ctx context.Context, request operations.GetACL

req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, backoff.Permanent(err)
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}

return nil, retry.Permanent(err)
}

httpRes, err := s.sdkConfiguration.Client.Do(req)
Expand Down Expand Up @@ -1043,7 +1063,11 @@ func (s *ACLs) UpsertACLWithConsumer(ctx context.Context, request operations.Ups

req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, backoff.Permanent(err)
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}

return nil, retry.Permanent(err)
}

httpRes, err := s.sdkConfiguration.Client.Do(req)
Expand Down
38 changes: 31 additions & 7 deletions apikeys.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/Kong/sdk-konnect-go/models/components"
"github.com/Kong/sdk-konnect-go/models/operations"
"github.com/Kong/sdk-konnect-go/models/sdkerrors"
"github.com/cenkalti/backoff/v4"
"github.com/Kong/sdk-konnect-go/retry"
"net/http"
)

Expand Down Expand Up @@ -109,7 +109,11 @@ func (s *APIKeys) ListKeyAuthWithConsumer(ctx context.Context, request operation

req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, backoff.Permanent(err)
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}

return nil, retry.Permanent(err)
}

httpRes, err := s.sdkConfiguration.Client.Do(req)
Expand Down Expand Up @@ -298,7 +302,11 @@ func (s *APIKeys) CreateKeyAuthWithConsumer(ctx context.Context, request operati

req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, backoff.Permanent(err)
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}

return nil, retry.Permanent(err)
}

httpRes, err := s.sdkConfiguration.Client.Do(req)
Expand Down Expand Up @@ -481,7 +489,11 @@ func (s *APIKeys) DeleteKeyAuthWithConsumer(ctx context.Context, request operati

req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, backoff.Permanent(err)
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}

return nil, retry.Permanent(err)
}

httpRes, err := s.sdkConfiguration.Client.Do(req)
Expand Down Expand Up @@ -644,7 +656,11 @@ func (s *APIKeys) GetKeyAuthWithConsumer(ctx context.Context, request operations

req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, backoff.Permanent(err)
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}

return nil, retry.Permanent(err)
}

httpRes, err := s.sdkConfiguration.Client.Do(req)
Expand Down Expand Up @@ -835,7 +851,11 @@ func (s *APIKeys) UpsertKeyAuthWithConsumer(ctx context.Context, request operati

req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, backoff.Permanent(err)
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}

return nil, retry.Permanent(err)
}

httpRes, err := s.sdkConfiguration.Client.Do(req)
Expand Down Expand Up @@ -1022,7 +1042,11 @@ func (s *APIKeys) ListKeyAuth(ctx context.Context, request operations.ListKeyAut

req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, backoff.Permanent(err)
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}

return nil, retry.Permanent(err)
}

httpRes, err := s.sdkConfiguration.Client.Do(req)
Expand Down
8 changes: 6 additions & 2 deletions authentication.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/Kong/sdk-konnect-go/internal/utils"
"github.com/Kong/sdk-konnect-go/models/operations"
"github.com/Kong/sdk-konnect-go/models/sdkerrors"
"github.com/cenkalti/backoff/v4"
"github.com/Kong/sdk-konnect-go/retry"
"net/http"
)

Expand Down Expand Up @@ -118,7 +118,11 @@ func (s *Authentication) AuthenticateSso(ctx context.Context, organizationLoginP

req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, backoff.Permanent(err)
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}

return nil, retry.Permanent(err)
}

httpRes, err := s.sdkConfiguration.Client.Do(req)
Expand Down
50 changes: 41 additions & 9 deletions authsettings.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/Kong/sdk-konnect-go/models/components"
"github.com/Kong/sdk-konnect-go/models/operations"
"github.com/Kong/sdk-konnect-go/models/sdkerrors"
"github.com/cenkalti/backoff/v4"
"github.com/Kong/sdk-konnect-go/retry"
"net/http"
"net/url"
)
Expand Down Expand Up @@ -111,7 +111,11 @@ func (s *AuthSettings) GetAuthenticationSettings(ctx context.Context, opts ...op

req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, backoff.Permanent(err)
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}

return nil, retry.Permanent(err)
}

httpRes, err := s.sdkConfiguration.Client.Do(req)
Expand Down Expand Up @@ -326,7 +330,11 @@ func (s *AuthSettings) UpdateAuthenticationSettings(ctx context.Context, request

req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, backoff.Permanent(err)
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}

return nil, retry.Permanent(err)
}

httpRes, err := s.sdkConfiguration.Client.Do(req)
Expand Down Expand Up @@ -558,7 +566,11 @@ func (s *AuthSettings) GetIdpConfiguration(ctx context.Context, opts ...operatio

req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, backoff.Permanent(err)
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}

return nil, retry.Permanent(err)
}

httpRes, err := s.sdkConfiguration.Client.Do(req)
Expand Down Expand Up @@ -836,7 +848,11 @@ func (s *AuthSettings) UpdateIdpConfiguration(ctx context.Context, request *comp

req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, backoff.Permanent(err)
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}

return nil, retry.Permanent(err)
}

httpRes, err := s.sdkConfiguration.Client.Do(req)
Expand Down Expand Up @@ -1078,7 +1094,11 @@ func (s *AuthSettings) GetTeamGroupMappings(ctx context.Context, pageSize *int64

req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, backoff.Permanent(err)
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}

return nil, retry.Permanent(err)
}

httpRes, err := s.sdkConfiguration.Client.Do(req)
Expand Down Expand Up @@ -1340,7 +1360,11 @@ func (s *AuthSettings) PatchTeamGroupMappings(ctx context.Context, request *comp

req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, backoff.Permanent(err)
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}

return nil, retry.Permanent(err)
}

httpRes, err := s.sdkConfiguration.Client.Do(req)
Expand Down Expand Up @@ -1597,7 +1621,11 @@ func (s *AuthSettings) UpdateIdpTeamMappings(ctx context.Context, request *compo

req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, backoff.Permanent(err)
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}

return nil, retry.Permanent(err)
}

httpRes, err := s.sdkConfiguration.Client.Do(req)
Expand Down Expand Up @@ -1878,7 +1906,11 @@ func (s *AuthSettings) GetIdpTeamMappings(ctx context.Context, pageSize *int64,

req, err = s.sdkConfiguration.Hooks.BeforeRequest(hooks.BeforeRequestContext{HookContext: hookCtx}, req)
if err != nil {
return nil, backoff.Permanent(err)
if retry.IsPermanentError(err) || retry.IsTemporaryError(err) {
return nil, err
}

return nil, retry.Permanent(err)
}

httpRes, err := s.sdkConfiguration.Client.Do(req)
Expand Down
Loading

0 comments on commit f259a13

Please sign in to comment.