Skip to content

Commit

Permalink
cleanup(event): move all exports in falco_event::types to module root
Browse files Browse the repository at this point in the history
  • Loading branch information
gnosek committed Mar 11, 2024
1 parent 5083e68 commit 8503be3
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 45 deletions.
38 changes: 18 additions & 20 deletions falco_event/src/event_field_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,26 @@ pub use std::net::Ipv6Addr as PT_IPV6ADDR;
use std::path::Path;
use std::time::{Duration, SystemTime};

pub use newtypes::Bool as PT_BOOL;
pub use newtypes::Errno as PT_ERRNO;
pub use newtypes::Fd as PT_FD;
pub use newtypes::Gid as PT_GID;
pub use newtypes::Pid as PT_PID;
pub use newtypes::Port as PT_PORT;
pub use newtypes::SigSet as PT_SIGSET;
pub use newtypes::SigType as PT_SIGTYPE;
pub use newtypes::SockFamily as PT_SOCKFAMILY;
pub use newtypes::SyscallId as PT_SYSCALLID;
pub use newtypes::Uid as PT_UID;

pub use crate::dynamic_params::*;
pub use crate::event_flags::*;
pub use crate::types::fd_list::FdList as PT_FDLIST;
pub use crate::types::net::ipnet as PT_IPNET;
pub use crate::types::net::ipv4net as PT_IPV4NET;
pub use crate::types::net::ipv6net as PT_IPV6NET;
pub use crate::types::net::sockaddr::SockAddr as PT_SOCKADDR;
pub use crate::types::net::socktuple::SockTuple as PT_SOCKTUPLE;
pub use crate::types::path::relative_path::RelativePath as PT_FSRELPATH;
use crate::types::primitive::newtypes;
pub use crate::types::Bool as PT_BOOL;
pub use crate::types::Errno as PT_ERRNO;
pub use crate::types::Fd as PT_FD;
pub use crate::types::FdList as PT_FDLIST;
pub use crate::types::Gid as PT_GID;
pub use crate::types::IpNet as PT_IPNET;
pub use crate::types::Ipv4Net as PT_IPV4NET;
pub use crate::types::Ipv6Net as PT_IPV6NET;
pub use crate::types::Pid as PT_PID;
pub use crate::types::Port as PT_PORT;
pub use crate::types::RelativePath as PT_FSRELPATH;
pub use crate::types::SigSet as PT_SIGSET;
pub use crate::types::SigType as PT_SIGTYPE;
pub use crate::types::SockAddr as PT_SOCKADDR;
pub use crate::types::SockFamily as PT_SOCKFAMILY;
pub use crate::types::SockTuple as PT_SOCKTUPLE;
pub use crate::types::SyscallId as PT_SYSCALLID;
pub use crate::types::Uid as PT_UID;

pub type PT_INT8 = i8;
pub type PT_INT16 = i16;
Expand Down
6 changes: 6 additions & 0 deletions falco_event/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#![warn(missing_docs)]
#![deny(rustdoc::broken_intra_doc_links)]

use std::fmt::{Debug, Formatter};
use std::io::Write;
use std::time::{Duration, SystemTime, UNIX_EPOCH};
Expand All @@ -7,7 +10,9 @@ use crate::payload::PayloadToBytes;

pub mod dynamic_params;
pub mod event_field_type;
#[allow(missing_docs)]
pub mod event_flags;
#[allow(missing_docs)]
pub mod events;
pub mod from_bytes;
pub mod payload;
Expand All @@ -20,6 +25,7 @@ pub mod types;
#[allow(non_snake_case)]
#[allow(non_camel_case_types)]
#[allow(non_upper_case_globals)]
#[allow(missing_docs)]
mod ffi;

#[derive(Clone)]
Expand Down
19 changes: 12 additions & 7 deletions falco_event/src/types/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
pub mod bytebuf;
pub mod fd_list;
pub mod net;
pub mod path;
pub mod primitive;
pub mod string;
pub mod time;
mod bytebuf;
mod fd_list;
mod net;
mod path;
mod primitive;
mod string;
mod time;

pub use fd_list::*;
pub use net::*;
pub use path::*;
pub use primitive::*;
22 changes: 14 additions & 8 deletions falco_event/src/types/net/mod.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
pub mod ipaddr;
pub mod ipnet;
pub mod ipv4addr;
pub mod ipv4net;
pub mod ipv6addr;
pub mod ipv6net;
pub mod sockaddr;
pub mod socktuple;
mod ipaddr;
mod ipnet;
mod ipv4addr;
mod ipv4net;
mod ipv6addr;
mod ipv6net;
mod sockaddr;
mod socktuple;

pub use ipnet::*;
pub use ipv4net::*;
pub use ipv6net::*;
pub use sockaddr::*;
pub use socktuple::*;
6 changes: 4 additions & 2 deletions falco_event/src/types/path/mod.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
pub mod absolute_path;
pub mod relative_path;
mod absolute_path;
mod relative_path;

pub use relative_path::*;
8 changes: 5 additions & 3 deletions falco_event/src/types/primitive/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
pub mod bool;
pub mod integers;
pub mod newtypes;
mod bool;
mod integers;
mod newtypes;

pub use newtypes::*;
6 changes: 3 additions & 3 deletions falco_event/src/types/string/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
pub mod cstr;
pub mod cstr_array;
pub mod cstr_pair_array;
mod cstr;
mod cstr_array;
mod cstr_pair_array;
4 changes: 2 additions & 2 deletions falco_event/src/types/time/mod.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pub mod duration;
pub mod system_time;
mod duration;
mod system_time;

0 comments on commit 8503be3

Please sign in to comment.