config

package
v0.0.0-...-287f4d3 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeviceFwRules

type DeviceFwRules struct {
	Name  string `json:"name"`
	Mac   string `json:"mac"`
	Rules []Rule `json:"rules"`
}

type DevicesFwRules

type DevicesFwRules []DeviceFwRules

func (DevicesFwRules) SearchDevice

func (dfr DevicesFwRules) SearchDevice(name string, mac string) (rules []Rule, exist bool)

type Dynv6Config

type Dynv6Config struct {
	Token string    `json:"token"`
	Zone  string    `json:"zone"`
	SPF   SPFConfig `json:"spf"`
}

type LogConfig

type LogConfig struct {
	File    string `json:"file"`
	Systemd bool   `json:"systemd"`
}

type Records

type Records []record

func (Records) Match

func (rs Records) Match(device_name string, rr_type string) (rec record, ok bool)

type Rule

type Rule struct {
	Proto string `json:"proto"`
	Port  uint16 `json:"port"`
}

type SPFConfig

type SPFConfig struct {
	Enabled bool   `json:"enabled"`
	Name    string `json:"name"`
}

type TemplateRecord

type TemplateRecord struct {
	DeviceName string   `json:"device"`
	Args       []string `json:"args"`
}

func (TemplateRecord) IsEmpty

func (tt TemplateRecord) IsEmpty() bool

type TpdnsConfig

type TpdnsConfig struct {
	Router  router         `json:"router"`
	Domain  domain         `json:"domain"`
	Server  server         `json:"server"`
	Dynv6   []Dynv6Config  `json:"dynv6"`
	Fwrules DevicesFwRules `json:"fwrules"`
	Log     LogConfig      `json:"log"`
}

func ReadConf

func ReadConf(filename string) (c *TpdnsConfig, err error)

type Zone

type Zone struct {
	Name          string  `json:"name"`
	DefaultDevice string  `json:"default_device"`
	Records       Records `json:"records"`
	GlobalIPv4    bool    `json:"global_ipv4"`
	GlobalIPv6    bool    `json:"global_ipv6"`
}

Jump to

Keyboard shortcuts

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