Documentation ¶
Index ¶
- func GenerateSelfSignedPair() (*ecdsa.PrivateKey, []byte, error)
- func SSHExec(router *RouterConfig, cmd []string) ([]string, error)
- func SanitizeASPathRegex(aspath string) (string, error)
- func ValidateConfig(c *Config)
- func Version() string
- type Config
- type GrpcConfig
- type HFBlock
- type HealthCheck
- type IPFamily
- type IPNet
- type Link
- type RedisConfig
- type Router
- type RouterConfig
- type RouterInstance
- func (rt *RouterInstance) BGPASPath(param string) ([]string, error)
- func (rt *RouterInstance) BGPCommunity(param string) ([]string, error)
- func (rt *RouterInstance) BGPRoute(param *IPNet) ([]string, error)
- func (rt *RouterInstance) Healthcheck() error
- func (rt *RouterInstance) Ping(param *IPNet) ([]string, error)
- func (rt *RouterInstance) Traceroute(param *IPNet) ([]string, error)
- type RouterMap
- type SecurityTxtConfig
- type SentryConfig
- type TLSConfig
- type WebConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateSelfSignedPair ¶
func GenerateSelfSignedPair() (*ecdsa.PrivateKey, []byte, error)
func SanitizeASPathRegex ¶
func ValidateConfig ¶
func ValidateConfig(c *Config)
Types ¶
type Config ¶
type Config struct { Devices []RouterConfig `yaml:"devices"` Grpc GrpcConfig `yaml:"grpc"` Web WebConfig `yaml:"web"` SecurityTxt SecurityTxtConfig `yaml:"security.txt"` Redis RedisConfig `yaml:"redis"` }
func ParseConfigYaml ¶
type GrpcConfig ¶
type HFBlock ¶
type HFBlock struct { Text string `yaml:"text"` Logo string `yaml:"logo"` Links []Link `yaml:"links"` }
func (*HFBlock) LinksString ¶
type HealthCheck ¶
type RedisConfig ¶
type Router ¶
type Router interface { Ping(*RouterConfig, *IPNet) ([]string, error) Traceroute(*RouterConfig, *IPNet) ([]string, error) BGPRoute(*RouterConfig, *IPNet) ([]string, error) BGPCommunity(*RouterConfig, string) ([]string, error) BGPASPath(*RouterConfig, string) ([]string, error) }
type RouterConfig ¶
type RouterConfig struct { Name string `yaml:"name"` Hostname string `yaml:"hostname"` Username string `yaml:"username"` Password string `yaml:"password"` SSHKey string `yaml:"ssh_key"` VRF string `yaml:"vrf"` Location string `yaml:"location"` Source4 *IPNet `yaml:"source4"` Source6 *IPNet `yaml:"source6"` Type string `yaml:"type"` }
type RouterInstance ¶
type RouterInstance struct { Router Router Config *RouterConfig HealthCheck *HealthCheck }
func (*RouterInstance) BGPASPath ¶
func (rt *RouterInstance) BGPASPath(param string) ([]string, error)
func (*RouterInstance) BGPCommunity ¶
func (rt *RouterInstance) BGPCommunity(param string) ([]string, error)
func (*RouterInstance) BGPRoute ¶
func (rt *RouterInstance) BGPRoute(param *IPNet) ([]string, error)
func (*RouterInstance) Healthcheck ¶
func (rt *RouterInstance) Healthcheck() error
func (*RouterInstance) Traceroute ¶
func (rt *RouterInstance) Traceroute(param *IPNet) ([]string, error)
type RouterMap ¶
type RouterMap []*RouterInstance
type SecurityTxtConfig ¶
type SecurityTxtConfig struct { Enabled bool `yaml:"enabled"` Contact string `yaml:"contact"` Canonical string `yaml:"canonical"` Encryption string `yaml:"encryption"` Acknowledgements string `yaml:"acknowledgements"` PreferredLanguages string `yaml:"preferred-languages"` Policy string `yaml:"policy"` Hiring string `yaml:"hiring"` CSAF string `yaml:"csaf"` Expires string `yaml:"expires"` }
func (*SecurityTxtConfig) String ¶
func (s *SecurityTxtConfig) String() string
type SentryConfig ¶
Click to show internal directories.
Click to hide internal directories.