sqs-browse: remove assumption regarding table keys
Table keys are now retrieved from describe
This commit is contained in:
parent
3428bd2a8a
commit
5a69e6c954
47 changed files with 150 additions and 98 deletions
|
|
@ -2,6 +2,7 @@ package tables
|
|||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/aws/aws-sdk-go-v2/service/dynamodb/types"
|
||||
"github.com/lmika/awstools/internal/dynamo-browse/models"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -2,9 +2,10 @@ package tables
|
|||
|
||||
import (
|
||||
"context"
|
||||
"sort"
|
||||
|
||||
"github.com/lmika/awstools/internal/dynamo-browse/models"
|
||||
"github.com/pkg/errors"
|
||||
"sort"
|
||||
)
|
||||
|
||||
type Service struct {
|
||||
|
|
@ -63,9 +64,9 @@ func (s *Service) Scan(ctx context.Context, tableInfo *models.TableInfo) (*model
|
|||
models.Sort(results, tableInfo)
|
||||
|
||||
return &models.ResultSet{
|
||||
TableInfo: tableInfo,
|
||||
Columns: columns,
|
||||
Items: results,
|
||||
TableInfo: tableInfo,
|
||||
Columns: columns,
|
||||
Items: results,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,11 +2,12 @@ package tables_test
|
|||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
"github.com/lmika/awstools/internal/dynamo-browse/providers/dynamo"
|
||||
"github.com/lmika/awstools/internal/dynamo-browse/services/tables"
|
||||
"github.com/lmika/awstools/test/testdynamo"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestService_Describe(t *testing.T) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue