config

package
v0.0.0-...-5f2699b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Config Rules `yaml:"config"`
}

Configuration defines the configuration structure

func NewConfiguration

func NewConfiguration(configDirectory string) (*Configuration, error)

NewConfiguration reads and parse the configuration file

type Rule

type Rule struct {
	Interface []string `yaml:"interface,omitempty"`
	Protocol  string   `yaml:"protocol,omitempty"`
	Port      int      `yaml:"port,omitempty"`
	Allow     []string `yaml:"allow,omitempty"`
}

Rule defines a rule

type Rules

type Rules struct {
	Rules []Rule
}

Rules defines a list of rules

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL