-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add protocol.ReverseDomainNameSet (#32)
* Fix protocol.ReverseDomainNameGet - Remove "IPv" - Fix URI * Add protocol.ReverseDomainNameSet * fix
- Loading branch information
Showing
2 changed files
with
55 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package protocol | ||
|
||
import ( | ||
"reflect" | ||
) | ||
|
||
// ReverseDomainNameSet 逆引きドメイン名設定 (同期) | ||
// https://manual.iij.jp/p2/pubapi/62130378.html | ||
type ReverseDomainNameSet struct { | ||
GisServiceCode string `json:"-"` // P2契約のサービスコード(gis########) | ||
IPv4Address string `json:"-"` // 割り当てられたIPv4アドレス(IPv4アドレス) | ||
DomainName string // 逆引きドメイン名 | ||
} | ||
|
||
// URI /{{.GisServiceCode}}/global-network/{{.IPv4Address}}/name.json | ||
func (t ReverseDomainNameSet) URI() string { | ||
return "/{{.GisServiceCode}}/global-network/{{.IPv4Address}}/name.json" | ||
} | ||
|
||
// APIName ReverseDomainNameSet | ||
func (t ReverseDomainNameSet) APIName() string { | ||
return "ReverseDomainNameSet" | ||
} | ||
|
||
// Method PUT | ||
func (t ReverseDomainNameSet) Method() string { | ||
return "PUT" | ||
} | ||
|
||
// Document http://manual.iij.jp/p2/pubapi/59940525.html | ||
func (t ReverseDomainNameSet) Document() string { | ||
return "http://manual.iij.jp/p2/pubapi/59940525.html" | ||
} | ||
|
||
// JPName 逆引きドメイン名設定 | ||
func (t ReverseDomainNameSet) JPName() string { | ||
return "逆引きドメイン名設定" | ||
} | ||
func init() { | ||
APIlist = append(APIlist, ReverseDomainNameSet{}) | ||
TypeMap["ReverseDomainNameSet"] = reflect.TypeOf(ReverseDomainNameSet{}) | ||
} | ||
|
||
// ReverseDomainNameSetResponse 逆引きドメイン名設定のレスポンス | ||
type ReverseDomainNameSetResponse struct { | ||
*CommonResponse | ||
Current struct { | ||
DomainName string `json:",omitempty"` // 設定した逆引きドメイン名 | ||
} `json:",omitempty"` | ||
Previous struct { | ||
DomainName string `json:",omitempty"` // 設定前の逆引きドメイン名 | ||
} `json:",omitempty"` | ||
} |