rest

package
v0.0.0-...-07f90b3 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2020 License: GPL-3.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

View Source
const (
	DefaultStorageFolder     string = "/var/rebind"
	DefaultConfigFolder      string = "/etc/rebind"
	DefaultLogFileFolder     string = "/var/log/rebind"
	DefaultLogFileLevel      string = "DEBUG"
	DefaultDnsServerPort            = 53
	DefaultRestServerPort           = 9000
	DefaultIpAddress                = "0.0.0.0"
	DefaultDnsPipeAddress           = "127.0.0.1"
	DefaultDnsPipePort              = 953
	DefaultDnsAnswerPipePort        = 954
)

Variables

View Source
var (
	DefaultGroupForwarders = []net.UDPAddr{
		net.UDPAddr{
			IP:   net.IPv4(8, 8, 8, 8),
			Port: 53,
		},
		net.UDPAddr{
			IP:   net.IPv4(8, 8, 4, 4),
			Port: 53,
		},
	}
)

Functions

This section is empty.

Types

type Action

type Action string
const (
	AddResoource    Action = "ADD"
	UpdateResoource Action = "UPDATE"
	DeleteResoource Action = "DELTE"
)

func (Action) Equals

func (a Action) Equals(act Action) bool

func (Action) Same

func (a Action) Same(act string) bool

func (Action) String

func (a Action) String(act string) string

type DnsGroupResponse

type DnsGroupResponse struct {
	Group     data.Group        `yaml:"group" json:"group" xml:"group"`
	Resources []store.DNSRecord `yaml:"resources" json:"resources" xml:"resources"`
}

type DnsGroupsResponse

type DnsGroupsResponse struct {
	Groups []data.Group `yaml:"groups" json:"groups" xml:"groups"`
}

type DnsTemplateDataType

type DnsTemplateDataType struct {
	Method  string      `yaml:"method" json:"method" xml:"method"`
	Header  []string    `yaml:"header" json:"header" xml:"header"`
	Query   []string    `yaml:"query" json:"query" xml:"query"`
	Request interface{} `yaml:"request" json:"request" xml:"request"`
}

type DnsTemplateResponse

type DnsTemplateResponse struct {
	Templates []DnsTemplateDataType `yaml:"template" json:"template" xml:"template"`
}

type DnsUpdateRequest

type DnsUpdateRequest struct {
	Action Action            `yaml:"action" json:"action" xml:"action"`
	Field  string            `yaml:"field" json:"field" xml:"field"`
	Data   UpdateRequestForm `yaml:"data" json:"data" xml:"data"`
}

type Field

type Field string

func (Field) Equals

func (f Field) Equals(field Field) bool

type GroupCreationRequest

type GroupCreationRequest struct {
	Forwarders []net.UDPAddr `yaml:"fowarders" json:"fowarders" xml:"fowarders"`
	Domains    []string      `yaml:"domains" json:"domains" xml:"domains"`
}

type GroupFilterRequest

type GroupFilterRequest struct {
	Filter struct {
		Name   string `yaml:"name" json:"name" xml:"name"`
		Domain string `yaml:"domain" json:"domain" xml:"domain"`
	}
}

type GroupRequest

type GroupRequest struct {
	Name       string        `yaml:"name" json:"name" xml:"name"`
	Forwarders []net.UDPAddr `yaml:"fowarders" json:"fowarders" xml:"fowarders"`
	Domains    []string      `yaml:"domains" json:"domains" xml:"domains"`
}

type UpdateListForm

type UpdateListForm struct {
	Value string `yaml:"value" json:"value" xml:"value"`
	Index int    `yaml:"index" json:"index" xml:"index"`
}

type UpdateRequestForm

type UpdateRequestForm struct {
	ListData   UpdateListForm `yaml:"fromList" json:"fromList" xml:"from-list"`
	RecordData model.Request  `yaml:"fromRecord" json:"fromRecord" xml:"from-record"`
	NewValue   interface{}    `yaml:"value" json:"value" xml:"value"`
}

Jump to

Keyboard shortcuts

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