Documentation ¶
Index ¶
- Constants
- Variables
- func NewDBA(r *DynamoRepository)
- func NewTestDBA(r *MockRepository)
- type DynamoRepository
- func (m *DynamoRepository) GetAsset(ctx context.Context, requestUserId, assetId string) (model.Asset, error)
- func (m *DynamoRepository) ListAssets(ctx context.Context, requestUserId string) ([]model.Asset, error)
- func (m *DynamoRepository) ListOrders(ctx context.Context, userId string) ([]model.Order, error)
- type MockRepository
- func (m *MockRepository) GetAsset(ctx context.Context, requestUserId, assetId string) (model.Asset, error)
- func (m *MockRepository) ListAssets(ctx context.Context, requestUserId string) ([]model.Asset, error)
- func (m *MockRepository) ListOrders(ctx context.Context, userId string) ([]model.Order, error)
- type Repository
Constants ¶
View Source
const OrderIdIndex = "OrderIdGsi"
Variables ¶
View Source
var ( ListAssetsNotFound = "4AC6E407-1D8E-4339-BA1C-862ACC58AC5E" ListAssetsFound = "20032259-738B-40A7-AAD7-306B69AF88D4" GetAssetNotFound = "E6096F2D-C706-42B6-B0E5-D7DD644ED079" GetAsset = "AC032259-738B-40A7-AAD7-306B69AAB909" ListOrders = "9165BBBF-02B8-408C-8345-04C34D8C1594" ListOrdersNotFound = "8FE47FE3-3B80-44EF-AEBF-DE9A1DF7491E" )
Functions ¶
func NewTestDBA ¶
func NewTestDBA(r *MockRepository)
Types ¶
type DynamoRepository ¶
Repository is the repository type
var Repo *DynamoRepository
Repo the repository used by dynamo
func NewRepo ¶
func NewRepo(a *config.AppConfig, cfg awsConfig.Config) *DynamoRepository
NewRepo creates a new repository
func (*DynamoRepository) ListAssets ¶
func (*DynamoRepository) ListOrders ¶
type MockRepository ¶
var TestRepo *MockRepository
func (*MockRepository) ListAssets ¶
func (*MockRepository) ListOrders ¶
Click to show internal directories.
Click to hide internal directories.