aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2022-05-15 17:04:25 +0700
committerShulhan <ms@kilabit.info>2022-05-15 17:04:25 +0700
commitfe92d71726313f54ea91980d40c8ef52872ac1f2 (patch)
treeb4d65f87d69d776c7c390508648246bfb5657096
parent188f8b7c0285dc0752113ecbb3af546697cba64d (diff)
downloadrescached-fe92d71726313f54ea91980d40c8ef52872ac1f2.tar.xz
all: split zoneRecordRequest type into separate file
-rw-r--r--httpd.go8
-rw-r--r--zone_record_request.go18
2 files changed, 18 insertions, 8 deletions
diff --git a/httpd.go b/httpd.go
index 2e742b5..0f05c43 100644
--- a/httpd.go
+++ b/httpd.go
@@ -1051,14 +1051,6 @@ func (srv *Server) apiZonedDelete(epr *libhttp.EndpointRequest) (resb []byte, er
return json.Marshal(&res)
}
-type zoneRecordRequest struct {
- Zone string `json:"zone"`
- Type string `json:"type"`
- Record string `json:"record"`
- recordRaw []byte
- rtype dns.RecordType
-}
-
// apiZonedRRAdd create new RR for the zone file.
//
// # Request
diff --git a/zone_record_request.go b/zone_record_request.go
new file mode 100644
index 0000000..3996643
--- /dev/null
+++ b/zone_record_request.go
@@ -0,0 +1,18 @@
+// SPDX-FileCopyrightText: 2022 M. Shulhan <ms@kilabit.info>
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+package rescached
+
+import (
+ "github.com/shuLhan/share/lib/dns"
+)
+
+// zoneRecordRequest contains the request parameters for adding or deleting
+// record on zone.d.
+type zoneRecordRequest struct {
+ Zone string `json:"zone"`
+ Type string `json:"type"`
+ Record string `json:"record"`
+ recordRaw []byte
+ rtype dns.RecordType
+}