Most of the new models have been reimplemented
This commit is contained in:
parent
7a5584cf9a
commit
aa828df3ae
19 changed files with 226 additions and 156 deletions
|
|
@ -8,6 +8,7 @@ import (
|
|||
)
|
||||
|
||||
type TableProvider interface {
|
||||
ListTables(ctx context.Context) ([]string, error)
|
||||
DescribeTable(ctx context.Context, tableName string) (*models.TableInfo, error)
|
||||
ScanItems(ctx context.Context, tableName string) ([]models.Item, error)
|
||||
DeleteItem(ctx context.Context, tableName string, key map[string]types.AttributeValue) error
|
||||
|
|
|
|||
|
|
@ -18,6 +18,10 @@ func NewService(provider TableProvider) *Service {
|
|||
}
|
||||
}
|
||||
|
||||
func (s *Service) ListTables(ctx context.Context) ([]string, error) {
|
||||
return s.provider.ListTables(ctx)
|
||||
}
|
||||
|
||||
func (s *Service) Describe(ctx context.Context, table string) (*models.TableInfo, error) {
|
||||
return s.provider.DescribeTable(ctx, table)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue