e7f806219c
* Move client code to NS API * Move client to separate package * Move things around * Adjust run scripts * rustfmt * Add client to workspace
19 lines
477 B
Rust
19 lines
477 B
Rust
use std::fmt::Display;
|
|
|
|
pub(super) struct ApiPaths {
|
|
server_address: String,
|
|
}
|
|
|
|
impl ApiPaths {
|
|
pub(super) fn new(server_address: String) -> Self {
|
|
Self { server_address }
|
|
}
|
|
pub(super) fn request_testrun(&self) -> String {
|
|
format!("{}/internal/testruns", self.server_address)
|
|
}
|
|
|
|
pub(super) fn submit_results(&self, testrun_id: impl Display) -> String {
|
|
format!("{}/internal/testruns/{}", self.server_address, testrun_id)
|
|
}
|
|
}
|