Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
376d9515aa |
3291
Cargo.lock
generated
Normal file
3291
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
11
Cargo.toml
Normal file
11
Cargo.toml
Normal file
@ -0,0 +1,11 @@
|
||||
[package]
|
||||
edition = "2024"
|
||||
name = "web"
|
||||
version = "0.1.0"
|
||||
|
||||
[dependencies]
|
||||
fathom-function = { git = "ssh://git@github.com/fathom-io/pipeline-calculations.git", branch = "johnabell/pipeline-route" }
|
||||
pipeline-application = { git = "ssh://git@github.com/fathom-io/pipeline-calculations.git", branch = "johnabell/pipeline-route" }
|
||||
pipeline-configuration = { git = "ssh://git@github.com/fathom-io/pipeline-calculations.git", branch = "johnabell/pipeline-route" }
|
||||
serde = { version = "1.0.219", features = ["derive"] }
|
||||
tokio = { version = "1.43.0", features = ["macros", "rt-multi-thread"] }
|
||||
42
README.md
42
README.md
@ -1,2 +1,42 @@
|
||||
# 6fc3e9c2eef34519a93ef6a96ea812c3
|
||||
# Pipeline route calculation
|
||||
|
||||
A function that exposes the pipeline route calculations.
|
||||
|
||||
The pipeline route can be defined by various means
|
||||
- `kml` route file
|
||||
- `kmz` route file
|
||||
- `csv` of the x,y, and optionally z coordinates of the pipeline.
|
||||
|
||||
If the elevation is missing, we utilise one of the following services to obtain
|
||||
the elevation of each waypoint on the pipeline.
|
||||
|
||||
- Google maps
|
||||
- Map box
|
||||
- Open elevation
|
||||
|
||||
## Input
|
||||
|
||||
### Arguments
|
||||
|
||||
- TODO
|
||||
|
||||
### Environment
|
||||
|
||||
- `ORG_ID`: the organization id
|
||||
- `PROJECT_ID`: the id of the data project where the pipeline data is found
|
||||
- `ENV`: the environment of the platform e.g. `dev` or `stg` etc.
|
||||
|
||||
## Testing the function locally
|
||||
|
||||
You can run and test the function locally by running
|
||||
|
||||
```bash
|
||||
cargo run
|
||||
```
|
||||
|
||||
Then you can check it work with `curl` as follows
|
||||
|
||||
```bash
|
||||
curl -X POST localhost:8080 -v \
|
||||
-d "TODO"
|
||||
```
|
||||
|
||||
11
src/main.rs
Normal file
11
src/main.rs
Normal file
@ -0,0 +1,11 @@
|
||||
use fathom_function::Context;
|
||||
use pipeline_application::application::{Application, SegmentationConfiguration};
|
||||
use pipeline_configuration::facilities::FacilityType;
|
||||
|
||||
#[fathom_function::function(default(
|
||||
org_id = "2cbfe270-d195-48ad-aed1-24145924635c",
|
||||
project_id = "67c6f36910e4c56ed42bf841"
|
||||
))]
|
||||
async fn pipeline_route(context: Context, args: String) -> Result<String, String> {
|
||||
Ok(args)
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user