{"id":20560319,"url":"https://github.com/andreaskoch/dee-ns","last_synced_at":"2025-06-26T15:33:16.888Z","repository":{"id":57523248,"uuid":"51028413","full_name":"andreaskoch/dee-ns","owner":"andreaskoch","description":"A go-library for reading and updating DNS records","archived":false,"fork":false,"pushed_at":"2016-03-25T16:43:54.000Z","size":31,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T11:07:35.277Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andreaskoch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-03T20:30:32.000Z","updated_at":"2016-02-03T20:32:26.000Z","dependencies_parsed_at":"2022-09-26T18:10:41.981Z","dependency_job_id":null,"html_url":"https://github.com/andreaskoch/dee-ns","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/andreaskoch/dee-ns","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreaskoch%2Fdee-ns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreaskoch%2Fdee-ns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreaskoch%2Fdee-ns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreaskoch%2Fdee-ns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreaskoch","download_url":"https://codeload.github.com/andreaskoch/dee-ns/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreaskoch%2Fdee-ns/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262094806,"owners_count":23258039,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T03:54:13.449Z","updated_at":"2025-06-26T15:33:16.837Z","avatar_url":"https://github.com/andreaskoch.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Dee NS\n\nA go-library for updating DNS records\n\n`github.com/andreaskoch/dee-ns` is a golang library for updating subdomain records that are managed by DNSimple.\n\n[![Build Status](https://travis-ci.org/andreaskoch/dee-ns.svg?branch=master)](https://travis-ci.org/andreaskoch/dee-ns)\n\n## Usage\n\nCreate a new DNS client instance and fetch all domain names:\n\n```go\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"github.com/andreaskoch/dee-ns\"\n)\n\nfunc main() {\n\t// assemble the API credentials\n\tcredentials := deens.APICredentials{\"john.doe@example.com\", \"ApItOken\"}\n\n\t// create a new DNS client\n\tdnsClient, clientError := deens.NewDNSClient(credentials)\n\tif clientError != nil {\n\t\tfmt.Fprintf(os.Stderr, \"Unable to create DNS client: %s\", clientError.Error())\n\t\tos.Exit(1)\n\t}\n\n\t// fetch all available domains\n\tdomains, domainsError := dnsClient.GetDomains()\n\tif domainsError != nil {\n\t\tfmt.Fprintf(os.Stderr, \"Unable to fetch domains: %s\", domainsError.Error())\n\t\tos.Exit(1)\n\t}\n\n\t// print domain names to stdout\n\tfor _, domain := range domains {\n\t\tfmt.Fprintf(os.Stdout, \"%s\\n\", domain.Name)\n\t}\n}\n\n```\n\nCreate a new DNS info provider:\n\n```go\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"github.com/andreaskoch/dee-ns\"\n)\n\nfunc main() {\n\n\t// create a DNS client\n\tcredentials := APICredentials{\"john.doe@example.com\", \"ApItOken\"}\n\tdnsClient, clientError := deens.NewDNSClient(credentials)\n\tif clientError != nil {\n\t\tfmt.Fprintf(os.Stderr, \"Unable to create DNS client: %s\", clientError.Error())\n\t\tos.Exit(1)\n\t}\n\n\t// create a new DNS info provider instance\n\tinfoProvider := deens.NewDNSInfoProvider(dnsClient)\n\n\t// get all domain names\n\tdomainNames, domainNamesError := infoProvider.GetDomainNames()\n\tif domainNamesError != nil {\n\t\tfmt.Fprintf(os.Stderr, \"Unable to fetch domain names: %s\", domainNamesError.Error())\n\t\tos.Exit(1)\n\t}\n\n\t// print a list all domain names\n\tfor _, domainName := range domainNames {\n\t\tfmt.Fprintf(os.Stdout, \"%s\\n\", domainName)\n\t}\n}\n```\n\nCreate a new DNS editor instance:\n\n```go\nimport (\n\t\"fmt\"\n\t\"net\"\n\t\"os\"\n)\n\nfunc main() {\n\n\t// create a DNS client\n\tcredentials := APICredentials{\"john.doe@example.com\", \"ApItOken\"}\n\tdnsClient, clientError := NewDNSClient(credentials)\n\tif clientError != nil {\n\t\tfmt.Fprintf(os.Stderr, \"Unable to create DNS client: %s\", clientError.Error())\n\t\tos.Exit(1)\n\t}\n\n\t// create a new DNS info provider instance\n\tdnsInfoProvider := NewDNSInfoProvider(dnsClient)\n\n\t// create a new DNS editor instance\n\tdnsEditor := NewDNSEditor(dnsClient, dnsInfoProvider)\n\n\t// create an DNS A record for www.example.com pointing to 127.0.0.1\n\tdomain := \"example.com\"\n\tsubDomainName := \"www\"\n\ttimeToLive := 600\n\tip := net.ParseIP(\"127.0.0.1\")\n\n\tcreateSubdomainError := dnsEditor.CreateSubdomain(domain, subDomainName, timeToLive, ip)\n\tif createSubdomainError != nil {\n\t\tfmt.Fprintf(os.Stderr, \"Failed to create subdomain %s.%s: %s\", subDomainName, domain, clientError.Error())\n\t\tos.Exit(1)\n\t}\n\n\tfmt.Fprintf(os.Stdout, \"Created subdomain %s.%s\", subDomainName, domain)\n}\n```\n\n## Dependencies\n\ndee-ns uses the [github.com/pearkes/dnsimple](https://github.com/pearkes/dnsimple) library for communicating with the DNSimple API.\n\n## Contribute\n\nIf you find a bug or if you want to add or improve some feature please create an issue or send me a pull requests.\nAll contributions are welcome.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreaskoch%2Fdee-ns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreaskoch%2Fdee-ns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreaskoch%2Fdee-ns/lists"}