Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use aws-sdk-go-v2 #43

Open
wants to merge 70 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
ac0984e
go get github.com/aws/aws-sdk-go-v2/service/dynamodb
shamaton Apr 22, 2023
67df3b2
import github.com/aws/aws-sdk-go-v2/service/dynamodb
shamaton Apr 22, 2023
9bd6e90
fix dax/internal/client/projection.go
shamaton Apr 22, 2023
45cf488
fix translate methods @ request.go
shamaton Apr 22, 2023
0ecfa56
fix expressions
shamaton Apr 22, 2023
02e0852
use aws-sdk-go-v2/service/dynamodb @ request.go
shamaton Apr 22, 2023
aba99e9
use aws-sdk-go-v2/service/dynamodb @ attrval.go
shamaton Apr 22, 2023
9dcab3b
use aws-sdk-go-v2/service/dynamodb @ item.go
shamaton Apr 22, 2023
7f20648
use aws-sdk-go-v2/service/dynamodb @ response.go
shamaton Apr 22, 2023
4f55f2a
use aws-sdk-go-v2/service/dynamodb @ projection.go
shamaton Apr 23, 2023
f8a8bf9
use aws-sdk-go-v2/service/dynamodb @ single.go
shamaton Apr 23, 2023
8be6663
add github.com/aws/aws-sdk-go-v2
shamaton Apr 25, 2023
4879ea2
fix internal/cbor tests
shamaton Apr 25, 2023
cb867a9
fix internal/parser tests
shamaton Apr 25, 2023
39f8355
fix api_test, pagination_test
shamaton May 8, 2023
e848698
use smithy error in cbor
shamaton May 12, 2023
65beca5
add client logger to replace aws.Logger
shamaton May 14, 2023
61804f1
use client.Logger
shamaton May 14, 2023
1be9c6e
dax.Dax is compatible to v2 dynamodb
shamaton May 16, 2023
1cec2eb
use v2 credential provider
shamaton May 18, 2023
a30a414
fix client tests
shamaton May 18, 2023
d303535
update client package
shamaton May 18, 2023
3e8e422
use smithy-go logging
shamaton May 18, 2023
285c129
fix config.HostPorts
shamaton May 18, 2023
e2397b6
fix service_test
shamaton May 18, 2023
46730e4
WithSession functions replace to WithSDKConfig
shamaton May 18, 2023
8172ddf
fix logger called method
shamaton May 18, 2023
b5a67d6
delete NewDaxRequest
shamaton May 20, 2023
d75a83a
use v2 aws.Retryer
shamaton May 23, 2023
5190eb4
use context.Context
shamaton May 24, 2023
32b57c7
set timeout with context
shamaton May 24, 2023
b09eba9
No need to initialize and pass variables
shamaton May 25, 2023
198eba8
delete send/build methods
shamaton May 25, 2023
708eb7b
no need clientBuilder interface
shamaton May 26, 2023
9b62c58
use smithy error in cluster.go
shamaton May 26, 2023
e814f0b
replace from aws2 to aws
shamaton May 26, 2023
d2fc584
use smithy error in single.go
shamaton May 26, 2023
b27696f
rename method from SetTimeout to ContextWithTimeout
shamaton May 27, 2023
506e751
use context.Context in single.go
shamaton May 27, 2023
16f8b4f
fix tubePool.logDebug
shamaton May 27, 2023
277dd5f
always return smithy.OperationError when calling api
shamaton May 27, 2023
a83e5b0
fix stub.go
shamaton May 27, 2023
ace3dbd
fix error objects in cbor package
shamaton May 27, 2023
0c93956
fix error objects in parser package
shamaton May 28, 2023
6db3e5f
use context.Context in lru.go
shamaton May 28, 2023
fac8c61
fix regacy.go
shamaton May 28, 2023
400127a
fix error objects in client package
shamaton May 29, 2023
6b70746
use context.Context in client package
shamaton May 29, 2023
8ec50c0
comment out ValidateConfig
shamaton May 29, 2023
f4821e5
no need translateError
shamaton May 29, 2023
ada7f8f
fix error objects in client package
shamaton May 29, 2023
b69deec
make client package buildable
shamaton May 31, 2023
0b6c683
use context.Context in lru
shamaton May 31, 2023
1ad0877
fix TestTranslateLegacyNegative
shamaton Jun 1, 2023
91d6cde
fix cluster codes and tests
shamaton Jun 1, 2023
1804a9d
fix single_test
shamaton Jun 1, 2023
8ac48ad
update go.mod, not required github.com/aws/aws-sdk-go
shamaton Jun 1, 2023
9ff4a05
fix legacy.go
shamaton Jun 2, 2023
8688bf1
fix projection codes and tests
shamaton Jun 2, 2023
20de45b
fix error_test.go
shamaton Jun 2, 2023
d8872c6
CreateGlobalTableRequest is not available in dynamodb
shamaton Jun 2, 2023
0df8dc4
implement paging functionality if necessary
shamaton Jun 2, 2023
5d1e5d7
if ProjectionExpression is not nil, Should set Select type
shamaton Jun 9, 2023
9a96dfb
delete config validation and request_options tests
shamaton Jun 9, 2023
99cf40a
delete dax original retryer
shamaton Jun 9, 2023
5cc083a
delete unused code in convertDaxError
shamaton Jun 9, 2023
39275d2
delete masked BatchGetItemPages function
shamaton Aug 1, 2023
9154e67
Merge branch 'master' into v2
shamaton Aug 1, 2023
eaf620e
eliminate Config.RequestTimeout
shamaton Sep 16, 2023
14b0693
Merge remote-tracking branch 'upstream/master' into v2
shamaton Jan 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
delete unused code in convertDaxError
shamaton committed Jun 9, 2023
commit 5cc083af47c92108ceb07bd042b90ef4c512a663
17 changes: 0 additions & 17 deletions dax/internal/client/error.go
Original file line number Diff line number Diff line change
@@ -239,22 +239,16 @@ func convertDaxError(e daxError) error {
if len(codes) < 2 {
return e
}
//md := protocol.ResponseMetadata{
// StatusCode: e.StatusCode(),
// RequestID: e.RequestID(),
//}
switch codes[1] {
case 23:
if len(codes) > 2 {
switch codes[2] {
case 24:
return &types.ResourceNotFoundException{
//RespMetadata: md,
Message: aws.String(e.Error()),
}
case 35:
return &types.ResourceInUseException{
//RespMetadata: md,
Message: aws.String(e.Error()),
}
}
@@ -267,22 +261,18 @@ func convertDaxError(e daxError) error {
switch codes[4] {
case 40:
return &types.ProvisionedThroughputExceededException{
//RespMetadata: md,
Message: aws.String(e.Error()),
}
case 41:
return &types.ResourceNotFoundException{
//RespMetadata: md,
Message: aws.String(e.Error()),
}
case 43:
return &types.ConditionalCheckFailedException{
//RespMetadata: md,
Message: aws.String(e.Error()),
}
case 45:
return &types.ResourceInUseException{
//RespMetadata: md,
Message: aws.String(e.Error())}
case 46:
// there's no dynamodb.ValidationException type
@@ -293,17 +283,14 @@ func convertDaxError(e daxError) error {
}
case 47:
return &types.InternalServerError{
//RespMetadata: md,
Message: aws.String(e.Error()),
}
case 48:
return &types.ItemCollectionSizeLimitExceededException{
//RespMetadata: md,
Message: aws.String(e.Error()),
}
case 49:
return &types.LimitExceededException{
//RespMetadata: md,
Message: aws.String(e.Error()),
}
case 50:
@@ -315,14 +302,12 @@ func convertDaxError(e daxError) error {
}
case 57:
return &types.TransactionConflictException{
//RespMetadata: md,
Message: aws.String(e.Error()),
}
case 58:
tcFailure, ok := e.(*daxTransactionCanceledFailure)
if ok {
return &types.TransactionCanceledException{
//RespMetadata: md,
Message: aws.String(e.Error()),
CancellationReasons: tcFailure.cancellationReasons,
}
@@ -333,12 +318,10 @@ func convertDaxError(e daxError) error {
}
case 59:
return &types.TransactionInProgressException{
//RespMetadata: md,
Message: aws.String(e.Error()),
}
case 60:
return &types.IdempotentParameterMismatchException{
//RespMetadata: md,
Message: aws.String(e.Error()),
}
}