Page MenuHomePhabricator

[services] [1/n] Reorganize lambda function structs into query.rs and payload.rs
ClosedPublic

Authored by will on Jan 22 2024, 10:06 AM.
Tags
None
Referenced Files
Unknown Object (File)
Apr 8 2024, 2:21 PM
Unknown Object (File)
Apr 4 2024, 1:40 PM
Unknown Object (File)
Apr 4 2024, 1:40 PM
Unknown Object (File)
Apr 4 2024, 1:40 PM
Unknown Object (File)
Apr 4 2024, 1:40 PM
Unknown Object (File)
Apr 4 2024, 1:40 PM
Unknown Object (File)
Apr 4 2024, 1:39 PM
Unknown Object (File)
Apr 4 2024, 1:39 PM
Subscribers

Details

Summary

This moves the structs from main.rs to their own separate files for code cleanliness.

I've created two new files: query.rs and payload.rs.

query.rs contains structs we use for constructing JSON for queries to our opensearch instance. payload.rs contains structs for dynamodb stream records.

Test Plan

Successfully compiled with cargo lambda

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

will retitled this revision from [services] Reorganize lambda function structs into query.rs and payload.rs to [services] [1/n] Reorganize lambda function structs into query.rs and payload.rs.Jan 22 2024, 10:10 AM
will edited the summary of this revision. (Show Details)
will requested review of this revision.Jan 22 2024, 10:29 AM
will edited the summary of this revision. (Show Details)

Remove error handling

thanks for splitting this up into multiple diffs! just a couple suggestions inline

services/search-index-lambda/src/payload.rs
44 ↗(On Diff #35971)

how about rename_all = camelCase?

50 ↗(On Diff #35971)

how about rename_all = PascalCase here?

This revision is now accepted and ready to land.Jan 22 2024, 6:08 PM
will edited the summary of this revision. (Show Details)

Address review feedback. Use rename_all camelCase and PascalCase