Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/aws-samples/serverless-rust-demo
/ functions
Functions
97 in github.com/aws-samples/serverless-rust-demo
⨍
Functions
97
◇
Types & classes
22
↓ 15 callers
Function
response
HTTP Response with a JSON payload
src/entrypoints/lambda/apigateway.rs:215
↓ 12 callers
Method
into
(self)
src/store/memory.rs:80
↓ 8 callers
Method
get
(&self, id: &str)
src/store/memory.rs:44
↓ 8 callers
Method
put
(&self, product: &Product)
src/store/memory.rs:51
↓ 6 callers
Function
get_mock_config
Config for mocking DynamoDB
src/store/dynamodb/mod.rs:156
↓ 5 callers
Function
setup_tracing
Setup tracing
src/utils.rs:5
↓ 4 callers
Method
all
(&self, _: Option<&str>)
src/store/memory.rs:28
↓ 4 callers
Method
delete
(&self, id: &str)
src/store/memory.rs:62
↓ 4 callers
Function
get_mock_config
Config for mocking EventBridge
src/event_bus/eventbridge/mod.rs:86
↓ 4 callers
Function
get_store
()
src/utils.rs:15
↓ 3 callers
Method
all
(&self, next: Option<&str>)
src/store/dynamodb/mod.rs:33
↓ 3 callers
Method
as_s
(&self)
src/entrypoints/lambda/dynamodb/model.rs:149
↓ 3 callers
Method
get
(&self, id: &str)
src/store/dynamodb/mod.rs:61
↓ 3 callers
Function
get_ddb_event
()
src/entrypoints/lambda/dynamodb/model.rs:196
↓ 3 callers
Function
get_random_string
(length: usize)
tests/aws_test.rs:18
↓ 3 callers
Method
get_s
Return a string from a key E.g. if you run `get_s("id")` on a DynamoDB item structured like this, you will retrieve the value `"foo"`. ```json { "id
src/store/dynamodb/ext.rs:29
↓ 3 callers
Method
send_events
(&self, events: &[Self::E])
src/event_bus/eventbridge/mod.rs:46
↓ 3 callers
Method
to_eventbridge
(&self, bus_name: &str)
src/event_bus/eventbridge/ext.rs:11
↓ 2 callers
Method
as_n
(&self)
src/entrypoints/lambda/dynamodb/model.rs:131
↓ 1 callers
Method
delete
(&self, id: &str)
src/store/dynamodb/mod.rs:99
↓ 1 callers
Function
delete_product
( store: &dyn store::StoreDelete, event: Request, )
src/entrypoints/lambda/apigateway.rs:10
↓ 1 callers
Function
get_event_bus
()
src/utils.rs:31
↓ 1 callers
Method
get_n
Return a number from a key E.g. if you run `get_n("price")` on a DynamoDB item structured like this, you will retrieve the value `10.0`. ```json { "
src/store/dynamodb/ext.rs:45
↓ 1 callers
Function
get_product
( store: &dyn store::StoreGet, event: Request, )
src/entrypoints/lambda/apigateway.rs:59
↓ 1 callers
Function
get_products
( store: &dyn store::StoreGetAll, _event: Request, )
src/entrypoints/lambda/apigateway.rs:111
↓ 1 callers
Function
get_random_product
()
tests/aws_test.rs:25
↓ 1 callers
Method
id
(&self)
src/model.rs:30
↓ 1 callers
Function
parse_events
( event_bus: &dyn EventBus<E = Event>, event: model::DynamoDBEvent, _: Context, )
src/entrypoints/lambda/dynamodb/mod.rs:12
↓ 1 callers
Method
put
(&self, product: &Product)
src/store/dynamodb/mod.rs:82
↓ 1 callers
Function
put_product
( store: &dyn store::StorePut, event: Request, )
src/entrypoints/lambda/apigateway.rs:136
↓ 1 callers
Method
send_event
(&self, _: &Self::E)
src/event_bus/void.rs:18
↓ 1 callers
Method
send_event
(&self, event: &Self::E)
src/event_bus/eventbridge/mod.rs:33
↓ 1 callers
Function
send_events
( event_bus: &dyn EventBus<E = Event>, events: &[Event], )
src/domain.rs:33
↓ 1 callers
Method
send_events
Send a batch of events
src/lib.rs:28
↓ 1 callers
Method
send_events
(&self, _: &[Self::E])
src/event_bus/void.rs:22
Method
as_bool
(&self)
src/entrypoints/lambda/dynamodb/model.rs:113
Method
as_l
(&self)
src/entrypoints/lambda/dynamodb/model.rs:119
Method
as_m
(&self)
src/entrypoints/lambda/dynamodb/model.rs:125
Method
as_ns
(&self)
src/entrypoints/lambda/dynamodb/model.rs:137
Method
as_null
(&self)
src/entrypoints/lambda/dynamodb/model.rs:143
Method
as_ss
(&self)
src/entrypoints/lambda/dynamodb/model.rs:155
Function
attributevalue_get_n
()
src/store/dynamodb/ext.rs:71
Function
attributevalue_get_n_missing
()
src/store/dynamodb/ext.rs:79
Function
attributevalue_get_s
()
src/store/dynamodb/ext.rs:55
Function
attributevalue_get_s_missing
()
src/store/dynamodb/ext.rs:63
Function
delete_product
(store: &dyn StoreDelete, id: &str)
src/domain.rs:29
Method
fmt
(&self, f: &mut fmt::Formatter)
src/error.rs:15
Method
from
(_: std::num::ParseFloatError)
src/error.rs:28
Method
from
Convert a &Product into a DynamoDB item
src/store/dynamodb/mod.rs:114
Function
get_product
(store: &dyn StoreGet, id: &str)
src/domain.rs:17
Function
get_products
( store: &dyn StoreGetAll, next: Option<&str>, )
src/domain.rs:10
Function
get_request_builder
()
src/store/dynamodb/mod.rs:172
Function
get_request_builder
()
src/event_bus/eventbridge/mod.rs:102
Function
main
()
src/bin/lambda/put-product.rs:7
Function
main
()
src/bin/lambda/delete-product.rs:5
Function
main
()
src/bin/lambda/dynamodb-streams.rs:8
Function
main
()
src/bin/lambda/get-products.rs:7
Function
main
()
src/bin/lambda/get-product.rs:7
Method
new
(event_bus: Box<dyn EventBus<E = Event> + Send + Sync>)
src/lib.rs:23
Method
new
()
src/store/memory.rs:19
Method
new
(client: Client, table_name: String)
src/store/dynamodb/mod.rs:22
Method
new
()
src/event_bus/void.rs:9
Method
new
(client: Client, bus_name: String)
src/event_bus/eventbridge/mod.rs:22
Function
product_from_dynamodb
()
src/store/dynamodb/mod.rs:365
Function
product_to_dynamodb
()
src/store/dynamodb/mod.rs:378
Function
put_product
(store: &dyn StorePut, product: &Product)
src/domain.rs:21
Function
test_all
()
src/store/dynamodb/mod.rs:209
Function
test_all1
()
src/store/memory.rs:126
Function
test_all2
()
src/store/memory.rs:146
Function
test_all_empty
()
src/store/memory.rs:112
Function
test_all_empty
()
src/store/dynamodb/mod.rs:181
Function
test_all_next
()
src/store/dynamodb/mod.rs:242
Function
test_delete
()
src/store/memory.rs:169
Function
test_delete
()
src/store/dynamodb/mod.rs:272
Function
test_delete2
()
src/store/memory.rs:190
Function
test_deserialize
()
src/entrypoints/lambda/dynamodb/model.rs:277
Function
test_dynamodb_into_event
()
src/entrypoints/lambda/dynamodb/model.rs:304
Function
test_dynamodb_into_product
()
src/entrypoints/lambda/dynamodb/model.rs:341
Function
test_flow
()
tests/aws_test.rs:36
Function
test_get
()
src/store/memory.rs:215
Function
test_get
()
src/store/dynamodb/mod.rs:300
Function
test_new
()
src/store/memory.rs:101
Function
test_put
()
src/store/memory.rs:234
Function
test_put
()
src/store/dynamodb/mod.rs:334
Function
test_put2
()
src/store/memory.rs:251
Function
test_put_product_empty
()
tests/aws_test.rs:118
Function
test_put_product_invalid_body
()
tests/aws_test.rs:135
Function
test_put_product_with_invalid_id
()
tests/aws_test.rs:91
Function
test_send_event
()
src/event_bus/void.rs:33
Function
test_send_event
()
src/event_bus/eventbridge/mod.rs:111
Function
test_send_events
()
src/event_bus/void.rs:47
Function
test_send_events
()
src/event_bus/eventbridge/mod.rs:147
Function
test_send_events0
()
src/event_bus/eventbridge/mod.rs:192
Function
test_send_events15
()
src/event_bus/eventbridge/mod.rs:210
Function
test_to_eventbridge
()
src/event_bus/eventbridge/ext.rs:32
Method
try_from
Try to convert a DynamoDB item into a Product This could fail as the DynamoDB item might be missing some fields.
src/store/dynamodb/mod.rs:132
Method
try_from
Try converting a DynamoDB record to an event.
src/entrypoints/lambda/dynamodb/model.rs:49