https://github.com/libdns/timeweb
https://github.com/libdns/timeweb
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/libdns/timeweb
- Owner: libdns
- License: mit
- Created: 2024-10-09T21:48:14.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-10-26T15:30:45.000Z (8 months ago)
- Last Synced: 2025-10-26T16:07:30.199Z (8 months ago)
- Language: Go
- Size: 12.7 KB
- Stars: 2
- Watchers: 0
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Timeweb DNS for [libdns](https://github.com/libdns/libdns)
[](https://pkg.go.dev/github.com/Riskful/timeweb-libdns)
This package implements the [libdns interfaces](https://github.com/libdns/libdns) for [Timeweb DNS API](https://timeweb.cloud/api-docs#tag/Domeny/operation/getDomainDNSRecords), allowing you to manage DNS records.
## Authorize
To authorize you need to use Timeweb [Authorization](https://timeweb.cloud/my/login).
## Example
Minimal working example of getting DNS zone records.
```go
package main
import (
"context"
"fmt"
"os"
"github.com/libdns/libdns/timeweb-libdns"
)
func main() {
provider = timeweb.Provider{
ApiURL: os.Getenv("TIMEWEB_URL"),
ApiToken: os.Getenv("TIMEWEB_API_TOKEN"),
}
zone = os.Getenv("TIMEWEB_ZONE")
ctx = context.Background()
records, err := provider.GetRecords(ctx, zone)
if err != nil {
fmt.Printf("Error: %s", err)
return
}
fmt.Println(records)
}
```
Always yours [@Riskful](https://github.com/Riskful)