Documentation
¶
Index ¶
- Variables
- func AddInterfaceConfig(ifName string) error
- func AddRouteConfig(ifName string, routeCidr string) error
- func CheckAuth(username, password string) bool
- func DeleteInterfaceConfig(ifName string) error
- func DeleteRouteConfig(ifName string, routeCidr string) error
- func GetInterfaceConfigState() (map[string]InterfaceInfo, error)
- func InitConfig(configFile string)
- type InterfaceConfig
- type InterfaceInfo
- type InterfaceRoute
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidHash = errors.New("the encoded hash is not in the correct format") ErrIncompatibleVersion = errors.New("incompatible version of argon2") )
View Source
var Config = viper.New()
Functions ¶
func AddInterfaceConfig ¶
func AddRouteConfig ¶
func DeleteInterfaceConfig ¶
func DeleteRouteConfig ¶
func GetInterfaceConfigState ¶
func GetInterfaceConfigState() (map[string]InterfaceInfo, error)
func InitConfig ¶
func InitConfig(configFile string)
Types ¶
type InterfaceConfig ¶
type InterfaceConfig struct {
Routes []string
}
interface.name config
func GetInterfaceConfig ¶
func GetInterfaceConfig(ifName string) *InterfaceConfig
type InterfaceInfo ¶
type InterfaceInfo struct {
Routes []InterfaceRoute
Active bool
}
func (*InterfaceInfo) GetRouteString ¶
func (i *InterfaceInfo) GetRouteString() string
func (*InterfaceInfo) GetRoutes ¶
func (i *InterfaceInfo) GetRoutes() (routes []string)
func (*InterfaceInfo) GetStateString ¶
func (i *InterfaceInfo) GetStateString() string
func (*InterfaceInfo) IsRouteActive ¶
func (i *InterfaceInfo) IsRouteActive(route string) bool
type InterfaceRoute ¶
Click to show internal directories.
Click to hide internal directories.