golang-iij-dpf

module
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2021 License: MIT

README

IIJ DNS Platform Service API for Go

codecov

Usage

package main

import (
	"fmt"
	"os"

	"github.com/mimuret/golang-iij-dpf/pkg/api"
	"github.com/mimuret/golang-iij-dpf/pkg/apis/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)
	}
}

Directories

Path Synopsis
pkg
api

Jump to

Keyboard shortcuts

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