-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/ideal-world/bios
- Loading branch information
Showing
13 changed files
with
381 additions
and
291 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
pub const DOMAIN_CODE: &str = "spi-object"; | ||
pub const SPI_S3_KIND_CODE: &str = "spi-bs-s3"; | ||
pub const SPI_OBS_KIND_CODE: &str = "spi-bs-obs"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
pub mod object_obj_serv; | ||
pub mod obs; | ||
pub mod s3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pub mod object_obs_initializer; | ||
pub mod object_obs_obj_serv; |
8 changes: 8 additions & 0 deletions
8
backend/spi/spi-object/src/serv/obs/object_obs_initializer.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
use bios_basic::spi::{dto::spi_bs_dto::SpiBsCertResp, spi_funs::SpiBsInst}; | ||
use tardis::basic::{dto::TardisContext, result::TardisResult}; | ||
|
||
use crate::serv::s3; | ||
|
||
pub async fn init(bs_cert: &SpiBsCertResp, ctx: &TardisContext, mgr: bool) -> TardisResult<SpiBsInst> { | ||
s3::object_s3_initializer::init(bs_cert, ctx, mgr).await | ||
} |
16 changes: 16 additions & 0 deletions
16
backend/spi/spi-object/src/serv/obs/object_obs_obj_serv.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
use tardis::{ | ||
basic::{result::TardisResult}, | ||
os::{ | ||
os_client::TardisOSClient, | ||
}, | ||
}; | ||
|
||
use crate::serv::s3::S3; | ||
|
||
/// OBS need manually configure lifecycle rules | ||
pub(crate) struct OBSService; | ||
impl S3 for OBSService { | ||
async fn rebuild_path(_bucket_name: Option<&str>, origin_path: &str, _obj_exp: Option<u32>, _client: &TardisOSClient) -> TardisResult<String> { | ||
Ok(origin_path.to_string()) | ||
} | ||
} |
Oops, something went wrong.