fix: add url attributes to url type address
ci/woodpecker/push/woodpecker Pipeline failed
Details
ci/woodpecker/push/woodpecker Pipeline failed
Details
parent
70d4be1be3
commit
f6845a5a3a
|
@ -7,7 +7,10 @@ use anyhow::Result;
|
|||
|
||||
use upend_base::addressing::Address;
|
||||
use upend_base::constants::ATTR_LABEL;
|
||||
use upend_base::constants::ATTR_OF;
|
||||
use upend_base::constants::TYPE_URL_ADDRESS;
|
||||
use upend_base::entry::Entry;
|
||||
use upend_base::entry::EntryValue;
|
||||
use upend_db::jobs::JobContainer;
|
||||
use upend_db::jobs::JobState;
|
||||
use upend_db::stores::UpStore;
|
||||
|
@ -89,7 +92,23 @@ impl Extractor for WebExtractor {
|
|||
|
||||
let _ = job_handle.update_state(JobState::Done);
|
||||
|
||||
return Ok(entries.into_iter().flatten().collect());
|
||||
return Ok(entries
|
||||
.into_iter()
|
||||
.flatten()
|
||||
.map(|e| {
|
||||
vec![
|
||||
Entry {
|
||||
entity: Address::Attribute(e.attribute.clone()),
|
||||
attribute: ATTR_OF.to_string(),
|
||||
value: EntryValue::Address(TYPE_URL_ADDRESS.clone()),
|
||||
provenance: "SYSTEM EXTRACTOR".to_string(),
|
||||
..Default::default()
|
||||
},
|
||||
e,
|
||||
]
|
||||
})
|
||||
.flatten()
|
||||
.collect());
|
||||
}
|
||||
Err(anyhow!("Failed for unknown reason."))
|
||||
} else {
|
||||
|
|
|
@ -1,14 +0,0 @@
|
|||
use crate::addressing::Address;
|
||||
use crate::entry::InvariantEntry;
|
||||
|
||||
lazy_static! {
|
||||
pub static ref HIER_ROOT_INVARIANT: InvariantEntry = InvariantEntry {
|
||||
attribute: String::from(ATTR_KEY),
|
||||
value: "HIER_ROOT".into(),
|
||||
};
|
||||
pub static ref HIER_ROOT_ADDR: Address = HIER_ROOT_INVARIANT.entity().unwrap();
|
||||
pub static ref TYPE_HASH_ADDRESS: Address = Address::Hash(crate::util::hash::Hash(vec![]));
|
||||
pub static ref TYPE_UUID_ADDRESS: Address = Address::Uuid(uuid::Uuid::nil());
|
||||
pub static ref TYPE_ATTRIBUTE_ADDRESS: Address = Address::Attribute("".to_string());
|
||||
pub static ref TYPE_URL_ADDRESS: Address = Address::Url(url::Url::parse("up:").unwrap());
|
||||
}
|
Loading…
Reference in New Issue