adapter

package
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 21, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateProductDeleteRepository added in v0.0.2

func CreateProductDeleteRepository(dependencies map[string]interface{}) (domain.ProductDeleteRepository, error)

func CreateProductFindAllRepository added in v0.0.2

func CreateProductFindAllRepository(dependencies map[string]interface{}) (domain.ProductFindAllRepository, error)

func CreateProductFindRepository added in v0.0.2

func CreateProductFindRepository(dependencies map[string]interface{}) (domain.ProductFindRepository, error)

func CreateProductSaveRepository added in v0.0.2

func CreateProductSaveRepository(dependencies map[string]interface{}) (domain.ProductSaveRepository, error)

func NewDynamoDbProductDeleteRepository added in v0.0.2

func NewDynamoDbProductDeleteRepository(db DynamoDBAPI, tableName string) domain.ProductDeleteRepository

func NewDynamoDbProductFindAllRepository added in v0.0.2

func NewDynamoDbProductFindAllRepository(db DynamoDBAPI, tableName string) domain.ProductFindAllRepository

func NewDynamoDbProductFindRepository added in v0.0.2

func NewDynamoDbProductFindRepository(db DynamoDBAPI, tableName string) domain.ProductFindRepository

func NewDynamoDbProductSaveRepository added in v0.0.2

func NewDynamoDbProductSaveRepository(db DynamoDBAPI, tableName string) domain.ProductSaveRepository

Types

type DynamoDBAPI

type DynamoDBAPI interface {
	PutItem(ctx context.Context, params *dynamodb.PutItemInput, optFns ...func(*dynamodb.Options)) (*dynamodb.PutItemOutput, error)
	GetItem(ctx context.Context, params *dynamodb.GetItemInput, optFns ...func(*dynamodb.Options)) (*dynamodb.GetItemOutput, error)
	Scan(ctx context.Context, params *dynamodb.ScanInput, optFns ...func(*dynamodb.Options)) (*dynamodb.ScanOutput, error)
	DeleteItem(ctx context.Context, params *dynamodb.DeleteItemInput, optFns ...func(*dynamodb.Options)) (*dynamodb.DeleteItemOutput, error)
}

type DynamoDbProductEntity

type DynamoDbProductEntity struct {
	ID          string    `json:"id" dynamodbav:"id"`
	Name        string    `json:"name" dynamodbav:"name"`
	Description string    `json:"description" dynamodbav:"description"`
	Price       float64   `json:"price" dynamodbav:"price"`
	CreatedAt   time.Time `json:"created_at" dynamodbav:"created_at"`
	UpdatedAt   time.Time `json:"updated_at" dynamodbav:"updated_at"`
}

func NewProductEntityFromDomain

func NewProductEntityFromDomain(product *domain.Product) (*DynamoDbProductEntity, error)

func (*DynamoDbProductEntity) ToDomain

func (pe *DynamoDbProductEntity) ToDomain() (*domain.Product, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL