{"id":20324566,"url":"https://github.com/netascode/go-restconf","last_synced_at":"2025-10-05T20:02:26.076Z","repository":{"id":38307475,"uuid":"484773613","full_name":"netascode/go-restconf","owner":"netascode","description":"A Go client library for RESTCONF devices.","archived":false,"fork":false,"pushed_at":"2025-08-16T09:18:18.000Z","size":79,"stargazers_count":5,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-16T11:28:25.747Z","etag":null,"topics":["go","golang","restconf"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/netascode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-04-23T14:43:58.000Z","updated_at":"2025-08-16T09:18:12.000Z","dependencies_parsed_at":"2024-01-12T16:14:20.844Z","dependency_job_id":"45195ba3-9bec-425a-8423-71501b6be049","html_url":"https://github.com/netascode/go-restconf","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/netascode/go-restconf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netascode%2Fgo-restconf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netascode%2Fgo-restconf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netascode%2Fgo-restconf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netascode%2Fgo-restconf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netascode","download_url":"https://codeload.github.com/netascode/go-restconf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netascode%2Fgo-restconf/sbom","scorecard":{"id":154804,"data":{"date":"2025-08-04","repo":{"name":"github.com/netascode/go-restconf","commit":"940b44b7a8ff6dbc1e55874a6a232cb653f33931"},"scorecard":{"version":"v5.2.1-28-gc1d103a9","commit":"c1d103a9bb9f635ec7260bf9aa0699466fa4be0e"},"score":4.2,"checks":[{"name":"Maintained","score":1,"reason":"2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/netascode/go-restconf/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/netascode/go-restconf/test.yml/main?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/16 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#code-review"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Mozilla Public License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/netascode/.github/SECURITY.md:1","Info: Found linked content: github.com/netascode/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/netascode/.github/SECURITY.md:1","Info: Found text in security policy: github.com/netascode/.github/SECURITY.md:1"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 14 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T11:28:29.252Z","repository_id":38307475,"created_at":"2025-08-16T11:28:29.252Z","updated_at":"2025-08-16T11:28:29.252Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276489772,"owners_count":25651604,"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","status":"online","status_checked_at":"2025-09-22T02:00:08.972Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["go","golang","restconf"],"created_at":"2024-11-14T19:34:31.848Z","updated_at":"2025-09-22T23:31:50.595Z","avatar_url":"https://github.com/netascode.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Tests](https://github.com/netascode/go-restconf/actions/workflows/test.yml/badge.svg)](https://github.com/netascode/go-restconf/actions/workflows/test.yml)\n\n# go-restconf\n\n`go-restconf` is a Go client library for RESTCONF devices. It is based on Nathan's excellent [goaci](https://github.com/brightpuddle/goaci) module and features a simple, extensible API and [advanced JSON manipulation](#result-manipulation).\n\n## Getting Started\n\n### Installing\n\nTo start using `go-restconf`, install Go and `go get`:\n\n`$ go get -u github.com/netascode/go-restconf`\n\n### Basic Usage\n\n```go\npackage main\n\nimport \"github.com/netascode/go-resconf\"\n\nfunc main() {\n    client, _ := restconf.NewClient(\"https://1.1.1.1\", \"user\", \"pwd\", true)\n\n    res, _ := client.GetData(\"Cisco-IOS-XE-native:native\")\n    println(res.Res.Get(\"Cisco-IOS-XE-native:native.hostname\").String())\n}\n```\n\nThis will print for example:\n\n```\nROUTER-1\n```\n\n#### Result manipulation\n\n`restconf.Result` uses GJSON to simplify handling JSON results. See the [GJSON](https://github.com/tidwall/gjson) documentation for more detail.\n\n```go\nres, _ := client.GetData(\"Cisco-IOS-XE-native:native/interface/GigabitEthernet\")\nprintln(res.Res.Get(\"Cisco-IOS-XE-native:GigabitEthernet.0.name\").String()) // name of first interface\n\nfor _, int := range res.Res.Get(\"Cisco-IOS-XE-native:GigabitEthernet\").Array() {\n    println(int.Get(\"@pretty\").Raw) // pretty print interface attributes\n}\n```\n\n#### Helpers for common patterns\n\n```go\nres, _ := client.GetData(\"Cisco-IOS-XE-native:native/hostname\")\nres, _ := client.DeleteData(\"Cisco-IOS-XE-native:native/banner/login/banner\")\n```\n\n#### Query parameters\n\nPass the `restconf.Query` object to the `Get` request to add query parameters:\n\n```go\nqueryConfig := restconf.Query(\"content\", \"config\")\nres, _ := client.GetData(\"Cisco-IOS-XE-native:native\", queryConfig)\n```\n\nPass as many parameters as needed:\n\n```go\nres, _ := client.GetData(\"Cisco-IOS-XE-native:native\",\n    restconf.Query(\"content\", \"config\"),\n    restconf.Query(\"depth\", \"1\"),\n)\n```\n\n#### POST data creation\n\n`restconf.Body` is a wrapper for [SJSON](https://github.com/tidwall/sjson). SJSON supports a path syntax simplifying JSON creation.\n\n```go\nexampleUser := restconf.Body{}.Set(\"Cisco-IOS-XE-native:username.name\", \"test-user\").Str\nclient.PostData(\"Cisco-IOS-XE-native:native\", exampleUser)\n```\n\nThese can be chained:\n\n```go\nuser1 := restconf.Body{}.\n    Set(\"Cisco-IOS-XE-native:username.name\", \"test-user\").\n    Set(\"Cisco-IOS-XE-native:username.description\", \"My Test User\")\n```\n\n...or nested:\n\n```go\nattrs := restconf.Body{}.\n    Set(\"name\", \"test-user\").\n    Set(\"description\", \"My Test User\").\n    Str\nuser1 := restconf.Body{}.SetRaw(\"Cisco-IOS-XE-native:username\", attrs).Str\n```\n\n## Documentation\n\nSee the [documentation](https://godoc.org/github.com/netascode/go-restconf) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetascode%2Fgo-restconf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetascode%2Fgo-restconf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetascode%2Fgo-restconf/lists"}