lightning-terminal/firewalldb/interface.go
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

12 lines
362 B
Go

package firewalldb
import "github.com/lightninglabs/lightning-terminal/session"
// SessionDB is an interface that abstracts the database operations needed for
// the privacy mapper to function.
type SessionDB interface {
session.IDToGroupIndex
// GetSessionByID returns the session for a specific id.
GetSessionByID(session.ID) (*session.Session, error)
}