Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AllowAllFilter ¶
type AllowAllFilter struct {
Filter
}
AllowAllFilter struct
func (*AllowAllFilter) AllowChanID ¶ added in v0.0.41
func (f *AllowAllFilter) AllowChanID(id uint64) bool
AllowChanID returns true if short channel ID should be allowed
func (*AllowAllFilter) AllowPubKey ¶
func (f *AllowAllFilter) AllowPubKey(id string) bool
AllowPubKey returns true if pubkey should be allowed
func (*AllowAllFilter) AllowSpecial ¶
func (f *AllowAllFilter) AllowSpecial(private bool) bool
AllowSpecial checks against bitmask and can allow all private or public channels
type FileFilter ¶
FileFilter struct
func (*FileFilter) AllowChanID ¶ added in v0.0.41
func (f *FileFilter) AllowChanID(id uint64) bool
AllowChanID checks short channel id
func (*FileFilter) AllowPubKey ¶
func (f *FileFilter) AllowPubKey(id string) bool
AllowPubKey checks whether pubkey is allowed
func (*FileFilter) AllowSpecial ¶
func (f *FileFilter) AllowSpecial(private bool) bool
AllowSpecial is used to allow all private/public chans
type Filter ¶
type Filter struct {
// Options for the filter
Options Options
// contains filtered or unexported fields
}
Filter is the main type
func (*Filter) AllowChanID ¶ added in v0.0.41
AllowChanID returns true if short channel ID should be allowed
func (*Filter) AllowPubKey ¶
AllowPubKey returns true if pubkey should be allowed
func (*Filter) AllowSpecial ¶
AllowSpecial checks against bitmask and can allow all private or public channels
type FilteringInterface ¶ added in v0.0.41
type FilteringInterface interface {
// AllowPubKey returns true if pubkey should be allowed
AllowPubKey(id string) bool
// AllowChanID returns true if short channel ID should be allowed
AllowChanID(id uint64) bool
// AllowSpecial checks against bitmask and can allow all private or public channels
AllowSpecial(private bool) bool
}
FilteringInterface is the interface for all filters
func NewAllowAllFilter ¶
func NewAllowAllFilter() (FilteringInterface, error)
NewAllowAllFilter - creates a filter that allow everything
func NewFilterFromFile ¶
func NewFilterFromFile(ctx context.Context, filePath string, options Options) (FilteringInterface, error)
NewFilterFromFile create new FileFilter
func NewUnitTestFilter ¶
func NewUnitTestFilter() (FilteringInterface, error)
NewUnitTestFilter - creates a filter suitable for unit tests
type UnitTestFilter ¶
type UnitTestFilter struct {
Filter
}
UnitTestFilter struct
func (*UnitTestFilter) AddAllowChanID ¶ added in v0.0.41
func (u *UnitTestFilter) AddAllowChanID(id uint64)
AddAllowChanID - add channel id to allow list
func (*UnitTestFilter) AddAllowPubKey ¶
func (u *UnitTestFilter) AddAllowPubKey(id string)
AddAllowPubKey - add pubkey to allow list
func (*UnitTestFilter) ChangeOptions ¶
func (u *UnitTestFilter) ChangeOptions(options Options)
ChangeOptions - change options of the filter