Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/aws-samples/serverless-go-demo
/ functions
Functions
63 in github.com/aws-samples/serverless-go-demo
⨍
Functions
63
◇
Types & classes
17
↓ 11 callers
Function
errResponse
(status int, body string)
handlers/apigateway.go:106
↓ 7 callers
Method
AllProducts
(ctx context.Context, next *string)
domain/products.go:37
↓ 6 callers
Function
NewProductsDomain
(s types.Store)
domain/products.go:22
↓ 4 callers
Method
All
(context.Context, *string)
types/store.go:10
↓ 4 callers
Method
GetProduct
(ctx context.Context, id string)
domain/products.go:28
↓ 4 callers
Function
NewAPIGatewayV2Handler
(d *domain.Products)
handlers/apigateway.go:19
↓ 4 callers
Function
NewDynamoDBStore
(ctx context.Context, tableName string)
store/dynamodb.go:24
↓ 4 callers
Function
response
(code int, object interface{})
handlers/apigateway.go:90
↓ 3 callers
Method
EXPECT
EXPECT returns an object that allows the caller to indicate expected use.
types/mocks/mock_store.go:34
↓ 3 callers
Function
NewMemoryStore
()
store/memory.go:18
↓ 3 callers
Function
NewMockStore
NewMockStore creates a new mock instance.
types/mocks/mock_store.go:27
↓ 3 callers
Function
getRandomProduct
()
integration-testing/integration_test.go:29
↓ 2 callers
Method
Get
(context.Context, string)
types/store.go:11
↓ 2 callers
Method
Put
(context.Context, []Event)
types/bus.go:19
↓ 2 callers
Method
Put
(ctx context.Context, p types.Product)
store/memory.go:46
↓ 2 callers
Function
randomString
(length int)
integration-testing/integration_test.go:22
↓ 1 callers
Method
Delete
(context.Context, string)
types/store.go:13
↓ 1 callers
Method
DeleteProduct
(ctx context.Context, id string)
domain/products.go:68
↓ 1 callers
Function
NewDynamoDBEventHandler
(p *domain.ProductsStream)
handlers/dynamodb.go:27
↓ 1 callers
Function
NewEventBridgeBus
(ctx context.Context, busName string)
bus/event_bridge.go:23
↓ 1 callers
Method
Publish
(ctx context.Context, events []types.Event)
domain/products_stream.go:20
↓ 1 callers
Method
PutProduct
(ctx context.Context, id string, body []byte)
domain/products.go:50
↓ 1 callers
Function
batchEvents
(events []types.Event, maxBatchSize uint, batchFn func([]types.Event) ([]types.FailedEvent, error))
bus/event_bridge.go:85
↓ 1 callers
Function
eventFromDynamoDBRecord
(record events.DynamoDBEventRecord)
handlers/dynamodb.go:57
Method
All
All mocks base method.
types/mocks/mock_store.go:39
Method
All
All indicates an expected call of All.
types/mocks/mock_store.go:48
Method
All
(ctx context.Context, next *string)
store/dynamodb.go:38
Method
All
(ctx context.Context, next *string)
store/memory.go:24
Method
AllHandler
(ctx context.Context, event events.APIGatewayV2HTTPRequest)
handlers/apigateway.go:25
Method
Delete
Delete mocks base method.
types/mocks/mock_store.go:54
Method
Delete
Delete indicates an expected call of Delete.
types/mocks/mock_store.go:62
Method
Delete
(ctx context.Context, id string)
store/dynamodb.go:119
Method
Delete
(ctx context.Context, id string)
store/memory.go:52
Method
DeleteHandler
(ctx context.Context, event events.APIGatewayV2HTTPRequest)
handlers/apigateway.go:76
Method
Get
Get mocks base method.
types/mocks/mock_store.go:68
Method
Get
Get indicates an expected call of Get.
types/mocks/mock_store.go:77
Method
Get
(ctx context.Context, id string)
store/dynamodb.go:75
Method
Get
(ctx context.Context, id string)
store/memory.go:37
Method
GetHandler
(ctx context.Context, event events.APIGatewayV2HTTPRequest)
handlers/apigateway.go:36
Function
NewProductsStream
(b types.Bus)
domain/products_stream.go:14
Method
Put
(context.Context, Product)
types/store.go:12
Method
Put
Put mocks base method.
types/mocks/mock_store.go:83
Method
Put
Put indicates an expected call of Put.
types/mocks/mock_store.go:91
Method
Put
(ctx context.Context, product types.Product)
store/dynamodb.go:101
Method
Put
(ctx context.Context, events []types.Event)
bus/event_bridge.go:37
Method
PutHandler
(ctx context.Context, event events.APIGatewayV2HTTPRequest)
handlers/apigateway.go:54
Method
StreamHandler
(ctx context.Context, event events.DynamoDBEvent)
handlers/dynamodb.go:33
Function
TestAllProducts
(t *testing.T)
domain/products_test.go:138
Function
TestAllProductsInternalStoreError
(t *testing.T)
domain/products_test.go:116
Function
TestAllProductsWithInvalidNext
(t *testing.T)
domain/products_test.go:88
Function
TestFlow
(t *testing.T)
integration-testing/integration_test.go:48
Function
TestGetExistingProduct
(t *testing.T)
domain/products_test.go:31
Function
TestGetInternalStoreError
(t *testing.T)
domain/products_test.go:62
Function
TestGetProductNotFound
(t *testing.T)
domain/products_test.go:17
Function
TestProductEmpty
(t *testing.T)
integration-testing/integration_test.go:198
Function
TestPutProductInvalidBody
(t *testing.T)
integration-testing/integration_test.go:223
Function
TestPutProductWithInvalidId
(t *testing.T)
integration-testing/integration_test.go:165
Function
init
()
integration-testing/integration_test.go:39
Function
main
()
functions/put-product/main.go:14
Function
main
()
functions/get-products/main.go:14
Function
main
()
functions/products-stream/main.go:14
Function
main
()
functions/get-product/main.go:14
Function
main
()
functions/delete-product/main.go:14