Documentation ¶
Index ¶
- Variables
- func And(filters ...flow.IdentityFilter) flow.IdentityFilter
- func Any(*flow.Identity) bool
- func Ejected(identity *flow.Identity) bool
- func HasNodeID(nodeIDs ...flow.Identifier) flow.IdentityFilter
- func HasRole(roles ...flow.Role) flow.IdentityFilter
- func HasStake(hasStake bool) flow.IdentityFilter
- func In(list flow.IdentityList) flow.IdentityFilter
- func Not(filter flow.IdentityFilter) flow.IdentityFilter
- func Or(filters ...flow.IdentityFilter) flow.IdentityFilter
Constants ¶
This section is empty.
Variables ¶
IsValidCurrentEpochParticipant is an identity filter for members of the current epoch in good standing.
var IsValidDKGParticipant = IsVotingConsensusCommitteeMember
IsValidDKGParticipant is an identity filter for all DKG participants. It is equivalent to the filter for consensus committee members, as these are the same group for now.
var IsVotingConsensusCommitteeMember = And( HasRole(flow.RoleConsensus), IsValidCurrentEpochParticipant, )
IsVotingConsensusCommitteeMember is a identity filter for all members of the consensus committee allowed to vote.
Functions ¶
func And ¶
func And(filters ...flow.IdentityFilter) flow.IdentityFilter
And combines two or more filters that all need to be true.
func HasNodeID ¶
func HasNodeID(nodeIDs ...flow.Identifier) flow.IdentityFilter
HasNodeID returns a filter that returns true for any identity with an ID matching any of the inputs.
func HasRole ¶
func HasRole(roles ...flow.Role) flow.IdentityFilter
HasRole returns a filter for nodes with one of the input roles.
func HasStake ¶
func HasStake(hasStake bool) flow.IdentityFilter
HasStake returns a filter for nodes with non-zero stake.
func In ¶
func In(list flow.IdentityList) flow.IdentityFilter
In returns a filter for identities within the input list. This is equivalent to HasNodeID, but for list-typed inputs.
func Not ¶
func Not(filter flow.IdentityFilter) flow.IdentityFilter
Not returns a filter equivalent to the inverse of the input filter.
func Or ¶
func Or(filters ...flow.IdentityFilter) flow.IdentityFilter
Or combines two or more filters and only needs one of them to be true.
Types ¶
This section is empty.