Commit graph

17 commits

Author SHA1 Message Date
Elle Mouton
5e07588b43
firewalldb: address last few comments from #763 2024-06-06 12:49:35 -04:00
Elle Mouton
0259fc852f
firewalldb: add comment about reasoning behind persistent temp KV stores 2024-05-30 09:52:43 -04:00
Elle Mouton
6f33893454
firewalldb: fetch correct bucket for session level temp KV store
In this commit, we fix a bug which would result in the "perm" store
being used for the LocalTemp KV DB _if and only if_ the KV store being
requested was a session level one (as opposed to a session feature level
one). It is ok for us to just change this here since as of this commit,
the session level KV store is not used at all and so nothing will be in
that store yet.
2024-05-29 15:31:36 -04:00
bitromortac
cb542a5015
firewall+firewalldb: add SessionDB interface
SessionDB is an interface that gives helper methods for how privacy
mapping should be done. A mock for SessionDB is added to save on some
code repetition, the privacy flags functionality is used in a later
test.
2024-04-25 14:49:45 +02:00
shuoer86
ab47cd64f7
firewall+firewalldb: fix typos 2023-11-25 10:31:03 +08:00
bitromortac
ab39a5b759
firewalldb: return empty map on empty bucket
This commit returns an empty PrivacyMapReader if the privacy bucket for
the group doesn't yet exist.
2023-09-05 15:18:15 +02:00
bitromortac
5580d6861d
firewalldb: export DecodeChannelPoint and restrict 2023-09-01 08:03:21 +02:00
Elle Mouton
d0bc3c37f1
firewalldb: add FetchAllPairs to PrivacyMapTx interface
This commit adds a new FetchAllPairs to the PrivacyMapTx interface. This
method returns a new PrivacyMapPairs struct which is an in-memory
privacy map DB. The PrivacyMapPairs struct implements a new
PrivacyMapReader interface which can be used to pass around read only
access to the PrivacyMapPairs struct.
2023-08-31 16:56:59 +02:00
Elle Mouton
9b7ed4a4d9
firewalldb: dont allow overwriting priv map keys 2023-08-30 18:22:28 +02:00
Elle Mouton
921874608c
firewall: update ActionsReadDB to get group actions 2023-08-30 12:34:29 +02:00
Elle Mouton
c12e643a43
firewalldb: add ListGroupActions method
This method can be used to list actions in a session Group. Note that
actions are still stored under session IDs.
2023-08-30 12:34:29 +02:00
Elle Mouton
73110b6472
multi: give firewallDB access to session ID index 2023-08-30 12:34:29 +02:00
Elle Mouton
7c7e467d03
firewalldb: update comments and var names
Change all comments and variable names mentioning "session ID" to "group
ID" instead. As of this commit, session linking is not yet possible and
so what ever session IDs are passed in are also group IDs.
2023-08-30 12:34:28 +02:00
Elle Mouton
95fc0c2011
firewalldb: db logic for the privacy mapper 2023-01-27 06:47:12 +02:00
Elle Mouton
0a9f5458cb
firewalldb: add KVStore CRUD logic 2023-01-27 06:47:11 +02:00
Elle Mouton
704acdf504
firewalldb: add Action CRUD logic
This commit adds a new Action type to the firewalldb package along with
Serialization and Deserialization methods for it. It also adds
ListAction and ListSessionAction methods to the DB which can be used to
paginate through the actions. Various interfaces are also added that
will be used by `rules` to access certain RuleActions.
2023-01-27 06:47:11 +02:00
Elle Mouton
eaffa4a74a
firewalldb+log: add main DB structure 2023-01-27 06:47:11 +02:00