1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
|
# IIJ DNS Platform Service API for Go
[](https://codecov.io/gh/mimuret/golang-iij-dpf)
- API Library for [IIJ DNS Platform Service](https://www.iij.ad.jp/en/biz/dns-pfm/).
- This is not an official IIJ software.
## Usage
```
package main
import (
"fmt"
"os"
"github.com/mimuret/golang-iij-dpf/pkg/api"
"github.com/mimuret/golang-iij-dpf/pkg/apis/dpf/v1/core"
)
func main() {
token := os.Getenv("DPF_TOKEN")
cl := api.NewClient(token, "", nil)
zoneList := &core.ZoneList{}
searchParam := &core.ZoneListSearchKeywords{Name: api.KeywordsString{"example.jp"}}
req, err := cl.ListAll(zoneList, searchParam)
if err != nil {
panic(err)
}
fmt.Printf("RequestID: %s\n", req)
for _, item := range zoneList.Items {
fmt.Println(item)
}
}
```
|