Documentation ¶
Index ¶
- Constants
- Variables
- func ListInputConverter()
- func ListOutputConverter()
- func RegisterInputConfigCreator(id string, fn inputConfigCreator) error
- func RegisterInputConverter(name string, c InputConverter) error
- func RegisterOutputConfigCreator(id string, fn outputConfigCreator) error
- func RegisterOutputConverter(name string, c OutputConverter) error
- type Action
- type Actioner
- type Container
- type Descriptioner
- type Entry
- type IPType
- type IgnoreIPOption
- type InputConverter
- type Instance
- type OutputConverter
- type Typer
Constants ¶
Variables ¶
View Source
var ( ErrDuplicatedConverter = errors.New("duplicated converter") ErrUnknownAction = errors.New("unknown action") ErrNotSupportedFormat = errors.New("not supported format") ErrInvalidIPType = errors.New("invalid IP type") ErrInvalidIP = errors.New("invalid IP address") ErrInvalidIPLength = errors.New("invalid IP address length") ErrInvalidIPNet = errors.New("invalid IPNet address") ErrInvalidPrefixType = errors.New("invalid prefix type") ErrCommentLine = errors.New("comment line") )
View Source
var ActionsRegistry = map[Action]bool{ ActionAdd: true, ActionRemove: true, ActionOutput: true, }
Functions ¶
func ListInputConverter ¶
func ListInputConverter()
func ListOutputConverter ¶
func ListOutputConverter()
func RegisterInputConverter ¶
func RegisterInputConverter(name string, c InputConverter) error
func RegisterOutputConverter ¶
func RegisterOutputConverter(name string, c OutputConverter) error
Types ¶
type Container ¶
type Container interface { GetEntry(name string) (*Entry, bool) Add(entry *Entry, opts ...IgnoreIPOption) error Remove(name string, opts ...IgnoreIPOption) Loop() <-chan *Entry }
func NewContainer ¶
func NewContainer() Container
type Descriptioner ¶
type Descriptioner interface {
GetDescription() string
}
type Entry ¶
type Entry struct {
// contains filtered or unexported fields
}
func (*Entry) MarshalText ¶
func (e *Entry) MarshalText(opts ...IgnoreIPOption) ([]string, error)
func (*Entry) RemovePrefix ¶
type IPType ¶
type IPType string
func IgnoreIPv4 ¶
func IgnoreIPv4() IPType
func IgnoreIPv6 ¶
func IgnoreIPv6() IPType
type IgnoreIPOption ¶
type IgnoreIPOption func() IPType
type InputConverter ¶
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
func NewInstance ¶
type OutputConverter ¶
type OutputConverter interface { Typer Actioner Descriptioner Output(Container) error }
Click to show internal directories.
Click to hide internal directories.