File tree Expand file tree Collapse file tree 1 file changed +57
-0
lines changed
Expand file tree Collapse file tree 1 file changed +57
-0
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * Flox Engine
3+ * Developed by FLOX Foundation (https://github.com/FLOX-Foundation)
4+ *
5+ * Copyright (c) 2025 FLOX Foundation
6+ * Licensed under the MIT License. See LICENSE file in the project root for full
7+ * license information.
8+ */
9+
10+ #pragma once
11+
12+ #include < cstdint>
13+ #include < string>
14+ #include < string_view>
15+ #include < vector>
16+
17+ namespace flox
18+ {
19+
20+ struct AuditEntry
21+ {
22+ int64_t seq = 0 ;
23+ std::string ts;
24+ std::string actor;
25+ std::string action;
26+ int64_t trade_id = 0 ;
27+ std::string details;
28+ std::string source;
29+ std::string prev_hash;
30+ std::string hash;
31+ };
32+
33+ struct AuditVerifyResult
34+ {
35+ int64_t total = 0 ;
36+ int64_t verified = 0 ;
37+ bool intact = false ;
38+ int64_t broken_at_seq = 0 ;
39+ std::string error;
40+ };
41+
42+ struct IAuditLog
43+ {
44+ virtual ~IAuditLog () = default ;
45+
46+ virtual void audit (std::string_view actor, std::string_view action,
47+ int64_t tradeId, std::string_view details,
48+ std::string_view source = " " ) = 0;
49+
50+ virtual std::vector<AuditEntry> getLog (int limit = 100 , int64_t beforeSeq = 0 ,
51+ std::string_view actor = " " ,
52+ int64_t tradeId = 0 ) = 0;
53+
54+ virtual AuditVerifyResult verify () = 0;
55+ };
56+
57+ } // namespace flox
You can’t perform that action at this time.
0 commit comments