MCPcopy Create free account

hub / github.com/aws-samples/serverless-go-demo / functions

Functions63 in github.com/aws-samples/serverless-go-demo

↓ 11 callersFunctionerrResponse
(status int, body string)
handlers/apigateway.go:106
↓ 7 callersMethodAllProducts
(ctx context.Context, next *string)
domain/products.go:37
↓ 6 callersFunctionNewProductsDomain
(s types.Store)
domain/products.go:22
↓ 4 callersMethodAll
(context.Context, *string)
types/store.go:10
↓ 4 callersMethodGetProduct
(ctx context.Context, id string)
domain/products.go:28
↓ 4 callersFunctionNewAPIGatewayV2Handler
(d *domain.Products)
handlers/apigateway.go:19
↓ 4 callersFunctionNewDynamoDBStore
(ctx context.Context, tableName string)
store/dynamodb.go:24
↓ 4 callersFunctionresponse
(code int, object interface{})
handlers/apigateway.go:90
↓ 3 callersMethodEXPECT
EXPECT returns an object that allows the caller to indicate expected use.
types/mocks/mock_store.go:34
↓ 3 callersFunctionNewMemoryStore
()
store/memory.go:18
↓ 3 callersFunctionNewMockStore
NewMockStore creates a new mock instance.
types/mocks/mock_store.go:27
↓ 3 callersFunctiongetRandomProduct
()
integration-testing/integration_test.go:29
↓ 2 callersMethodGet
(context.Context, string)
types/store.go:11
↓ 2 callersMethodPut
(context.Context, []Event)
types/bus.go:19
↓ 2 callersMethodPut
(ctx context.Context, p types.Product)
store/memory.go:46
↓ 2 callersFunctionrandomString
(length int)
integration-testing/integration_test.go:22
↓ 1 callersMethodDelete
(context.Context, string)
types/store.go:13
↓ 1 callersMethodDeleteProduct
(ctx context.Context, id string)
domain/products.go:68
↓ 1 callersFunctionNewDynamoDBEventHandler
(p *domain.ProductsStream)
handlers/dynamodb.go:27
↓ 1 callersFunctionNewEventBridgeBus
(ctx context.Context, busName string)
bus/event_bridge.go:23
↓ 1 callersMethodPublish
(ctx context.Context, events []types.Event)
domain/products_stream.go:20
↓ 1 callersMethodPutProduct
(ctx context.Context, id string, body []byte)
domain/products.go:50
↓ 1 callersFunctionbatchEvents
(events []types.Event, maxBatchSize uint, batchFn func([]types.Event) ([]types.FailedEvent, error))
bus/event_bridge.go:85
↓ 1 callersFunctioneventFromDynamoDBRecord
(record events.DynamoDBEventRecord)
handlers/dynamodb.go:57
MethodAll
All mocks base method.
types/mocks/mock_store.go:39
MethodAll
All indicates an expected call of All.
types/mocks/mock_store.go:48
MethodAll
(ctx context.Context, next *string)
store/dynamodb.go:38
MethodAll
(ctx context.Context, next *string)
store/memory.go:24
MethodAllHandler
(ctx context.Context, event events.APIGatewayV2HTTPRequest)
handlers/apigateway.go:25
MethodDelete
Delete mocks base method.
types/mocks/mock_store.go:54
MethodDelete
Delete indicates an expected call of Delete.
types/mocks/mock_store.go:62
MethodDelete
(ctx context.Context, id string)
store/dynamodb.go:119
MethodDelete
(ctx context.Context, id string)
store/memory.go:52
MethodDeleteHandler
(ctx context.Context, event events.APIGatewayV2HTTPRequest)
handlers/apigateway.go:76
MethodGet
Get mocks base method.
types/mocks/mock_store.go:68
MethodGet
Get indicates an expected call of Get.
types/mocks/mock_store.go:77
MethodGet
(ctx context.Context, id string)
store/dynamodb.go:75
MethodGet
(ctx context.Context, id string)
store/memory.go:37
MethodGetHandler
(ctx context.Context, event events.APIGatewayV2HTTPRequest)
handlers/apigateway.go:36
FunctionNewProductsStream
(b types.Bus)
domain/products_stream.go:14
MethodPut
(context.Context, Product)
types/store.go:12
MethodPut
Put mocks base method.
types/mocks/mock_store.go:83
MethodPut
Put indicates an expected call of Put.
types/mocks/mock_store.go:91
MethodPut
(ctx context.Context, product types.Product)
store/dynamodb.go:101
MethodPut
(ctx context.Context, events []types.Event)
bus/event_bridge.go:37
MethodPutHandler
(ctx context.Context, event events.APIGatewayV2HTTPRequest)
handlers/apigateway.go:54
MethodStreamHandler
(ctx context.Context, event events.DynamoDBEvent)
handlers/dynamodb.go:33
FunctionTestAllProducts
(t *testing.T)
domain/products_test.go:138
FunctionTestAllProductsInternalStoreError
(t *testing.T)
domain/products_test.go:116
FunctionTestAllProductsWithInvalidNext
(t *testing.T)
domain/products_test.go:88
FunctionTestFlow
(t *testing.T)
integration-testing/integration_test.go:48
FunctionTestGetExistingProduct
(t *testing.T)
domain/products_test.go:31
FunctionTestGetInternalStoreError
(t *testing.T)
domain/products_test.go:62
FunctionTestGetProductNotFound
(t *testing.T)
domain/products_test.go:17
FunctionTestProductEmpty
(t *testing.T)
integration-testing/integration_test.go:198
FunctionTestPutProductInvalidBody
(t *testing.T)
integration-testing/integration_test.go:223
FunctionTestPutProductWithInvalidId
(t *testing.T)
integration-testing/integration_test.go:165
Functioninit
()
integration-testing/integration_test.go:39
Functionmain
()
functions/put-product/main.go:14
Functionmain
()
functions/get-products/main.go:14
Functionmain
()
functions/products-stream/main.go:14
Functionmain
()
functions/get-product/main.go:14
Functionmain
()
functions/delete-product/main.go:14