Skip to content

Commit 9e9d425

Browse files
firewalldb: export FirewallDBs interface
1 parent fa548b2 commit 9e9d425

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

firewalldb/db.go

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,21 @@ var (
1414
ErrNoSuchKeyFound = fmt.Errorf("no such key found")
1515
)
1616

17-
// firewallDBs is an interface that groups the RulesDB and PrivacyMapper
18-
// interfaces.
19-
type firewallDBs interface {
20-
RulesDB
21-
PrivacyMapper
22-
}
23-
2417
// DB manages the firewall rules database.
2518
type DB struct {
2619
started sync.Once
2720
stopped sync.Once
2821

29-
firewallDBs
22+
FirewallDBs
3023

3124
cancel fn.Option[context.CancelFunc]
3225
}
3326

3427
// NewDB creates a new firewall database. For now, it only contains the
3528
// underlying rules' and privacy mapper databases.
36-
func NewDB(dbs firewallDBs) *DB {
29+
func NewDB(dbs FirewallDBs) *DB {
3730
return &DB{
38-
firewallDBs: dbs,
31+
FirewallDBs: dbs,
3932
}
4033
}
4134

firewalldb/interface.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,3 +134,10 @@ type ActionDB interface {
134134
// and feature name.
135135
GetActionsReadDB(groupID session.ID, featureName string) ActionsReadDB
136136
}
137+
138+
// FirewallDBs is an interface that groups the RulesDB and PrivacyMapper
139+
// interfaces.
140+
type FirewallDBs interface {
141+
RulesDB
142+
PrivacyMapper
143+
}

0 commit comments

Comments
 (0)