https://github.com/libdns/huaweicloud
Huawei Cloud provider for libdns
https://github.com/libdns/huaweicloud
Last synced: 4 months ago
JSON representation
Huawei Cloud provider for libdns
- Host: GitHub
- URL: https://github.com/libdns/huaweicloud
- Owner: libdns
- License: mit
- Created: 2024-10-18T15:55:36.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-08-01T20:10:15.000Z (10 months ago)
- Last Synced: 2025-08-01T22:31:37.723Z (10 months ago)
- Language: Go
- Homepage:
- Size: 160 KB
- Stars: 0
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Huawei Cloud for [`libdns`](https://github.com/libdns/libdns)
=======================
[](https://pkg.go.dev/github.com/libdns/huaweicloud)
This package implements the [libdns interfaces](https://github.com/libdns/libdns) for [Huawei Cloud DNS](https://www.huaweicloud.com/product/dns.html), allowing you to manage DNS records.
## Authenticating
To authenticate you need to supply your AccessKeyId and SecretAccessKey to the Provider.
## Example
Here's a minimal example of how to get all your DNS records using this `libdns` provider
```go
package main
import (
"context"
"fmt"
"github.com/libdns/huaweicloud"
)
func main() {
provider := huaweicloud.Provider{
AccessKeyId: "",
SecretAccessKey: "",
}
records, err := provider.GetRecords(context.TODO(), "example.com.")
if err != nil {
fmt.Println(err.Error())
}
for _, record := range records {
fmt.Printf("%s %v %s %s\n", record.Name, record.TTL.Seconds(), record.Type, record.Value)
}
}
```
For complete demo check [_example/main.go](_example/main.go)