Crates.io | ocsf-schema-rs |
lib.rs | ocsf-schema-rs |
version | 0.1.1-alpha |
source | src |
created_at | 2024-09-02 14:02:08.107507 |
updated_at | 2024-09-02 18:37:18.319706 |
description | OCSF data types for Rust |
homepage | |
repository | https://github.com/jasmaa/ocsf-schema-rs |
max_upload_size | |
id | 1360566 |
size | 207,714 |
Unofficial OCSF data types for Rust based on OCSF JSON Schema.
Install with:
cargo add ocsf-schema-rs
Data types are generated using Typify. Structs can be constructed either manually:
let g = Group {
type_: None,
desc: None,
domain: None,
name: Some(String::from("My Group")),
privileges: vec![],
uid: None,
};
or with builder:
let g: Group = Group::builder()
.name(String::from("My Group"))
.try_into()
.unwrap();
Install deps:
pip install -r scripts/requirements.txt
Download OCSF JSON Schema:
python scripts/download_schemas.py
python scripts/generate_all_schema.py
Build ocsf-schema-rs
cd ocsf-schema-rs
cargo build
ocsf-schema-rs | OCSF |
---|---|
0.1.0-alpha | 1.3.0 |