mirror of
https://github.com/cert-manager/webhook-example.git
synced 2026-03-17 02:12:51 +01:00
rename param to SetTXTRecord
This commit is contained in:
parent
23ae00ce0d
commit
1a821c6643
1 changed files with 2 additions and 2 deletions
|
|
@ -14,11 +14,11 @@ var (
|
||||||
authHeaderName = "X-NFSN-Authentication"
|
authHeaderName = "X-NFSN-Authentication"
|
||||||
)
|
)
|
||||||
|
|
||||||
func SetTXTRecord(domain string, resolvedFqdn string, key string, login string, apiKey string) error {
|
func SetTXTRecord(domain string, dnsName string, key string, login string, apiKey string) error {
|
||||||
urlPath := fmt.Sprintf("/dns/%s/addRR", domain)
|
urlPath := fmt.Sprintf("/dns/%s/addRR", domain)
|
||||||
requestUrl := fmt.Sprintf("%s%s", baseUrl, urlPath)
|
requestUrl := fmt.Sprintf("%s%s", baseUrl, urlPath)
|
||||||
|
|
||||||
values := url.Values{"name": {resolvedFqdn}, "type": {"TXT"}, "data": {key}}
|
values := url.Values{"name": {dnsName}, "type": {"TXT"}, "data": {key}}
|
||||||
body := values.Encode()
|
body := values.Encode()
|
||||||
authHeader, err := auth.GetAuthHeader(login, apiKey, urlPath, body)
|
authHeader, err := auth.GetAuthHeader(login, apiKey, urlPath, body)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue