Versions in this module Expand all Collapse all v0 v0.4.0 Nov 14, 2019 Changes in this version + var ErrNoDefault = errors.New("ACL does not have a default") + type ACL struct + Entries []*ACLEntry + func NewACL(entries ...*ACLEntry) (*ACL, error) + func (a *ACL) Eval(inputSet PathSet) PathSet + func (a *ACL) MarshalJSON() ([]byte, error) + func (a *ACL) UnmarshalJSON(b []byte) error + type ACLAction bool + const Allow + const Deny + type ACLEntry struct + Action ACLAction + Rule *HopPredicate + func (ae *ACLEntry) LoadFromString(str string) error + func (ae *ACLEntry) MarshalJSON() ([]byte, error) + func (ae *ACLEntry) String() string + func (ae *ACLEntry) UnmarshalJSON(b []byte) error + type ExtPolicy struct + Extends []string + type FilterOptions struct + IgnoreSequence bool + type HopPredicate struct + AS addr.AS + ISD addr.ISD + IfIDs []common.IFIDType + func HopPredicateFromString(str string) (*HopPredicate, error) + func NewHopPredicate() *HopPredicate + func (hp *HopPredicate) MarshalJSON() ([]byte, error) + func (hp *HopPredicate) UnmarshalJSON(b []byte) error + func (hp HopPredicate) String() string + type Option struct + Policy *ExtPolicy + Weight int + type Path interface + Interfaces func() []PathInterface + Key func() string + type PathInterface interface + IA func() addr.IA + IfId func() common.IFIDType + type PathSet map[string]Path + type Policy struct + ACL *ACL + Name string + Options []Option + Sequence *Sequence + func NewPolicy(name string, acl *ACL, sequence *Sequence, options []Option) *Policy + func PolicyFromExtPolicy(extPolicy *ExtPolicy, extended []*ExtPolicy) (*Policy, error) + func (p *Policy) Filter(paths PathSet) PathSet + func (p *Policy) FilterOpt(paths PathSet, opts FilterOptions) PathSet + type PolicyMap map[string]*ExtPolicy + type Sequence struct + func NewSequence(s string) (*Sequence, error) + func (s *Sequence) Eval(inputSet PathSet) PathSet + func (s *Sequence) MarshalJSON() ([]byte, error) + func (s *Sequence) UnmarshalJSON(b []byte) error