dynv6

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Record

type Record struct {
	RecordInfo
	ExpandedData string `json:"expandedData"`
	ID           uint   `json:"id"`
	ZoneID       uint   `json:"zoneID"`
	// contains filtered or unexported fields
}

func (*Record) Delete

func (r *Record) Delete() (err error)

func (*Record) GetRecord

func (r *Record) GetRecord(info RecordInfo) (record Record, err error)

func (*Record) Update

func (r *Record) Update(info RecordInfo) (record Record, err error)

type RecordInfo

type RecordInfo struct {
	Name     string `json:"name"`
	Priority uint16 `json:"priority"`
	Port     uint16 `json:"port"`
	Weight   uint16 `json:"weight"`
	Flags    uint16 `json:"flags"`
	Tag      string `json:"tag"`
	Data     string `json:"data"`
	Type     string `json:"type"`
}

type UpdatePayload

type UpdatePayload struct {
	IPv4Address string `json:"ipv4address"`
	IPv6Prefix  string `json:"ipv6prefix"`
}

type Zone

type Zone struct {
	ID          uint      `json:"id"`
	Name        string    `json:"name"`
	IPv4Address string    `json:"ipv4address"`
	IPv6Prefix  string    `json:"ipv6prefix"`
	CreatedAt   time.Time `json:"createdAt"`
	UpdatedAt   time.Time `json:"updatedAt"`
	// contains filtered or unexported fields
}

func New

func New(token string, zone_name string) (zone *Zone, err error)

func (*Zone) AddRecord

func (z *Zone) AddRecord(info RecordInfo) (record Record, err error)

func (*Zone) CheckUpdate

func (z *Zone) CheckUpdate(ipv4address string, ipv6prefix string) (zd Zone, err error)

func (*Zone) GetRecords

func (z *Zone) GetRecords() (records []Record, err error)

func (*Zone) Update

func (z *Zone) Update(ipv4address string, ipv6prefix string) (zd Zone, err error)

Jump to

Keyboard shortcuts

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