github.com/koko1123/flow-go-1@v0.29.6/module/id/filtered_provider.go (about) 1 package id 2 3 import ( 4 "github.com/koko1123/flow-go-1/model/flow" 5 "github.com/koko1123/flow-go-1/module" 6 ) 7 8 // IdentityFilterIdentifierProvider implements an IdentifierProvider which provides the identifiers 9 // resulting from applying a filter to an IdentityProvider. 10 type IdentityFilterIdentifierProvider struct { 11 filter flow.IdentityFilter 12 identityProvider module.IdentityProvider 13 } 14 15 func NewIdentityFilterIdentifierProvider(filter flow.IdentityFilter, identityProvider module.IdentityProvider) *IdentityFilterIdentifierProvider { 16 return &IdentityFilterIdentifierProvider{filter, identityProvider} 17 } 18 19 func (p *IdentityFilterIdentifierProvider) Identifiers() flow.IdentifierList { 20 return p.identityProvider.Identities(p.filter).NodeIDs() 21 }