{"id":20324565,"url":"https://github.com/netascode/go-nd","last_synced_at":"2025-03-04T10:21:49.987Z","repository":{"id":189140539,"uuid":"680121642","full_name":"netascode/go-nd","owner":"netascode","description":"A Go client library for Cisco Nexus Dashboard.","archived":false,"fork":false,"pushed_at":"2025-01-13T19:27:16.000Z","size":34,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-13T20:27:50.323Z","etag":null,"topics":["cisco","go","golang","nexus","nexus-dashboard"],"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}},"created_at":"2023-08-18T11:48:40.000Z","updated_at":"2025-01-13T19:27:16.000Z","dependencies_parsed_at":"2023-08-18T12:56:18.172Z","dependency_job_id":"56790366-c9b8-4a9e-a95c-99b7fa67b16f","html_url":"https://github.com/netascode/go-nd","commit_stats":null,"previous_names":["netascode/go-nd"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netascode%2Fgo-nd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netascode%2Fgo-nd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netascode%2Fgo-nd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netascode%2Fgo-nd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netascode","download_url":"https://codeload.github.com/netascode/go-nd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241827464,"owners_count":20026693,"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":["cisco","go","golang","nexus","nexus-dashboard"],"created_at":"2024-11-14T19:34:31.774Z","updated_at":"2025-03-04T10:21:49.955Z","avatar_url":"https://github.com/netascode.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Tests](https://github.com/netascode/go-nd/actions/workflows/test.yml/badge.svg)](https://github.com/netascode/go-nd/actions/workflows/test.yml)\n\n# go-nd\n\n`go-nd` is a Go client library for Cisco Nexus Dashboard. 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-nd`, install Go and `go get`:\n\n`$ go get -u github.com/netascode/go-nd`\n\n### Basic Usage\n\n```go\npackage main\n\nimport \"github.com/netascode/go-nd\"\n\nfunc main() {\n    client, _ := nd.NewClient(\"1.1.1.1\", \"/appcenter/cisco/ndfc/api/v1\", \"user\", \"pwd\", \"\", true)\n\n    res, _ := client.Get(\"/lan-fabric/rest/control/fabrics\")\n    println(res.Get(\"0.id\").String())\n}\n```\n\nThis will print something like:\n\n```\n3\n```\n\n#### Result manipulation\n\n`nd.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.Get(\"/lan-fabric/rest/control/fabrics\")\n\nfor _, group := range res.Array() {\n    println(group.Get(\"@pretty\").String()) // pretty print fabrics\n}\n```\n\n#### POST data creation\n\n`nd.Body` is a wrapper for [SJSON](https://github.com/tidwall/sjson). SJSON supports a path syntax simplifying JSON creation.\n\n```go\nbody := nd.Body{}.\n    Set(\"templatename\", \"test\").\n    Set(\"content\", \"##template properties \\nname= test;\\ndescription= ;\\ntags= ;\\nsupportedPlatforms= All;\\ntemplateType= POLICY;\\ntemplateSubType= VLAN;\\ncontentType= TEMPLATE_CLI;##template variables\\r\\n##\\r\\n##template content\\r\\n##\")\nclient.Post(\"/configtemplate/rest/config/templates/template\", body.Str)\n```\n\n## Documentation\n\nSee the [documentation](https://godoc.org/github.com/netascode/go-nd) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetascode%2Fgo-nd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetascode%2Fgo-nd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetascode%2Fgo-nd/lists"}