Skip to content

Commit

Permalink
Reshuffled ES types #30
Browse files Browse the repository at this point in the history
It's very much unfinished.

* split ES types in stm_shared into separate mods
* made ES search generic over <T>
* added simple_error crate to create Lambda errors
* copies ES from html_ui into GQL UI crate
  • Loading branch information
rimutaka committed Feb 11, 2022
1 parent aa8f4ad commit 2f8d465
Show file tree
Hide file tree
Showing 15 changed files with 657 additions and 133 deletions.
1 change: 1 addition & 0 deletions stm_graphql/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ tracing-subscriber = "0.3"
log = "0.4"
lambda_runtime = { git = "https://github.com/awslabs/aws-lambda-rust-runtime.git" }
lambda-debug-proxy-client = {git = "https://github.com/rimutaka/lambda-debug-proxy.git"}
simple-error = "0.2"
hyper = { version = "0.14", features = ["http2"] }
hyper-rustls = "0.23"
regex = "1.5"
Expand Down
12 changes: 6 additions & 6 deletions stm_graphql/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ const SEARCH_TERM_REGEX: &str = r#"[#:\-._+0-9a-zA-Z]+"#;
const NO_SQL_STRING_INVALIDATION_REGEX: &str = r#"[^#\-._+0-9a-zA-Z]"#;

impl Config {
// /// The maximum number of dev listings per page of search results
// pub const MAX_DEV_LISTINGS_PER_SEARCH_RESULT: usize = 50;
/// The maximum number of dev listings per page of search results
pub const MAX_DEV_LISTINGS_PER_SEARCH_RESULT: usize = 50;

// /// The maximum number of pages allowed in search.
// /// Check HTML templates if changing the limits on page numbers
// /// 20 is hardcoded in some of the logic there
// pub const MAX_PAGES_PER_SEARCH_RESULT: usize = 20;
/// The maximum number of pages allowed in search.
/// Check HTML templates if changing the limits on page numbers
/// 20 is hardcoded in some of the logic there
pub const MAX_PAGES_PER_SEARCH_RESULT: usize = 20;

pub fn new() -> Self {
let aws_region = AwsRegion::from_str(
Expand Down
Loading

0 comments on commit 2f8d465

Please sign in to comment.