Documentation ¶
Index ¶
- Variables
- func Fields(line string) []string
- func RegisterArgType(name string, n int, nested ...NestedType)
- func RegisterType(t OptionType)
- type Chain
- type ChainRequest
- type IPTables
- func (this *IPTables) AppendRule(table, chain string, rule Rule) error
- func (this *IPTables) AssureChain(logger utils.NotificationLogger, chain *Chain) error
- func (this *IPTables) CleanupChain(table, chain string) error
- func (this *IPTables) DeleteRule(table, chain string, rule Rule) error
- func (this *IPTables) Execute(logger utils.NotificationLogger, req *ChainRequest) error
- func (this *IPTables) InsertRule(table, chain string, pos int, rule Rule) error
- func (this *IPTables) ListChain(table, chain string) (*Chain, error)
- func (this *IPTables) UpdateChain(logger utils.NotificationLogger, chain *Chain) error
- type NestedType
- type Option
- type OptionArg
- type OptionType
- type Options
- func (this *Options) Add(opts ...Option) *Options
- func (this Options) AsOption() Option
- func (this Options) GetOption(name string) Option
- func (this Options) HasOption(name string) bool
- func (this Options) Index(opt Option) int
- func (this Options) IndexOption(name string) int
- func (this *Options) Remove(opt Option) *Options
- func (this *Options) RemoveOption(name string) *Options
- type Requests
- type Rule
- type Rules
- type StringArg
- type StringList
Constants ¶
This section is empty.
Variables ¶
View Source
var All = all{0}
Consume no more arg and accept rest as single option (use as default for Trailing)
View Source
var AllArg = all{1}
Consume one more arg and accept rest as single option (use as default for Trailing)
View Source
var Any = any{0}
Consume no more args (use as default for Nested)
View Source
var AnyArg = any{1}
Consume one more args (use as default for Nested)
Functions ¶
func RegisterArgType ¶
func RegisterArgType(name string, n int, nested ...NestedType)
func RegisterType ¶
func RegisterType(t OptionType)
Types ¶
type ChainRequest ¶
func NewChainRequest ¶
func NewChainRequest(table, chain string, rules Rules, cleanup bool) *ChainRequest
type IPTables ¶
func (*IPTables) AppendRule ¶
func (*IPTables) AssureChain ¶
func (this *IPTables) AssureChain(logger utils.NotificationLogger, chain *Chain) error
func (*IPTables) CleanupChain ¶
CleanupChain deletes all rules in the specified table/chain and finally deletes the chain
func (*IPTables) DeleteRule ¶
func (*IPTables) Execute ¶
func (this *IPTables) Execute(logger utils.NotificationLogger, req *ChainRequest) error
func (*IPTables) InsertRule ¶
func (*IPTables) UpdateChain ¶
func (this *IPTables) UpdateChain(logger utils.NotificationLogger, chain *Chain) error
type NestedType ¶
func MultiArgType ¶
func MultiArgType(name string, n int, nested ...OptionType) NestedType
func Nested ¶
func Nested(name string, n int, nested ...NestedType) NestedType
func Trailing ¶
func Trailing(name string, n int, nested ...OptionType) NestedType
type OptionType ¶
func ArgType ¶
func ArgType(name string, n int, nested ...NestedType) OptionType
type Requests ¶
type Requests []*ChainRequest
type StringList ¶
type StringList []string
func (StringList) Index ¶
func (this StringList) Index(val string) int
Click to show internal directories.
Click to hide internal directories.